Architecture
Tech Stack
Every technology in the Emofy Platform and what it is used for.
A single reference for what runs where. For how the pieces connect, see the
Architecture overview.
| Technology | Used for |
|---|
| TypeScript | Everything — strict mode; prefer unknown over any. |
| Node.js 22 | Runtime for the backend and Next.js apps. |
| pnpm 10 + Turborepo | Monorepo package management and cached builds. |
| Technology | Used for |
|---|
| NestJS 11 | The REST API framework; modules, guards, interceptors, DI. |
| Drizzle ORM | Type-safe Postgres access; schema SSOT in @emofy/db. |
| PostgreSQL | Primary datastore — dual database (auth + core) + partitioned audit. |
| Redis | Cache and rate-limit buckets; backing store for queues. |
| BullMQ | Durable background jobs (notifications, email, webhooks). |
| Convex | Real-time backend for messaging and presence. |
| Meilisearch | Full-text search across feed, messages, and tasks. |
| Passport (JWT) | JWT verification strategy in front of Better Auth tokens. |
| Technology | Used for |
|---|
| Next.js 16 | The web apps (account, admin, consumer, docs, marketing, landing). |
| React | UI layer across web and (via React Native) native. |
| Expo 54 / React Native | The mobile app (native), currently demo-stage. |
| Tailwind CSS | Styling, driven by design tokens. |
| Fumadocs | This documentation site. |
| Scalar | Interactive OpenAPI reference rendering. |
| Technology | Used for |
|---|
| Better Auth 1.6.x | Sessions, RS256 JWT, 2FA, magic link, organization plugin. |
| JWKS (RS256) | Public-key JWT verification; consumed by backend and Convex. |
| Package | Used for |
|---|
@emofy/tokens | Color / spacing / typography / motion token SSOT. |
@emofy/rds | Low-level UI primitives (Ramarkable Design System). |
@emofy/ramarkable | High-level components, the EMA shell, page templates. |
| Technology | Used for |
|---|
| Cloudflare R2 | Immutable EMA bundle hosting + email/brand assets. |
| S3 | Organization file uploads. |
| Technology | Used for |
|---|
| Railway | Backend hosting (GHCR Docker image; environments dev / staging / main). |
| Vercel | Frontend hosting (account, admin, consumer, docs, marketing). |
| OpenTofu | Infrastructure as code — Railway + Vercel project wiring. |
| Infisical | Secret SSOT; synced to deploy targets. |
| GitHub Actions | CI (typecheck, lint, test) and deploy.yml image build/push. |
| Sentry | Error tracking (5xx capture). |
| Pino | Structured logging. |
| Package | Used for |
|---|
@emofy/email (React Email + Resend) | Transactional email templates (EN / TR). |