# dhinesh-dhinesh/ridemap-admin-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/dhinesh-dhinesh/ridemap-admin-dashboard
- Repository: https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard

## Overview

Ridemap Admin Dashboard is an institute-scoped admin interface for authentication and managing transit users, bus assignments, institute settings, and reports. The main flow is login, route authorization, then dashboard or user/admin operations using Firebase directly or the tokenized API client, with Redux holding institute and user state. Reported-user image retrieval is a separate review workflow. The README is minimal; feature nodes for unsampled screens are based on the route map and SOURCE INDEX references, so their internal behavior is not inferred.

Main entry points: [`src/App.tsx`](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/App.tsx) (Application Router), [`src/firebase/index.ts`](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/firebase/index.ts) (Firebase Services), [`src/util/api.ts`](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/util/api.ts) (API Client), [`src/redux/app/store.ts`](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/redux/app/store.ts) (Redux Store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and Access"]
  node_app["Application Router<br/>[App.tsx]"]
  node_routeguard["Route Guard"]
  node_login["Admin Login<br/>[index.tsx]"]
end

subgraph group_people["User Operations"]
  node_userlist["User Directory<br/>[user.tsx]"]
  node_createuser["Create User<br/>[createUser.tsx]"]
  node_edituser["Edit User<br/>[editUser.tsx]"]
  node_searchuser["Search Enrollment<br/>[searchUser.tsx]"]
  node_reportuser["Report User<br/>[reportUsers.tsx]"]
  node_reports["Reported Users"]
  node_reportview["Report Detail View"]
end

subgraph group_institute["Institute Operations"]
  node_dashboard["Dashboard<br/>[index.tsx]"]
  node_bususers["Bus User View<br/>[busUsers.tsx]"]
  node_adminmgmt["Admin Management<br/>[admin.tsx]"]
  node_createadmin["Create Admin<br/>[createAdmin.tsx]"]
  node_settings["Institute Settings<br/>[index.tsx]"]
end

subgraph group_state["State and Services"]
  node_redux["Redux Store<br/>[store.ts]"]
  node_userslice["Auth State<br/>[userSlice.ts]"]
  node_instituteslice["Institute State<br/>[instituteSlice.ts]"]
  node_institutedata["Institute Data Actions"]
  node_userdata["User Data Actions<br/>[userActions.ts]"]
  node_firebase["Firebase Services<br/>[index.ts]"]
  node_firestore[("Firestore")]
  node_storage[("Firebase Storage")]
  node_api["API Client<br/>[api.ts]"]
  node_downloads["Report Image URLs<br/>[getDownloadURLs.ts]"]
end

node_admin(("Admin Actor"))
node_api_service["Ridemap API"]

node_admin -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"protects routes"| node_routeguard
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_bususers
node_app -->|"routes to"| node_adminmgmt
node_app -->|"routes to"| node_createadmin
node_app -->|"routes to"| node_settings
node_app -->|"routes to"| node_userlist
node_app -->|"routes to"| node_createuser
node_app -->|"routes to"| node_edituser
node_app -->|"routes to"| node_searchuser
node_app -->|"routes to"| node_reportuser
node_app -->|"routes to"| node_reports
node_routeguard -->|"checks state"| node_redux
node_login -->|"authenticates with"| node_firebase
node_app -->|"tracks auth"| node_firebase
node_app -->|"dispatches auth"| node_redux
node_redux -->|"combines"| node_userslice
node_redux -->|"combines"| node_instituteslice
node_instituteslice -->|"dispatches"| node_institutedata
node_userslice -->|"dispatches"| node_userdata
node_institutedata -->|"reads and writes"| node_firebase
node_userdata -->|"accesses"| node_firebase
node_searchuser -->|"queries users"| node_firebase
node_searchuser -->|"navigates to"| node_reportuser
node_reports -->|"loads images"| node_downloads
node_reports -->|"renders"| node_reportview
node_reportview -->|"uses URLs"| node_downloads
node_downloads -->|"uses services"| node_firebase
node_firebase -->|"configures"| node_firestore
node_firebase -->|"configures"| node_storage
node_adminmgmt -->|"creates API client"| node_api
node_createadmin -->|"creates API client"| node_api
node_createuser -->|"creates API client"| node_api
node_edituser -->|"creates API client"| node_api
node_api -.->|"sends requests"| node_api_service

click node_app "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/App.tsx"
click node_routeguard "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/components/ProtectedRoutes.tsx"
click node_login "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/login/index.tsx"
click node_dashboard "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/dashboard/index.tsx"
click node_bususers "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/dashboard/busUsers.tsx"
click node_adminmgmt "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/admin/admin.tsx"
click node_createadmin "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/admin/createAdmin.tsx"
click node_settings "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/settings/index.tsx"
click node_userlist "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/user/user.tsx"
click node_createuser "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/user/createUser.tsx"
click node_edituser "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/user/editUser.tsx"
click node_searchuser "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/user/searchUser.tsx"
click node_reportuser "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/user/reportUsers.tsx"
click node_reports "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/user/viewUserReports.tsx"
click node_reportview "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/components/ReportedUserView.tsx"
click node_redux "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/redux/app/store.ts"
click node_userslice "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/redux/features/userSlice.ts"
click node_instituteslice "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/redux/features/instituteSlice.ts"
click node_institutedata "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/redux/features/actions/instituteActions.ts"
click node_userdata "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/redux/features/actions/userActions.ts"
click node_firebase "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/firebase/index.ts"
click node_api "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/util/api.ts"
click node_downloads "https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/util/getDownloadURLs.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_app,node_routeguard,node_login toneBlue
class node_userlist,node_createuser,node_edituser,node_searchuser,node_reportuser,node_reports,node_reportview toneAmber
class node_dashboard,node_bususers,node_adminmgmt,node_createadmin,node_settings,node_api_service toneMint
class node_redux,node_userslice,node_instituteslice,node_institutedata,node_userdata,node_firebase,node_firestore,node_storage,node_api,node_downloads toneRose
class node_admin toneIndigo
```

## Components

### App and Access

- [Application Router](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/App.tsx): `src/App.tsx`
- [Route Guard](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/components/ProtectedRoutes.tsx): `src/components/ProtectedRoutes.tsx`
- [Admin Login](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/login/index.tsx): `src/pages/login/index.tsx`

### User Operations

- [User Directory](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/user/user.tsx): `src/pages/user/user.tsx`
- [Create User](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/user/createUser.tsx): `src/pages/user/createUser.tsx`
- [Edit User](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/user/editUser.tsx): `src/pages/user/editUser.tsx`
- [Search Enrollment](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/user/searchUser.tsx): `src/pages/user/searchUser.tsx`
- [Report User](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/user/reportUsers.tsx): `src/pages/user/reportUsers.tsx`
- [Reported Users](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/user/viewUserReports.tsx): `src/pages/user/viewUserReports.tsx`
- [Report Detail View](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/components/ReportedUserView.tsx): `src/components/ReportedUserView.tsx`

### Institute Operations

- [Dashboard](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/dashboard/index.tsx): `src/pages/dashboard/index.tsx`
- [Bus User View](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/dashboard/busUsers.tsx): `src/pages/dashboard/busUsers.tsx`
- [Admin Management](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/admin/admin.tsx): `src/pages/admin/admin.tsx`
- [Create Admin](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/admin/createAdmin.tsx): `src/pages/admin/createAdmin.tsx`
- [Institute Settings](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/pages/settings/index.tsx): `src/pages/settings/index.tsx`

### State and Services

- [Redux Store](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/redux/app/store.ts): `src/redux/app/store.ts`
- [Auth State](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/redux/features/userSlice.ts): `src/redux/features/userSlice.ts`
- [Institute State](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/redux/features/instituteSlice.ts): `src/redux/features/instituteSlice.ts`
- [Institute Data Actions](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/redux/features/actions/instituteActions.ts): `src/redux/features/actions/instituteActions.ts`
- [User Data Actions](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/redux/features/actions/userActions.ts): `src/redux/features/actions/userActions.ts`
- [Firebase Services](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/firebase/index.ts): `src/firebase/index.ts`
- **Firestore**
- **Firebase Storage**
- [API Client](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/util/api.ts): `src/util/api.ts`
- [Report Image URLs](https://github.com/dhinesh-dhinesh/ridemap-admin-dashboard/blob/master/src/util/getDownloadURLs.ts): `src/util/getDownloadURLs.ts`

### Other components

- **Admin Actor**
- **Ridemap API**

## Connections

- Admin Actor → Application Router: uses (evidence: `src/App.tsx`)
- Application Router → Admin Login: routes to (evidence: `src/App.tsx`)
- Application Router → Route Guard: protects routes (evidence: `src/App.tsx`)
- Application Router → Dashboard: routes to (evidence: `src/App.tsx`)
- Application Router → Bus User View: routes to (evidence: `src/App.tsx`)
- Application Router → Admin Management: routes to (evidence: `src/App.tsx`)
- Application Router → Create Admin: routes to (evidence: `src/App.tsx`)
- Application Router → Institute Settings: routes to (evidence: `src/App.tsx`)
- Application Router → User Directory: routes to (evidence: `src/App.tsx`)
- Application Router → Create User: routes to (evidence: `src/App.tsx`)
- Application Router → Edit User: routes to (evidence: `src/App.tsx`)
- Application Router → Search Enrollment: routes to (evidence: `src/App.tsx`)
- Application Router → Report User: routes to (evidence: `src/App.tsx`)
- Application Router → Reported Users: routes to (evidence: `src/App.tsx`)
- Route Guard → Redux Store: checks state (evidence: `src/components/ProtectedRoutes.tsx`)
- Admin Login → Firebase Services: authenticates with (evidence: `src/pages/login/index.tsx`)
- Application Router → Firebase Services: tracks auth (evidence: `src/App.tsx`)
- Application Router → Redux Store: dispatches auth (evidence: `src/App.tsx`)
- Redux Store → Auth State: combines
- Redux Store → Institute State: combines
- Institute State → Institute Data Actions: dispatches (evidence: `src/redux/features/instituteSlice.ts`)
- Auth State → User Data Actions: dispatches (evidence: `src/redux/features/userSlice.ts`)
- Institute Data Actions → Firebase Services: reads and writes (evidence: `src/redux/features/actions/instituteActions.ts`)
- User Data Actions → Firebase Services: accesses (evidence: `src/redux/features/actions/userActions.ts`)
- Search Enrollment → Firebase Services: queries users (evidence: `src/pages/user/searchUser.tsx`)
- Search Enrollment → Report User: navigates to (evidence: `src/pages/user/searchUser.tsx`)
- Reported Users → Report Image URLs: loads images (evidence: `src/pages/user/viewUserReports.tsx`)
- Reported Users → Report Detail View: renders (evidence: `src/pages/user/viewUserReports.tsx`)
- Report Detail View → Report Image URLs: uses URLs (evidence: `src/components/ReportedUserView.tsx`)
- Report Image URLs → Firebase Services: uses services (evidence: `src/util/getDownloadURLs.ts`)
- Firebase Services → Firestore: configures (evidence: `src/firebase/index.ts`)
- Firebase Services → Firebase Storage: configures (evidence: `src/firebase/index.ts`)
- Admin Management → API Client: creates API client (evidence: `src/pages/admin/admin.tsx`)
- Create Admin → API Client: creates API client (evidence: `src/pages/admin/createAdmin.tsx`)
- Create User → API Client: creates API client (evidence: `src/pages/user/createUser.tsx`)
- Edit User → API Client: creates API client (evidence: `src/pages/user/editUser.tsx`)
- API Client → Ridemap API: sends requests
