How rod-devv/school-dashboard works
This is a Next.js school-management dashboard for administrators, teachers, students, and parents. Users sign in, receive role-scoped access, and use dashboards or entity lists to review school records; list pages query Prisma-backed data and provide search, pagination, and available record actions. Separate UI branches cover schedules, announcements, and visual summaries. The README documents broader school entities and chart capabilities; unsampled implementations are represented at their existing directories. Edges reflect excerpted imports/calls or README statements; unsampled wiring is not inferred.
Main entry points: list School record lists · (dashboard) Role dashboards · BigCalender.tsx Calendar views · settings.ts Access and paging settings
Components 20
Access and roles
- Sign-in page
src/app/[[...sign-in]]/page.tsx - Role access checks
src/middleware.ts - Access and paging settings
src/lib/settings.ts
School operations
- Role dashboards
src/app/(dashboard) - School record lists
src/app/(dashboard)/list - Student and teacher details
src/app/(dashboard)/list/students/[id]/page.tsx - Record forms
src/components/forms
Shared interface
- Form modal
src/components/FormModal.tsx - Record table
src/components/Table.tsx - Table search
src/components/TableSearch.tsx - Pagination
src/components/Pagination.tsx
Dashboards and schedules
- Admin overview
src/app/(dashboard)/admin/page.tsx - Dashboard charts
src/components/AttendanceChart.tsx - Calendar views
src/components/BigCalender.tsx - Announcements display
src/components/Announcements.tsx
Data access
- Sample school data
src/lib/data.ts - Prisma client
src/lib/prisma.ts - PostgreSQL database
Other components
- School user
- Clerk authentication
Connections 20
- School user → Sign-in page: signs in
- Sign-in page → Clerk authentication: authenticates with
- School user → Role dashboards: uses role views
- Role access checks → Access and paging settings: checks route roles
src/middleware.ts - Role dashboards → Admin overview: includes
- Admin overview → Dashboard charts: renders
src/app/(dashboard)/admin/page.tsx - Role dashboards → Calendar views: renders
src/app/(dashboard)/student/page.tsx - Role dashboards → Announcements display: renders
src/app/(dashboard)/parent/page.tsx - Student and teacher details → Calendar views: renders
src/app/(dashboard)/list/students/[id]/page.tsx - Student and teacher details → Announcements display: renders
src/app/(dashboard)/list/students/[id]/page.tsx - Calendar views → Sample school data: reads schedule data
src/components/BigCalender.tsx - School record lists → Prisma client: queries records
src/app/(dashboard)/list/assignments/page.tsx - Prisma client → PostgreSQL database: reads and writes
- School record lists → Record table: renders rows
src/app/(dashboard)/list/assignments/page.tsx - School record lists → Table search: renders search
src/app/(dashboard)/list/assignments/page.tsx - School record lists → Pagination: renders paging
src/app/(dashboard)/list/assignments/page.tsx - School record lists → Form modal: opens record actions
src/app/(dashboard)/list/assignments/page.tsx - Form modal → Record forms: loads student and teacher forms
src/components/FormModal.tsx - Pagination → Access and paging settings: uses page size
src/components/Pagination.tsx - School record lists → Access and paging settings: uses page size
src/app/(dashboard)/list/assignments/page.tsx