How aksofttech/school-erp-frontend works
School ERP Frontend is a Next.js, role-based interface for school administration and school-community users. The user journey begins with authentication, proceeds through role-aware route protection and dashboards, then exposes academic, operational, or student/parent workflows; super-admins manage schools and platform services. Domain screens use a centralized service/API layer to communicate with the backend. The README documents the broad role-based capabilities; individual unsampled page-to-module links are not inferred, and the graph shows only relationships supported by the supplied excerpts, source index, or README.
Main entry points: role-config.ts Role routing · admin Admin portal · RoleGuard.tsx Role guard · super-admin Super-admin portal
Components 21
Identity & Access
- Sign in and register
pages/auth - Authentication state
contexts/AuthContext.tsx - Authentication service
services/auth.service.ts - Authentication guard
components/guards/AuthGuard.tsx - Role guard
components/guards/RoleGuard.tsx - Role routing
utils/role-config.ts
School Operations
- Admin portal
pages/admin - Academic management
modules/admin/academic - Transport routes
modules/admin/transport/routes/TransportRoutes.tsx - School operations
pages/admin
School Community
- Teacher portal
pages/teacher - Student portal
pages/student - Parent portal
pages/parent
Platform Administration
- Super-admin portal
pages/super-admin - School and license management
modules/super-admin/license/LicenseManager.tsx - Super-admin service
services/super-admin.service.ts
Shared Foundation
- HTTP API client
utils/api-client.ts - Protected dashboard layout
components/layouts/AdminLayout.tsx - Auth hook
hooks/useAuth.ts
Other components
- School user
- ERP backend
Connections 28
- School user → Sign in and register: signs in
- Sign in and register → Authentication state: submits credentials
- Authentication state → Authentication service: loads profile
contexts/AuthContext.tsx - Authentication service → HTTP API client: sends auth requests
services/auth.service.ts - HTTP API client → ERP backend: sends HTTP requests
utils/api-client.ts - Admin portal → Authentication guard: requires authentication
pages/admin/homework/review.tsx - Admin portal → Role guard: checks role
pages/admin/homework/review.tsx - Authentication guard → Auth hook: reads auth state
components/guards/AuthGuard.tsx - Role guard → Auth hook: reads auth state
components/guards/RoleGuard.tsx - Role guard → Role routing: validates role
components/guards/RoleGuard.tsx - Auth hook → Authentication state: reads context
hooks/useAuth.ts - Protected dashboard layout → Authentication guard: wraps pages
components/layouts/AdminLayout.tsx - Protected dashboard layout → Role guard: wraps pages
components/layouts/AdminLayout.tsx - Admin portal → Academic management: offers academics
- Admin portal → School operations: offers operations
- Admin portal → Transport routes: routes to
pages/admin/transport/routes.tsx - Transport routes → Protected dashboard layout: uses layout
modules/admin/transport/routes/TransportRoutes.tsx - Teacher portal → School user: serves teachers
- Student portal → School user: serves students
- Parent portal → School user: serves parents
- Super-admin portal → School and license management: manages schools
- Super-admin portal → Super-admin service: uses services
pages/super-admin/users/index.tsx - Super-admin service → HTTP API client: sends platform requests
services/super-admin.service.ts - Role routing → Admin portal: maps admin role
utils/role-config.ts - Role routing → Teacher portal: maps teacher role
utils/role-config.ts - Role routing → Student portal: maps student role
utils/role-config.ts - Role routing → Parent portal: maps parent role
utils/role-config.ts - Role routing → Super-admin portal: maps platform role
utils/role-config.ts