Setup & Configuration
Setup & Configuration
Environment Variables
After installation, you need to configure environment variables. Copy the example file:
cp env.example .env.local
Required Variables
Database
DATABASE_URL- PostgreSQL connection stringDATABASE_URL_NON_POOLING- Direct database connection (for migrations)
Authentication
AUTH0_SECRET- Secret for Auth0 session encryptionAUTH0_BASE_URL- Base URL of your applicationAUTH0_ISSUER_BASE_URL- Auth0 domain (e.g., https://your-domain.auth0.com)AUTH0_CLIENT_ID- Auth0 application client IDAUTH0_CLIENT_SECRET- Auth0 application client secret
API
API_URL- Backend API URLNODE_ENV- Environment (development, production, test)
Optional
REDIS_URL- Redis connection string (for caching)GOOGLE_GEMINI_API_KEY- For AI curriculum generation
Database Setup
Run Migrations
cd apps/api
pnpm prisma migrate dev
Seed Database
pnpm prisma db seed
Development Setup
Start All Services
# Using Docker (recommended)
make docker-up
pnpm dev
# Without Docker
# Make sure PostgreSQL and Redis are running
pnpm dev
Start Individual Services
# Backend API
cd apps/api && pnpm dev
# Parent Web App
cd apps/parent-web && pnpm dev
# Teacher Web App
cd apps/teacher-web && pnpm dev
Production Setup
See the Deployment Guide for production setup instructions.