How sravanm14/sch-p-fronrend works
This is a React/TypeScript school-management frontend. Its principal workflow is route entry (with protected application routes), then user or student listing backed by API services and shared state; authentication and profile management are parallel user workflows. The source excerpts show routing, auth/API handling, and several page-to-service relationships; other page behavior is represented only where the route index establishes it, so uncertain internal calls are omitted.
Main entry points: index.tsx Route map · authService.ts Auth service · index.ts Redux store · axios.ts Axios clients
Components 28
App entry and routing
- React bootstrap
src/main.tsx - App root
src/App.tsx - Route map
src/routes/index.tsx - Protected route
src/routes/ProtectedRoute.tsx - App layout
src/layouts/AppLayout/AppLayout.tsx - Navigation sidebar
src/layouts/AppLayout/Sidebar.tsx
Authentication and profile
- Login
src/pages/auth/login/Login.tsx - Registration
src/pages/auth/Register/Register.tsx - Password recovery
src/pages/auth/ForgotPassword/ForgotPassword.tsx - Profile view
src/pages/profile/Profile.tsx - Edit profile
src/pages/profile/EditProfile.tsx - Change password
src/pages/profile/ChangePassword.tsx - Auth service
src/services/auth/authService.ts
School administration
- User administration
src/pages/admin/users/UsersList.tsx - Student list
src/pages/student/studentList.tsx - Create student
src/pages/student/CreateStudent.tsx - Data table
src/components/common/data-table/data-table.tsx - Student service
src/services/students/Students.service.ts - User service
src/services/users/userService.ts
Client state
- Redux store
src/store/index.ts - Auth state
src/store/auth/authSlice.ts - Profile state
src/store/profile/profileSlice.ts - Student state
src/store/student/studentSlice.ts - User-list state
src/store/usersList/usersSlice.ts - Typed Redux hooks
src/store/hook.ts
API transport
- Axios clients
src/services/api/axios.ts
Other components
- User
- Backend API
Connections 40
- User → React bootstrap: opens app
- React bootstrap → App root: renders
src/main.tsx - React bootstrap → Redux store: provides state
src/main.tsx - App root → Route map: renders routes
src/App.tsx - Route map → Login: routes to
src/routes/index.tsx - Route map → Registration: routes to
src/routes/index.tsx - Route map → Password recovery: routes to
src/routes/index.tsx - Route map → Protected route: guards app routes
src/routes/index.tsx - Route map → App layout: wraps app pages
src/routes/index.tsx - Route map → Profile view: routes to
src/routes/index.tsx - Route map → Edit profile: routes to
src/routes/index.tsx - Route map → Change password: routes to
src/routes/index.tsx - Route map → User administration: routes to
src/routes/index.tsx - Route map → Student list: routes to
src/routes/index.tsx - Route map → Create student: routes to
src/routes/index.tsx - Login → Auth service: authenticates via
src/pages/auth/login/Login.tsx - Registration → Auth service: registers via
src/pages/auth/Register/Register.tsx - Edit profile → Auth service: loads and updates
src/pages/profile/EditProfile.tsx - Profile view → Auth service: loads profile
src/pages/profile/Profile.tsx - Navigation sidebar → Auth service: uses auth actions
src/layouts/AppLayout/Sidebar.tsx - User administration → User service: fetches users
src/pages/admin/users/UsersList.tsx - User administration → Data table: renders
src/pages/admin/users/UsersList.tsx - Student list → Student service: fetches students
src/pages/student/studentList.tsx - Student list → Data table: renders
src/pages/student/studentList.tsx - Auth service → Axios clients: sends requests
src/services/auth/authService.ts - Student service → Axios clients: sends requests
src/services/students/Students.service.ts - User service → Axios clients: sends requests
src/services/users/userService.ts - Axios clients → Backend API: calls API
- Axios clients → Auth service: refreshes token through
src/services/api/axios.ts - Axios clients → Redux store: reads auth and dispatches
src/services/api/axios.ts - Redux store → Auth state: registers reducer
src/store/index.ts - Redux store → Profile state: registers reducer
src/store/index.ts - Redux store → Student state: registers reducer
src/store/index.ts - Redux store → User-list state: registers reducer
src/store/index.ts - Protected route → Typed Redux hooks: reads auth state
src/routes/ProtectedRoute.tsx - Navigation sidebar → Typed Redux hooks: uses typed hooks
src/layouts/AppLayout/Sidebar.tsx - User administration → Typed Redux hooks: uses typed hooks
src/pages/admin/users/UsersList.tsx - Student list → Typed Redux hooks: uses typed hooks
src/pages/student/studentList.tsx - Edit profile → Typed Redux hooks: uses typed hooks
src/pages/profile/EditProfile.tsx - Data table → Backend API: formats class ordinals