# sravanm14/sch-p-fronrend architecture

> Architecture diagram of the GitHub repository sravanm14/sch-p-fronrend, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sravanm14/sch-p-fronrend
- Repository: https://github.com/sravanm14/sch-p-fronrend

## Overview

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: [`src/routes/index.tsx`](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/routes/index.tsx) (Route map), [`src/services/auth/authService.ts`](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/services/auth/authService.ts) (Auth service), [`src/store/index.ts`](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/store/index.ts) (Redux store), [`src/services/api/axios.ts`](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/services/api/axios.ts) (Axios clients)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry and routing"]
  node_bootstrap["React bootstrap<br/>[main.tsx]"]
  node_app["App root<br/>[App.tsx]"]
  node_routes["Route map<br/>[index.tsx]"]
  node_guard["Protected route<br/>[ProtectedRoute.tsx]"]
  node_layout["App layout<br/>[AppLayout.tsx]"]
  node_sidebar["Navigation sidebar<br/>[Sidebar.tsx]"]
end

subgraph group_identity["Authentication and profile"]
  node_login["Login<br/>[Login.tsx]"]
  node_register["Registration<br/>[Register.tsx]"]
  node_forgot["Password recovery<br/>[ForgotPassword.tsx]"]
  node_profile["Profile view<br/>[Profile.tsx]"]
  node_editprofile["Edit profile<br/>[EditProfile.tsx]"]
  node_changepassword["Change password<br/>[ChangePassword.tsx]"]
  node_authservice["Auth service<br/>[authService.ts]"]
end

subgraph group_school["School administration"]
  node_users["User administration<br/>[UsersList.tsx]"]
  node_students["Student list<br/>[studentList.tsx]"]
  node_createstudent["Create student<br/>[CreateStudent.tsx]"]
  node_table["Data table<br/>[data-table.tsx]"]
  node_studentservice["Student service"]
  node_userservice["User service<br/>[userService.ts]"]
end

subgraph group_state["Client state"]
  node_store[("Redux store<br/>[index.ts]")]
  node_authslice["Auth state<br/>[authSlice.ts]"]
  node_profileslice["Profile state<br/>[profileSlice.ts]"]
  node_studentslice["Student state<br/>[studentSlice.ts]"]
  node_userslice["User-list state<br/>[usersSlice.ts]"]
  node_hooks["Typed Redux hooks<br/>[hook.ts]"]
end

subgraph group_transport["API transport"]
  node_http["Axios clients<br/>[axios.ts]"]
end

node_visitor(("User"))
node_backend{{"Backend API"}}

node_visitor -->|"opens app"| node_bootstrap
node_bootstrap -->|"renders"| node_app
node_bootstrap -->|"provides state"| node_store
node_app -->|"renders routes"| node_routes
node_routes -->|"routes to"| node_login
node_routes -->|"routes to"| node_register
node_routes -->|"routes to"| node_forgot
node_routes -->|"guards app routes"| node_guard
node_routes -->|"wraps app pages"| node_layout
node_routes -->|"routes to"| node_profile
node_routes -->|"routes to"| node_editprofile
node_routes -->|"routes to"| node_changepassword
node_routes -->|"routes to"| node_users
node_routes -->|"routes to"| node_students
node_routes -->|"routes to"| node_createstudent
node_login -->|"authenticates via"| node_authservice
node_register -->|"registers via"| node_authservice
node_editprofile -->|"loads and updates"| node_authservice
node_profile -->|"loads profile"| node_authservice
node_sidebar -->|"uses auth actions"| node_authservice
node_users -->|"fetches users"| node_userservice
node_users -->|"renders"| node_table
node_students -->|"fetches students"| node_studentservice
node_students -->|"renders"| node_table
node_authservice -->|"sends requests"| node_http
node_studentservice -->|"sends requests"| node_http
node_userservice -->|"sends requests"| node_http
node_http -.->|"calls API"| node_backend
node_http -->|"refreshes token through"| node_authservice
node_http -->|"reads auth and dispatches"| node_store
node_store -->|"registers reducer"| node_authslice
node_store -->|"registers reducer"| node_profileslice
node_store -->|"registers reducer"| node_studentslice
node_store -->|"registers reducer"| node_userslice
node_guard -->|"reads auth state"| node_hooks
node_sidebar -->|"uses typed hooks"| node_hooks
node_users -->|"uses typed hooks"| node_hooks
node_students -->|"uses typed hooks"| node_hooks
node_editprofile -->|"uses typed hooks"| node_hooks
node_table -.->|"formats class ordinals"| node_backend

