Technology Stack

📦v1.0.0📅2026-04-28🔄Updated 2026-04-28👤Admin Team
conceptsplatform-overviewmessage-centertechnologyarchitecturenextjsmongodb

Technology Stack

This page is for technically inclined evaluators — architects, CTOs, and developers assessing whether Message Center integrates with your infrastructure.


Overview

Message Center is a Next.js 14 backend-for-frontend (BFF) that owns multi-tenancy, identity, and moderation. It talks to the SMS Gateway (Core) via a stateless mTLS connection. All tenant state — workspaces, memberships, campaigns, audit logs — lives in MongoDB.

Browser ──── HTTPS ────▶ Message Center (Next.js BFF)
                                │
                    mTLS client cert
                                │
                         ┌──────▼──────┐
                         │  SMPP Proxy │  ← mTLS server cert
                         └──────┬──────┘
                                │ internal
                         ┌──────▼──────┐
                         │  SMS Core   │  ← stateless job engine
                         └─────────────┘

Runtime

ComponentTechnology
Web frameworkNext.js 14 (App Router, TypeScript)
RuntimeNode.js 20+
Package managerYarn 1.x

Next.js App Router provides both the web UI (React Server Components) and the BFF API routes — no separate Express server needed.


Data Layer

ComponentTechnology
Primary databaseMongoDB 6+ (raw mongodb driver — no Mongoose)
Schema validationZod (runtime validation at DAO boundary)
MigrationsCustom incremental migration runner (9 migrations, v1–v9)
Query safetycursor.maxTimeMS on all reads; chunkedFindIn for large $in arrays

MongoDB is Message Center's only persistent store. Redis, PostgreSQL, and other databases are not required.


Authentication & Security

ComponentTechnology
User authenticationnext-auth v4 (Credentials provider)
Password hashingbcryptjs (cost factor 12)
SessionHTTP-only JWT cookie (8h default)
Service-to-gateway authmTLS mutual certificate authentication
Gateway JWTSingleton cached in process memory with auto-refresh
CSPStrict Content-Security-Policy enforced via Next.js middleware

User sessions and gateway credentials are completely independent — user JWTs never reach the SMS Gateway.


HTTP & Networking

ComponentTechnology
Gateway HTTP clientundici (Node.js native HTTP/1.1 client)
Connection poolTwo undici Agent instances — regular (60s timeout) and upload (30min)
mTLSClient certificates presented per-connection; hot-reload via file mtime check
File streamingManual multipart body via async generator (O(chunk) heap, not O(file))

The separate upload agent (30-minute timeout) prevents large file transfers from sharing connection budget with regular API calls.


Frontend

ComponentTechnology
UI componentsshadcn/ui (Radix UI primitives + Tailwind)
StylingTailwind CSS 3
State managementTanStack Query v5 (server state), Zustand (UI state)
Internationalizationnext-intl (Russian default, English fallback)
IconsLucide React
ThemeLight-only (dark mode not implemented)

Observability

ComponentTechnology
Log sentinelsStructured log lines: [core-slow], [core-large], [audit-fallback]
Metrics dashboardGrafana (embedded iframe in monitoring tab)
Audit diagnosticsGET /api/diagnostics/audit (fallback file size, TTL index status)

Code Generation

Core's REST API is consumed via OpenAPI codegen (orval). The generator produces TypeScript types and TanStack Query hooks from openapi/core.yaml. Types are used throughout the BFF; generated hooks are used only for non-workspace-scoped operations.


Minimum Requirements

ResourceMinimum
Node.js20+
MongoDB6.0+ replica set or standalone
RAM256 MB (idle), 512 MB (recommended)
Disk (temp)2× maximum recipient file size
CPU1 vCPU (4 recommended for high concurrency)

Next Steps