Prerequisites
Before running or self-hosting Magic Core, get the following in place.
Runtime & tooling
| Tool | Version | Notes |
|---|---|---|
| Node.js | 22 (also runs on 20) | Your system Node may be too old — nest build breaks on Node 16. Use nvm. |
| pnpm | 9 (pnpm@9.15.9) | Get it via corepack enable; matches the packageManager field. |
| Docker | any recent version | For local Postgres + Redis (docker compose up -d). |
The repo’s .npmrc sets node-linker=hoisted (flat node_modules) deliberately — it lets migrated code resolve transitive deps without re-declaring them. Don’t change it.
Infrastructure
| Component | Used for | Who needs it |
|---|---|---|
| PostgreSQL | primary database (via Prisma) | platform-api, agent-service |
| Redis | rate limiting, cache, interview sessions, token budget | platform-api, agent-service |
For local development the bundled docker-compose.yml brings up Postgres + Redis (the apps themselves run via pnpm, not in containers).
External services
- Clerk — authentication (session JWT + user directory). Both platform-api and agent-service need
CLERK_SECRET_KEY. - LLM provider — any OpenAI-compatible endpoint (
OPENAI_API_KEY+ optionalLLM_BASE_URL). Optional: without it some AI features are unavailable, but the service still boots. - Resend (optional) — notification emails (
RESEND_API_KEY).
Next: Configuration lists every variable.
Last updated on