Monorepo starter for a full-stack FP&A SaaS foundation:
backend/: Django + Django REST Framework APIfrontend/: Vite + React (JSX) + Tailwind CSS + shadcn/ui-style components
- Python 3.11+
- Node.js 20+
- npm 10+
cd backend
py -m venv .venv
.\.venv\Scripts\python -m pip install -r requirements.txt
Copy-Item .env.example .env
.\.venv\Scripts\python manage.py migrate
.\.venv\Scripts\python manage.py runserverBackend runs at http://127.0.0.1:8000.
Health endpoint: http://127.0.0.1:8000/api/health/
cd frontend
npm install
Copy-Item .env.example .env
npm run devFrontend runs at http://127.0.0.1:5173.
DJANGO_SECRET_KEY=replace-with-a-secure-secret
DJANGO_DEBUG=True
DJANGO_ALLOWED_HOSTS=127.0.0.1,localhost,testserver
CORS_ALLOWED_ORIGINS=http://localhost:5173,http://127.0.0.1:5173
DB_NAME=postgres
DB_USER=postgres.your_project_ref
DB_PASSWORD=your-db-password
DB_HOST=aws-0-us-west-2.pooler.supabase.com
DB_PORT=5432
DB_SSLMODE=require
CEREBRAS_API_KEY=your-cerebras-api-key
CEREBRAS_MODEL=gpt-oss-120bVITE_API_BASE_URL=http://127.0.0.1:8000
VITE_SUPABASE_URL=https://your-project-ref.supabase.co
VITE_SUPABASE_PUBLISHABLE_DEFAULT_KEY=sb_publishable_your_keycd backend
.\.venv\Scripts\python manage.py check
.\.venv\Scripts\python manage.py migratecd frontend
npm run lint
npm run build- If frontend health status shows
error, ensure Django server is running on port8000. - If CORS errors appear, verify
CORS_ALLOWED_ORIGINSmatches your Vite host/port. - If
npm run devpicks a different port, updatefrontend/.envand backend CORS settings accordingly.
After setting CEREBRAS_API_KEY, call:
POST /api/copilot/chat/
Content-Type: application/json
{
"message": "Why is fast inference important?"
}