click node_bootstrap "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/main.tsx"
click node_app "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/App.tsx"
click node_routes "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/routes/index.tsx"
click node_guard "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/routes/ProtectedRoute.tsx"
click node_layout "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/layouts/AppLayout/AppLayout.tsx"
click node_sidebar "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/layouts/AppLayout/Sidebar.tsx"
click node_login "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/auth/login/Login.tsx"
click node_register "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/auth/Register/Register.tsx"
click node_forgot "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/auth/ForgotPassword/ForgotPassword.tsx"
click node_profile "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/profile/Profile.tsx"
click node_editprofile "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/profile/EditProfile.tsx"
click node_changepassword "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/profile/ChangePassword.tsx"
click node_authservice "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/services/auth/authService.ts"
click node_users "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/admin/users/UsersList.tsx"
click node_students "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/student/studentList.tsx"
click node_createstudent "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/student/CreateStudent.tsx"
click node_table "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/components/common/data-table/data-table.tsx"
click node_studentservice "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/services/students/Students.service.ts"
click node_userservice "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/services/users/userService.ts"
click node_store "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/store/index.ts"
click node_authslice "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/store/auth/authSlice.ts"
click node_profileslice "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/store/profile/profileSlice.ts"
click node_studentslice "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/store/student/studentSlice.ts"
click node_userslice "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/store/usersList/usersSlice.ts"
click node_hooks "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/store/hook.ts"
click node_http "https://github.com/sravanm14/sch-p-fronrend/blob/main/src/services/api/axios.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_bootstrap,node_app,node_routes,node_guard,node_layout,node_sidebar,node_visitor toneBlue
class node_login,node_register,node_forgot,node_profile,node_editprofile,node_changepassword,node_authservice toneAmber
class node_users,node_students,node_createstudent,node_table,node_studentservice,node_userservice,node_backend toneMint
class node_store,node_authslice,node_profileslice,node_studentslice,node_userslice,node_hooks toneRose
class node_http toneIndigo
```

## Components

### App entry and routing

- [React bootstrap](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/main.tsx): `src/main.tsx`
- [App root](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/App.tsx): `src/App.tsx`
- [Route map](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Protected route](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/routes/ProtectedRoute.tsx): `src/routes/ProtectedRoute.tsx`
- [App layout](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/layouts/AppLayout/AppLayout.tsx): `src/layouts/AppLayout/AppLayout.tsx`
- [Navigation sidebar](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/layouts/AppLayout/Sidebar.tsx): `src/layouts/AppLayout/Sidebar.tsx`

### Authentication and profile

- [Login](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/auth/login/Login.tsx): `src/pages/auth/login/Login.tsx`
- [Registration](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/auth/Register/Register.tsx): `src/pages/auth/Register/Register.tsx`
- [Password recovery](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/auth/ForgotPassword/ForgotPassword.tsx): `src/pages/auth/ForgotPassword/ForgotPassword.tsx`
- [Profile view](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/profile/Profile.tsx): `src/pages/profile/Profile.tsx`
- [Edit profile](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/profile/EditProfile.tsx): `src/pages/profile/EditProfile.tsx`
- [Change password](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/profile/ChangePassword.tsx): `src/pages/profile/ChangePassword.tsx`
- [Auth service](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/services/auth/authService.ts): `src/services/auth/authService.ts`

### School administration

- [User administration](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/admin/users/UsersList.tsx): `src/pages/admin/users/UsersList.tsx`
- [Student list](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/student/studentList.tsx): `src/pages/student/studentList.tsx`
- [Create student](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/pages/student/CreateStudent.tsx): `src/pages/student/CreateStudent.tsx`
- [Data table](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/components/common/data-table/data-table.tsx): `src/components/common/data-table/data-table.tsx`
- [Student service](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/services/students/Students.service.ts): `src/services/students/Students.service.ts`
- [User service](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/services/users/userService.ts): `src/services/users/userService.ts`

### Client state

- [Redux store](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/store/index.ts): `src/store/index.ts`
- [Auth state](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/store/auth/authSlice.ts): `src/store/auth/authSlice.ts`
- [Profile state](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/store/profile/profileSlice.ts): `src/store/profile/profileSlice.ts`
- [Student state](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/store/student/studentSlice.ts): `src/store/student/studentSlice.ts`
- [User-list state](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/store/usersList/usersSlice.ts): `src/store/usersList/usersSlice.ts`
- [Typed Redux hooks](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/store/hook.ts): `src/store/hook.ts`

### API transport

- [Axios clients](https://github.com/sravanm14/sch-p-fronrend/blob/main/src/services/api/axios.ts): `src/services/api/axios.ts`

### Other components

- **User**
- **Backend API**

## Connections

- User → React bootstrap: opens app
- React bootstrap → App root: renders (evidence: `src/main.tsx`)
- React bootstrap → Redux store: provides state (evidence: `src/main.tsx`)
- App root → Route map: renders routes (evidence: `src/App.tsx`)
- Route map → Login: routes to (evidence: `src/routes/index.tsx`)
- Route map → Registration: routes to (evidence: `src/routes/index.tsx`)
- Route map → Password recovery: routes to (evidence: `src/routes/index.tsx`)
- Route map → Protected route: guards app routes (evidence: `src/routes/index.tsx`)
- Route map → App layout: wraps app pages (evidence: `src/routes/index.tsx`)
- Route map → Profile view: routes to (evidence: `src/routes/index.tsx`)
- Route map → Edit profile: routes to (evidence: `src/routes/index.tsx`)
- Route map → Change password: routes to (evidence: `src/routes/index.tsx`)
- Route map → User administration: routes to (evidence: `src/routes/index.tsx`)
- Route map → Student list: routes to (evidence: `src/routes/index.tsx`)
- Route map → Create student: routes to (evidence: `src/routes/index.tsx`)
- Login → Auth service: authenticates via (evidence: `src/pages/auth/login/Login.tsx`)
- Registration → Auth service: registers via (evidence: `src/pages/auth/Register/Register.tsx`)
- Edit profile → Auth service: loads and updates (evidence: `src/pages/profile/EditProfile.tsx`)
- Profile view → Auth service: loads profile (evidence: `src/pages/profile/Profile.tsx`)
- Navigation sidebar → Auth service: uses auth actions (evidence: `src/layouts/AppLayout/Sidebar.tsx`)
- User administration → User service: fetches users (evidence: `src/pages/admin/users/UsersList.tsx`)
- User administration → Data table: renders (evidence: `src/pages/admin/users/UsersList.tsx`)
- Student list → Student service: fetches students (evidence: `src/pages/student/studentList.tsx`)
- Student list → Data table: renders (evidence: `src/pages/student/studentList.tsx`)
- Auth service → Axios clients: sends requests (evidence: `src/services/auth/authService.ts`)
- Student service → Axios clients: sends requests (evidence: `src/services/students/Students.service.ts`)
- User service → Axios clients: sends requests (evidence: `src/services/users/userService.ts`)
- Axios clients → Backend API: calls API
- Axios clients → Auth service: refreshes token through (evidence: `src/services/api/axios.ts`)
- Axios clients → Redux store: reads auth and dispatches (evidence: `src/services/api/axios.ts`)
- Redux store → Auth state: registers reducer (evidence: `src/store/index.ts`)
- Redux store → Profile state: registers reducer (evidence: `src/store/index.ts`)
- Redux store → Student state: registers reducer (evidence: `src/store/index.ts`)
- Redux store → User-list state: registers reducer (evidence: `src/store/index.ts`)
- Protected route → Typed Redux hooks: reads auth state (evidence: `src/routes/ProtectedRoute.tsx`)
- Navigation sidebar → Typed Redux hooks: uses typed hooks (evidence: `src/layouts/AppLayout/Sidebar.tsx`)
- User administration → Typed Redux hooks: uses typed hooks (evidence: `src/pages/admin/users/UsersList.tsx`)
- Student list → Typed Redux hooks: uses typed hooks (evidence: `src/pages/student/studentList.tsx`)
- Edit profile → Typed Redux hooks: uses typed hooks (evidence: `src/pages/profile/EditProfile.tsx`)
- Data table → Backend API: formats class ordinals
