Production-ready AI SaaS dashboard consisting of:
- Frontend: React 18 + Vite + Tailwind (JWT auth, route guards, AI workspace UI)
- Backend: Django 5 + DRF + SimpleJWT (REST API, token/credit accounting layer, role/team management)
Add your deployed URL here (optional)
- React app with dark mode + persistent theme
- JWT authentication scaffolding (access/refresh tokens stored in
localStorage) - Protected routes (optionally role-gated)
- AI Workspace UI with tool-specific pages/actions
- Consistent reusable UI components (buttons, cards, modals, tables, toasts)
- JWT auth using
djangorestframework-simplejwt - OpenAPI docs via
drf-spectacular - Modular API apps:
users(register/profile/change-password)projects(project/workspace resources)ai_module(AI prompt execution + credit deduction)dashboard(aggregated metrics)notifications(notification feed)teams(team administration)
- Production hardening basics: CORS support, rate throttling, WhiteNoise static handling
- Frontend: React 18, Vite, Tailwind CSS, axios, React Router, recharts
- Backend: Django 5, Django REST Framework, SimpleJWT, PostgreSQL, Redis, drf-spectacular, Gunicorn, Whitenoise
- Deployment: Docker + optional Render IaC (
render.yamlincluded in backend folder)
.
├── ai-saas-dashboard-frontend/
│ └── ai-saas-dashboard-frontend/
│ └── src/ # React app
│
└── nexus-ai-django-backend-production/
└── backend/
├── apps/ # users/projects/ai_module/dashboard/notifications/teams
├── core/ # settings, urls
├── docker-compose.yml # PostgreSQL + Redis stack
├── Dockerfile
├── render.yaml
├── requirements.txt
└── nexus_ai_postman_collection.json
- Node.js (for frontend)
- Docker (recommended for backend)
- (Optional) Python tooling if running backend outside Docker
cd nexus-ai-django-backend-production/backend
# Start Postgres + Redis + Django container
docker-compose up --build -d
# Run migrations
docker-compose exec web python manage.py migrate
# Create an admin user
docker-compose exec web python manage.py createsuperuserBackend will run on: http://localhost:8000
API docs:
- Swagger UI:
http://localhost:8000/api/docs/ - ReDoc:
http://localhost:8000/api/redoc/
cd ai-saas-dashboard-frontend/ai-saas-dashboard-frontend
npm install
npm run devFrontend will run on: http://localhost:5173
In development, the frontend proxies calls to /api/* to the Django backend (vite.config.js). Ensure your backend is running on port 8000.
The frontend stores:
- Access token in
localStoragekey:cortex-access-token - Refresh token in
localStoragekey:cortex-refresh-token
On 401, the app attempts refresh-once flow using:
POST /api/v1/users/token/refresh/
If refresh fails, the user is redirected to /login.
A Postman collection is included:
nexus-ai-django-backend-production/backend/nexus_ai_postman_collection.json
Import it into Postman to explore endpoints quickly.
Backend is containerized using:
Dockerfiledocker-compose.yml(for local stack)
A render.yaml blueprint is included in the backend folder, enabling Render to deploy the Docker service.
- CORS errors: ensure backend CORS settings allow your frontend origin (CORS is configured in Django settings).
- 401 loops: confirm refresh token endpoint is reachable and the backend JWT lifetimes match expectations.
- Frontend can’t reach backend: ensure backend is running on
localhost:8000(or update Vite proxy / API base URL).
Add license information here (MIT/Apache/etc.)