Admin dashboard for the ClassLens attendance system. This Next.js app lets admins manage teachers, students, subjects, enrollments, and run a staging sync that updates live attendance data.
- Admin authentication and dashboard navigation
- CRUD for teachers, students, subjects, enrollments, and subject-to-department mapping
- Bulk upload (CSV/Excel) with templates and row-level error display
- One-click staging sync to push
DatabaseAdminApp_*data intoHome_*
- Next.js (App Router)
- React 18
- Tailwind CSS
- Node.js 18+
- pnpm (recommended) or npm
-
Install dependencies:
pnpm install
-
Create
.env.local:NEXT_PUBLIC_BACKEND_URL=http://127.0.0.1:8000
-
Start the dev server:
pnpm dev
The bulk upload dialog accepts CSV or Excel. Excel files are converted to CSV in the browser before upload.
Use the in-app template downloads to get the latest required columns for each upload type.
The Sync button on the Overview page calls:
POST /api/admin/sync/staging/
This endpoint should process the latest staging data and update the live attendance data.
- Use
127.0.0.1instead oflocalhoston Windows to avoid IPv6 resolution issues. - If your backend serves Excel templates, the download links are expected under:
/api/admin/{entity}/download_template/
pnpm dev- Run dev serverpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Lint