Skip to main content

backend — Core API

The backend repo (package name nodvel) is the platform's core API server. It is the largest service and the integration hub: clients call it, and it orchestrates the microservices and external CRMs.

  • Stack: Express 4 + Mongoose/MongoDB, Socket.IO (+ Redis adapter), built on the Nodevel framework.
  • Runtime: Node 22 (container), FFmpeg installed, 6 GB heap.
  • Deploy: Docker → ECR → EKS, 4 API replicas + 1 scheduler pod.

Responsibilities​

  • Auth & RBAC — registration, sessions, JWT, passport OAuth (Google/Facebook/ Apple), teams, branches. Authorization is user_type + the per-user permissions[] array — the legacy roles/permissions layer (PermissionService, RoleController, PermissionController, populate('roles') in the bearer strategy) was removed 2026-07-20. Force logout (5939ffe37): access JWTs live 6 months and refresh tokens a year, so POST /company/:_id/force-logout (super-admin) stamps users.tokens_valid_from on the owner and every member; AuthService.isRevoked rejects any token whose iat predates it (second resolution, so a login racing the click survives) in the bearer strategy — no extra query — and in AuthController.refreshToken. It refuses an ownerless company: with no company.user_id the filter collapses to {'user_parent.parent_id': null} and would log out every web owner and super-admin. Login also seeds the identity graph with the account holder (recordAccountHolder; never from loginAs impersonation — see Identity Graph). The reset email subject reads "Forgot Password" (was "Forget Password").
  • Tenancy & billing — companies, agencies, subscriptions, packages, add-ons, invoices (Stripe + Xero).
  • Visitor identity — the identity graph: Person/PersonProfile resolution, IP signals, enrichment.
  • CRM sync — through the crm port to GoHighLevel, HubSpot, Salesforce, Jobber (+ Slack).
  • Realtime — the main Socket.IO server for dashboards, call/chat signalling, agent presence.
  • Scheduler — ~38 cron jobs (subscriptions, reporting, CRM sync, Knox metrics).
  • Orchestration — hands work to ms-ai, ms-sessions, ms-communication.

Boot flow​

index.js → otel.js (Sentry/OTel) → Application.run() (Nodevel sequence) → app/hooks.js:

  • boot() — middleware (file upload, body parsers, trust proxy, CORS with a 2 h preflight cache — maxAge: 7200, e9528dbc5; without it Chrome re-preflighted every ~5 s, rate limiting keyed on request.ip — the ingress-appended hop, never a body/header value), then loads services (Redis, Auth, Mongo, Logger, Mail, EmailQueue, CrmSync, the crm port, provider services gated by SERVICE_* flags — Salesforce, Jobber, PlatformCrm) and the identity subsystem chain (IdentityGraphRenderer → IdentityGraphConfig → SubscriptionGate → IdentityGraph → Verifier → PersonResolver → PersonWatch), plus Knox auto-engagement and CRM enrichment. The scheduler is the last statement of boot() — it constructs every job and starts ticking in its constructor, so anything it loads before is invisible to job constructors (see Boot order). Globals declared in hooks.js must match eslint.config.mjs — the same commit keeps them in step.
  • server() — starts Socket.IO, mounts Bull Board (/admin/queues), Sentry error handler.

Directory map​

PathContents
app/configs/app/service/database/redis/AWS/Azure/CRM config
app/controllers/80+ controllers (Admin*, Agency*, AI*, Call*, Chat*, Company*, Payment*, Reporting*, …)
app/models/~70 Mongoose models (see Data Stores)
app/routes/80+ route files; api.js is the root
app/services/~45 service classes (GoHighLevelService, HubspotService, StripeService, IdentityGraphService, PersonResolverService, SocketService, SchedulerService, …)
app/jobs/~38 cron jobs
app/lib/cross-service clients (msAiHandoff.js, msAiKnoxClient.js, msSessionsRecordingClient.js), ghlResilience.js, ipSignals.js
core/the Nodevel framework
eks/prod/K8s manifests (backend + scheduler deployments, service)
public/served visitor scripts (widget.js, knock-socket.js, Twilio/ElevenLabs clients)

Key route groups​

