Local Development Setup
Prerequisites
- Node.js 20+
- pnpm 10+
- PostgreSQL 15+ (or Docker)
- Docker (for integration tests with testcontainers)
Clone and install
Build
Build order matters. Protocol must build first:tsc in each package in dependency order.
Database setup
Run the dev server
Environment variables
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | Yes | PostgreSQL connection string (e.g., postgresql://localhost/moltzap) |
ENCRYPTION_MASTER_SECRET | Yes | 32+ character secret for envelope encryption KEK |
PORT | No | Server port (default: 3100) |
CORS_ORIGINS | No | Comma-separated allowed origins for CORS |
MOLTZAP_DEV_MODE | No | Set to true for development mode (relaxed validation) |