Appearance
Getting Started
Welcome to the Cora Backend — a Turbo + pnpm monorepo powering the AI-SDR platform.
Prerequisites
| Tool | Version |
|---|---|
| Node.js | >= 22.14.0 |
| pnpm | >= 10.11.1 |
| MongoDB | Atlas cluster or local instance |
| Redis | v7+ (for BullMQ queues) |
Installation
bash
# 1. Clone the repo
git clone <repository-url> cora-backend
cd cora-backend
# 2. Install dependencies (also runs pnpm lint:ws && pnpm db:generate via postinstall)
pnpm install
# 3. Copy and fill in environment variables
cp .env.example .env
# 4. Push database schema to MongoDB
pnpm db:pushProject Structure
.
├── apps/
│ ├── app/ # Main API Gateway (Express + oRPC, port 3000)
│ ├── worker/ # Background job processor (BullMQ, port 3007)
│ ├── cloudwatch/ # Logging + metrics service (port 3003)
│ └── api-docs/ # This documentation site (port 8090)
├── packages/
│ ├── db/ # Prisma schema + generated client + Zod types
│ ├── auth/ # Better-Auth config, RBAC, email templates
│ ├── lib/ # Core business logic (campaigns, leads, email, etc.)
│ └── shared/ # Express middleware, logger, env validation
├── turbo.json
├── pnpm-workspace.yaml
└── sst.config.ts # AWS infrastructure (ECS/Fargate)Development
bash
# Start all services
pnpm dev
# Start a single service
pnpm --filter @ce-sdr/app dev
pnpm --filter @ce-sdr/worker devAvailable Scripts
| Script | Description |
|---|---|
pnpm dev | Start all services in watch mode |
pnpm build | Build all packages and apps |
pnpm typecheck | TypeScript type check across all packages |
pnpm format | Biome formatting check (read-only) |
pnpm format:fix | Auto-fix formatting with Biome |
pnpm lint:ws | Workspace health check (sherif) |
pnpm test | Run unit tests (Vitest) |
pnpm test:e2e | Run E2E test suites |
Database
bash
pnpm db:generate # Re-generate Prisma client + Zod types (after schema changes)
pnpm db:push # Sync schema to MongoDB
pnpm db:seed # Seed with initial data
pnpm db:studio # Open Prisma StudioDeployment
See Infrastructure for the full GitHub Actions + SST + AWS ECS deployment guide.