Neo Academy Django and Next.js MVP
Neo Academy is now scaffolded as an isolated Django backend and Next.js frontend. The backend owns courses, enrollments, progress, Razorpay orders, certificate issuance, certificate verification, and the Django admin panel. The frontend owns learner-facing pages at /academy/.
Services
academy/backend: Django app with SQLite storage, Django admin, token auth, course APIs, Razorpay order creation, payment verification, progress, certificates, and admin metrics.
academy/frontend: Next.js App Router UI for catalog, course detail, learner account, admin dashboard, and certificate verification.
website/nginx.conf: routes /academy/ to Next.js and /api/auth/, /api/academy/, and /api/payments/ to Django.
Environment
| Name | Purpose |
DJANGO_SECRET_KEY | Required Django signing and security secret. |
DJANGO_ALLOWED_HOSTS | Comma-separated host allowlist for Django. |
DJANGO_CSRF_TRUSTED_ORIGINS | Trusted HTTPS origins for admin and browser requests. |
POSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORD | PostgreSQL database name, app user, and password for Django. |
POSTGRES_HOST_PORT | Local-only Compose port for backend validation, defaulting to 55432. |
RAZORPAY_KEY_ID | Public Razorpay key identifier used by payment order creation. |
RAZORPAY_KEY_SECRET | Secret key used by the backend to create and verify Razorpay payments. |
NEXT_PUBLIC_API_BASE | Server-side Next.js API base, defaulting to http://academy-backend:8000/api. |
NEXT_PUBLIC_BROWSER_API_BASE | Browser API base, defaulting to same-origin /api. |
API Surface
| Route | Use |
POST /api/auth/register, POST /api/auth/login, GET /api/auth/me | Learner account token flow. |
GET /api/academy/courses, GET /api/academy/courses/:slug | Published course catalog and details. |
POST /api/academy/courses/:slug/enroll, POST /api/academy/courses/:slug/progress | Enrollment and progress tracking. |
POST /api/payments/razorpay/orders, POST /api/payments/razorpay/verify | Razorpay order and signature verification flow. |
POST /api/academy/courses/:slug/certificate, GET /api/academy/certificates/:id | Certificate issuance and public verification. |
GET /api/academy/admin/dashboard | Staff-only metrics for the frontend admin dashboard. |
Validation
cd academy/backend && uv sync
docker compose up -d academy-postgres
cd academy/backend && set -a && . ../../.env && set +a && POSTGRES_HOST=127.0.0.1 POSTGRES_PORT=${POSTGRES_HOST_PORT:-55432} uv run python manage.py test
cd academy/frontend && npm install && npm run build
docker compose config