AreaRoutes
AuthauthRoutes.js — login, signup, OAuth, refresh
AgencyagencyRoutes.js — multi-client mgmt, staff, packages
CompanyCompanyRoutes.js — settings, website, FAQ, integrations
ChatchatRoutes.js — messages, chatbot training
CallscallRoutes.js, internalAiCallRoutes.js, aiInboundAgentRoutes.js, aiOutboundCallRoutes.js
SessionsuserSessionRoutes.js — visitor analytics
IdentityidentityGraphRoutes.js, adminIdentityRoutes.js
CRMgoHighLevelRoutes.js, hubspotRoutes.js — webhooks + sync
PaymentssubscriptionRoutes.js, stripeRoutes.js
WalletinternalTelephonyRoutes.js (ms-ai → backend: /internal/telephony/wallet|debit|notify), GET /subscription/wallet-transactions
PlaygroundplaygroundRoutes.js — public no-login sandbox + agency/admin management
ReportingreportRoutes.js, statsRoutes.js, statsV2Routes.js
StorageadminStorageRoutes.js — super-admin storage stats + recording cleanup proxy
Platform APIplatformApiRoutes.js — EzyMigrate integration (three trust zones). See Platform API
Lead APIon userSessionRoutes.js behind leadApiAuth: /api/v1/lead/visitors, /api/v1/visitors/count (now key-required — breaking), /api/v1/lead/:user_session_id/transcript
SMS agentsaiSmsAgentRoutes.js — /ai-sms-agents CRUD/clone/rotate-secret/messages + public POST /ai-sms/webhook (per-agent secret)
CertificationcertificationRoutes.js (/certification/*), adminCertificationRoutes.js (/admin/certification/*). See Certification
Nox activitynoxActivityRoutes.js — /nox/activity + /export (CSV) + /report
Push testadminPushTestRoutes.js — super-admin push tester (/admin/push-test/*)
EngagePOST /user-session/:_id/engage + /engage-status — on-demand live-visitor auto-trigger
CRM portschedulingRoutes.js (/scheduling/*), salesforceRoutes.js, jobberRoutes.js; migrationRoutes.js gains backfill-crm-links + crm-smoke. See CRM Integration
Nox confignoxConfigRoutes.js — catalog/read/apply/revert for settings-by-chat, permission-mirrored. See Nox Assistant
Nox tasksNoxActionUserController — create/edit/approve/cancel every ScheduledNoxAction kind; knoxBriefUserRoutes.js GET /knox/brief (mobile)
Webhooksapp/configs/webhookEvents.js catalogue + WebhookQueueService (BullMQ retries) — custom webhooks and Zapier share one dispatch. See Webhooks
PartnersPartnerApplicationController (POST /certification/apply, PARTNER_API_KEY), app/lib/partnerInvites.js, partnerApplicants.js, certificationSettings.js
OpsopsRoutes.js — Zij board, support tickets (incl. tenant POST /feedback, /support-tickets, agency /agency/client-tickets, public /public/tickets/:number), roadmap, announcements, /ops-worker/* local worker; gated by middlewares/opsAuth.js (OPS_ENABLED). See Ops workspace
Partner HubpartnerHubRoutes.js — /partner-hub/* (taskers, own JWT) + /admin/partner-hub/*. See Partner Hub
Admin teamadminTeamRoutes.js (/admin/team/*); section gate lib/adminSections.js. See Admin overview
MaintenanceadminMaintenanceRoutes.js — super-admin async wrappers (/admin/maintenance/* + GET /admin/maintenance/jobs/:job_id)
PopupspopupRoutes.js — GET /popups/active, POST /popups/:id/event (admin alert popups)
SettingsSettingController — settings collection; platform switches via lib/platformSwitch.js (1-minute cache)

Recent models worth knowing: CredentialModel (credentials — every tenant OAuth token/API key, only through CredentialVault; see Security & Secrets), CredentialKeyModel (key fingerprints), AdminAllowedIpModel (super-admin IP allowlist), Ops*Model (ops workspace), PartnerHub*Model, ProductUpdate*Model, PopupReceiptModel, VoicePreviewModel, ApiSubscriptionModel, SmsAgentMessageModel (per-send SMS-agent log; status: 'sent' only on a Twilio message SID), ScreenedCallModel (read-only here — ms-communication owns the collection and all writes; index definitions must stay byte-identical across both services or Mongo throws IndexOptionsConflict at boot), ScheduledNoxActionModel (now kind: 'ai_call' | 'sms'), and user.push_preferences (see Settings — Notifications).

Request and result bounds​

1f2a2cf30 (2026-09-16):

  • Bodies — express.json/urlencoded capped at 25 MB (was 1000 MB on a 2 Gi pod; one 300 MB POST peaked at 1.7 GB RSS and OOM-killed it). 25 MB is 2× the largest JSON body ever recorded. Uploads are separate: express-fileupload stays in the backend (100 MB, useTempFiles, flat RSS).
  • List results — core/http/validator.js clamps every limit rule to [1, MAX_LIST_LIMIT] (1000) whether omitted, oversized, zero or negative. 47 of 51 filter schemas were written limit: 'limit' (no :default), which parsed to NaN and meant "no limit" in processFilters/paginateArray — whole collections came back, and ?limit=-5 reached Mongo and 400'd. Controllers that used NaN as "caller sent nothing" read query_data.limit_defaulted instead (live sessions still default to 50). An override sets X-Result-Limit-Capped: 1 (exposed via CORS exposedHeaders); endpoints with their own documented default removeHeader it so dashboard polling doesn't warn every refetch. scripts/audit-unbounded-list-calls.js (local) lists remaining unbounded calls.
  • paginateArray now sorts before slicing (page 2 was never the second-best ten). GET /chats/ai-messages uses projection + lean + a company-scoped ai_conversations lookup (3.7–4.4 s → 0.6–0.9 s over 3000 chats).
  • Indexes added: ai_conversations {question_id} + {company_id} (it had none), chat_queues {company_id, created_at} + {chat_id}, users {online_status, online_status_at} for the 60 s offline sweep (50,025 docs examined → 52), companies go_high_level.location_id (every GHL native webhook resolves the tenant by location; declared after the 2026-09-17 ContactTagUpdate flood — it was created by hand in prod first).
  • Router — the dispatch scan's some() never returned true, so every request compared all ~1040 routes and a duplicate url+method would run every matching target; the closure now hands over its own route.
  • Server-Timing — when DEBUG is true (set in the PROD backend configmap), server-timing plus lib/dbTiming.js add db;dur=<ms>;desc="<n> queries" and db.slowest (duration + collection.op) to every response, via an AsyncLocalStorage tally around Query/Aggregate.exec (bd38a0dae, 5a3dd3401). Overlapping queries are summed, so db can exceed total. Use it to tell Mongo time from pod time on a slow endpoint.
  • Deleted POST /custom-event-recorded/create (no caller in any repo, unauthenticated, and session_id was concatenated into a filesystem path — a ../ probe wrote outside public/session-files/) and AuthController@logs (route long commented out).

Access control & audit​

Tenant scoping is enforced per controller, not by middleware. The 2026-10-14 sweep (6c7dd2a7b, 363b0070e; specs security-hardening.spec.js, security-sweep-access.spec.js):

  • Company gate — GeneralHelper.canManageCompanyId(user, company_id) (wraps canManageCompany: super-admin, owner/member of the owner, agency owner/staff of the company's agency). A failed check answers 404 Company not found, not 403. Now applied to active/all user sessions, user sessions by id, chat leads + chat store/update/show/messages/unread/end/transfer/delete, service rooms, AI leads, page rules, bookings, session files, AI conversation update, subscription store/active, agency cards, top agents, email-send, GTM, call-limit, company stats, Calendly slots-auth, FAQs, chatbots, user show, profile image, payment retry.
  • PUT /company/:id strips ADMIN_ONLY_COMPANY_FIELDS (ownership, agency link, billing/wallet, pause/archive, every *_allowed/*_enabled capability gate, playground, HubSpot sync stamps, …) and prototype-pollution keys for non-admins — each of those has its own route.
  • Public GET /get-user-session/:id returns only _id, company_id, is_blocked, lead_auto_connect_threshold_reached unless the bearer can manage the company — no visitor PII to the widget.
  • Public register / POST /user strip role and account links; the company index 403s role-less users; member delete is scoped to the caller's company.
  • Admin-only — package CRUD, agency conversion list/approve/reject, playground admin, error-log delete.
  • Secrets — the api_requests log drops credential headers (auth|cookie|token|secret|api-key|signature|password|session) and [redacted]s secret-looking body keys (lib/requestRedaction.js); ManyReach api_key is select:false and preserved on company saves; the Clearbit key moved to config (CLEARBIT_SECRET_KEY).
  • KnoxBriefUserController is now registered in container.js (GET /knox/brief was a 500).

Hardening rollout 2026-10-27 → 11-12 (see Security & Secrets): super-admin IP allowlist in passport and every sign-in path; user_type immutable and admins never created through the app; 401s from passport carry code: 'SESSION_INVALID' and auth DB errors answer a generic 503; user endpoints no longer leak other users' secrets; GET /chats find_session scoped to the caller's company; file deletes limited to files the caller owns; private file folders + signed links (lib/fileLink.js); public playground routes refuse non-string ids; self-serve joins to an existing agency need a verified email; tenant secrets in the credential vault; Zapier/Lead API keys hashed and shown once.

Audit trail — lib/auditLog.js is a schema plugin on 39 models that records who created/updated/deleted a record, with a redacted field-level diff, into audit_logs (180-day TTL). Passport enters an AsyncLocalStorage actor context; jobs/webhooks/api-key routes log as system. When you add a model that admins or tenants edit, add the plugin and list its machine-written fields in ignore. See Audit Trail.

Scheduler & cron​

Cron runs on a dedicated scheduler pod (SERVICE_CRON=true). Since 3d508d45d CronMonitor also takes a per-minute Redis claim (cron:claim:<job>:<minute>, SET NX EX 120) before every firing and manual trigger, so only one schedular replica runs it; it fails open without Redis. It is a claim, not a run lock — a run that outlives its next firing can still overlap on another replica. SchedulerService registers node-cron jobs wrapped by CronMonitor (Redis-backed history at /admin/cron).

Staggered, wall-clock firing (c566fd28f, 2026-10-26): ScheduleRunner gives every interval job a fixed offset inside its interval (ScheduleRunner.offsetFor(className, interval) — a hash, stable across restarts and pods) and fires it when its wall-clock slot changes rather than by counting ticks. Same cadence per job, but no more 60+ jobs starting in the same second, dropped node-cron ticks don't drift a job, and a long outage yields one run, not a burst. CronMonitor's claim slot is centred on the job's offset. Expect a "15-minute" job to run at e.g. :07/:22/:37/:52, not :00/:15.

Representative jobs:

CadenceJobs (examples)
1 minActiveSessionJob, UserOnlineStatusJob, OutboundCallGhlSyncJob, PostCallWebhookFallbackJob, BalanceAutoRechargeJob (wallet top-up), PlatformCallCompletedWatcherJob (platform-webhook call-completed events), GhlCallNotePostJob, ScheduledNoxActionEnqueueJob (queues due scheduled calls/SMS for exact-time firing)
2 minSimproInvoiceChaseJob, TapiPollJob
5 minFactExtractionTriggerJob, AiCallGhlTranscriptSyncJob, MsAiHandoffSweeperJob, GhlCallRecordingAttachJob
10 minDailyBriefEmailJob, SubscriptionExpireJob, SubscriptionSuspensionJob, FunnelSweepJob
5 minPartnerHubOutreachJob, PartnerHubTaskNoticeJob (also PartnerHubClaimExpiryJob every 1 min, PartnerHubAgentsJob every 10 min)
15 minRecordingBackfillSweeperJob (rescue sweep — backfills failed ms-sessions handoffs), RecordingRetentionJob, ConversationPurgeJob, ArchivedAccountDeletionJob, PartnerHubLiveCheckJob
1 min (admin-switched)ArchiveEmptyChatsJob (Admin → Settings → Empty Chat Archiving), SupportInboxJob (only when SUPPORT_IMAP_HOST is set)
HourlySalesRepliesMailboxFeeJob (Nox business-mailbox connection fee), SupportAutoCloseJob, AgentKUsageEmitJob (provider usage → ms-ai cost-tracking), AgentKDailyPushJob (daily GHL push), AgentKSequenceJob (Mode B sends), AgentKLinkedInRenewalJob (idempotent per period), FunnelDailyStatsJob
DailyKnoxBaselineMetricsJob (02:00), KnoxGhlSyncJob (03:00), FunnelDormancyJob (04:00), NoxFunnelReconcileJob (04:30), FunnelBackfillJob (05:00)
MonthlyAppSumoWalletJob (5 0 1 * * — each active AppSumo license's tier dollars into its agency or company wallet, idempotent per month)

Cron runs in the schedular deployment, not the API pods — it has its own configmap (Apps/PROD/schedular/configmap.yaml); provider API keys must exist in both configmaps or cron feeders silently break. Its livenessProbe is the DB-aware GET /healthz/db, backed by the MongoService watchdog and a CronMonitor DB-fatal streak that exit the process on a stuck driver pool — see Observability › Backend MongoDB self-healing.

Recent cron fixes:

  • FactExtractionTriggerJob (6841de3b5) — both chats queries hit the 45 s socket timeout every 5-minute run, leaving ~8M-doc scans running server-side (pending is the default state, so the plain state index matched every chat). Partial index fact_extraction_sweep_v1 on chats (superseded by v2, below) and service_rooms, a date floor on the opted-out retire updateMany, and maxTimeMS 30 s on all three queries.
  • Empty visit chats (abba5cf9e, 2026-10-14) — every website visit creates an empty chat that sits at fact_extraction_state: 'pending' / transcript_email_sent: false forever (>1M pending vs ~7k with a message in prod). Both sweeps now run on partial indexes holding only chats with a message — fact_extraction_sweep_v2 and transcript_email_sweep_v4 ({last_message_at, created_at}; ms-communication declares the same v4, ed2f23c) — repeat the last_message_at > HAS_MESSAGE_FLOOR term and hint the index (118 s → 39 ms, 13–37 s → 49 ms). Fact extraction idles on quiet-since-last-message with a 7-day window; opted-out chats resolve in _processChat instead of a collection-wide updateMany; the transcript sweep uses find+hint instead of distinct. Older index versions are dropped by hand.
  • 04:00 UTC Mongo CPU spike (3d508d45d/ac803c647) — DailyRecapEmailJob now spreads sends over 17:00–18:59 local (company_id hash mod 120 min) so every NZ tenant isn't due on the same tick, projects only the fields the email reads, and skips companies without widget_installed. FunnelDormancyJob matches flags.reactivation_candidate $in [false, null] on a new funnel_contacts index, writes flags + audit rows in batches (NoxFunnelAuditService.logMany), and drops a contact at most one stage per run (5.2 s → 0.55 s Mongo CPU locally).
  • RecordingBackfillSweeperJob / MsAiHandoffSweeperJob (60118219c) — see Session Recording › Sweepers.
  • AgentKLinkedInRenewalJob.run() takes an injectable now (tests only; every production caller passes no args).

Retired this window: ReportingEmailJob is unscheduled (replaced by the Nox daily brief) and GhlTipsEmailJob is stopped (both commented out in SchedulerService).

External integrations​

GoHighLevel (GoHighLevelService.js, ~61 KB — the biggest integration), HubSpot, Slack, Twilio, ElevenLabs, Firebase (FCM), AWS (S3/CloudFront/ACM), Azure CDN, Stripe, Xero, Simpro, Tapi (IMAP work-order emails), Snitcher/Apollo/Clearbit (enrichment; HappierLeads removed 2026-09-09), Salesforce, Jobber, Calendly, Dualhook (WhatsApp), Rb2b. Each lives in app/services/<Name>Service.js with config under app/configs/. See CRM Integration for the sync mechanics.

Realtime​

SocketService creates the Socket.IO server with a Redis adapter (in-memory fallback for single-pod dev). Session→socket mappings live in Redis (session_sockets:, 24h TTL); heartbeat writes are throttled via heartbeat_status: (5m TTL). Events drive live dashboards, call status, typing indicators, and agent availability. user-status-update (login/logout/socket connect) goes only to the user's company room and user:<id> room (f103726be) — it used to be broadcast to every connected client platform-wide. Every widget socket handshake also feeds personResolver.trackSessionIp() for mid-session IP changes.

Room auth (6c7dd2a7b): an io.use middleware (SocketService.authorizeSocket) resolves what a socket may join. The company room and user:<id> room require a valid user JWT in handshake.auth.token (the frontend sends it on every (re)connect) whose user canManageCompany the company_id in the query; a widget socket (no token) joins its own session room plus the public widget:<company_id> room, which only ever carries company-settings-updated. socket.data.session_company_id is the visitor session's real company — online-session/offline-session/heartbeat status go to that, never to a client-supplied company_id. Dashboard relays (stop-live-session, update-live-session) only work from an authorized dashboard socket, and stop-live-session checks the session belongs to its company. The /custom-event/create relay was removed. ms-communication and ms-sessions enforce the same rule (see Cross-service communication).

State pushes (RealtimeHelper, b060de28d): id-only pings that make open dashboards refetch — wallet-updated (every credit-ledger row via AICreditAuditHelper.record, agency-paid client top-ups, certification/admin grants) and company-settings-updated (Stripe webhooks, Connect client subscription updates, subscription/trial expiry crons, admin agency edits, and the notifyCompanyChanged middleware on admin feature toggles and agency client-billing routes). Company events go to the company room (settings also to widget:<id>); agencies have no room, so agency events go to the owner's and each staff user's user:<id> room. Best-effort, never throws.

Config & deployment​

  • Key env: MS_AI_URL / MS_SESSION_URL / MS_COMMUNICATION_URL, MS_AI_SECRET_TOKEN, MS_COMM_API_KEY (backend → ms-communication), CRON_ENABLED/SERVICE_CRON, FILE_STORAGE, DB_*, plus per-integration credentials. Observability via BUGSINK_DSN (Sentry) and Winston. Added 2026-09 (backend and schedular configmaps): IP_HASH_SECRET (identity-graph IP HMAC — changing it orphans every ip_hash), ORIGAMI_API_KEY, WHITE_LABEL_PORTAL_URL (portal host for white-label mail/playground links); STRIPE_CONNECT_APPLICATION_FEE_PERCENT is in the backend secret only. Watchdog knobs: MONGO_WATCHDOG_*, CRON_DB_FATAL_EXIT*, HEALTHZ_DB_TIMEOUT_MS (all defaulted). Added 2026-10 (backend and schedular): GO_HIGH_LEVEL_V2_SSO_KEY (decrypts the GHL marketplace Custom Page SSO payload — configs/goHighLevel.js sso_key), HUBSPOT_CLIENT_ID (configmap) + HUBSPOT_CLIENT_SECRET (sops secret) for the tenant HubSpot app. CLEARBIT_SECRET_KEY overrides the in-code default. Added 2026-11: SECRET_ENCRYPTION_KEYS / SECRET_ENCRYPTION_KEY_CURRENT (keyring, legacy SECRET_ENCRYPTION_KEY = v1 — identical in backend and schedular), FILE_LINK_SECRET, PARTNER_HUB_TOKEN, OPS_VIDEO_WORKER_KEY, OPS_ENABLED, SUPPORT_IMAP_*, PRODUCT_UPDATES_*, WP_CHANGELOG_*, POSTMARK_WEBHOOK_*, SERVICE_VIDEO (true only on the video-worker pod — see Deployment). Several env switches moved to Admin → Settings → Feature Flags (settings collection): OPS_AGENCY_CLIENT_TICKETS, NOX_QUALITY_ENABLED, NOX_VOICE_SERVER_REPORTS.
  • Integration env (backend and schedular unless noted; none has a usable default, so an unset integration stays off / returns 503): SERVICEM8_CLIENT_ID / SERVICEM8_CLIENT_SECRET / SERVICEM8_REDIRECT_URI (falls back to BASE_URL + /servicem8/install; also SERVICEM8_SCOPES, SERVICEM8_OAUTH_HOST, SERVICEM8_API_BASE, SERVICEM8_HANDSHAKE_TTL); PRACSUITE_VENDOR_KEY (our vendor x-api-key) with PRACSUITE_REQUEST_TIMEOUT_MS (30000), PRACSUITE_RATE_LIMIT_MAX / PRACSUITE_RATE_LIMIT_WINDOW_MS (4 per 1000 ms — the 5/s vendor limit is shared by every clinic), PRACSUITE_SYNC_INTERVAL_MINUTES (30); MICROSOFT_CLIENT_ID / MICROSOFT_CLIENT_SECRET / MICROSOFT_REDIRECT_URI (Outlook Calendar; CalendarSyncJob refreshes from the schedular); CALCOM_API_BASE (defaults https://api.cal.com/v2; the Cal.com key is per tenant, in the vault); SLACK_CLIENT_ID (configmap) / SLACK_CLIENT_SECRET (secret) — no longer defaulted in code (c583ea511); APPSUMO_API_KEY / APPSUMO_CLIENT_SECRET (backend secret only — configs/appsumo.js, plus defaulted APPSUMO_* plan knobs). As of 2026-11-16 prod flux sets only the Slack and AppSumo ones; ServiceM8, PracSuite and Outlook stay off in prod until theirs are added.
  • EKS: backend-deployment.yaml (4 replicas, 8–12 Gi mem), separate schedular-deployment.yaml (1 replica; the CronMonitor claim makes extra replicas safe), backend-service.yaml (ClusterIP). Config via backend-cm ConfigMap. Namespace kk-ns-prod.
  • CI: buildspec.yml builds the image, pushes to ECR, and kubectl rollout restarts the deployments. See CI/CD.