# ajaypatel001/govt.scheems architecture

> Architecture diagram of the GitHub repository ajaypatel001/govt.scheems, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ajaypatel001/govt.scheems
- Repository: https://github.com/ajaypatel001/govt.scheems

## Overview

This repository’s runtime product is a government-schemes web application: users browse schemes and eligibility information, while users and administrators have separate account workflows and administrators manage scheme content. The README instead describes a Jenkins/Docker deployment setup, but the supplied tree contains no deployment files to map. The graph follows the React and Node application structure; several frontend API clients and backend domain modules are named in the tree but their implementations were not sampled, so uncertain call links are omitted.

Main entry points: [`node/app.js`](https://github.com/ajaypatel001/govt.scheems/blob/main/node/app.js) (Express app), [`react/src/App.jsx`](https://github.com/ajaypatel001/govt.scheems/blob/main/react/src/App.jsx) (App router), [`node/routes/schemeRoutes.js`](https://github.com/ajaypatel001/govt.scheems/blob/main/node/routes/schemeRoutes.js) (Scheme routes), [`node/routes/eligibilityRoutes.js`](https://github.com/ajaypatel001/govt.scheems/blob/main/node/routes/eligibilityRoutes.js) (Eligibility routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React application"]
  node_app["App router<br/>[App.jsx]"]
  node_scheme_ui["Scheme pages<br/>[SchemeDetail.jsx]"]
  node_account_ui["Account pages<br/>[Login.jsx]"]
  node_admin_ui["Admin pages<br/>[AdminPage.jsx]"]
  node_api_clients["API clients<br/>[schemeApi.js]"]
end

subgraph group_api["Node API"]
  node_api_app["Express app<br/>[app.js]"]
  node_scheme_routes["Scheme routes<br/>[schemeRoutes.js]"]
  node_elig_routes["Eligibility routes"]
  node_admin_routes["Admin routes<br/>[adminRoutes.js]"]
  node_user_routes["User routes<br/>[userRoutes.js]"]
  node_scheme_controller["Scheme controller"]
  node_elig_controller["Eligibility controller"]
  node_admin_controller["Admin controller<br/>[adminController.js]"]
  node_user_controller["User controller<br/>[userController.js]"]
end

subgraph group_domain["Domain services"]
  node_scheme_service["Scheme service<br/>[schemeService.js]"]
  node_elig_service["Eligibility service"]
  node_admin_service["Admin service<br/>[AdminService.js]"]
  node_user_service["User service<br/>[userService.js]"]
end

subgraph group_data["Persistence"]
  node_user_model["User model<br/>[userModel.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_scheme_ui
node_app -->|"routes to"| node_account_ui
node_app -->|"routes to"| node_admin_ui
node_api_app -->|"mounts"| node_scheme_routes
node_api_app -->|"mounts"| node_elig_routes
node_api_app -->|"mounts"| node_admin_routes
node_api_app -->|"mounts"| node_user_routes
node_scheme_routes -->|"dispatches"| node_scheme_controller
node_elig_routes -->|"dispatches"| node_elig_controller
node_admin_routes -->|"dispatches"| node_admin_controller
node_user_routes -->|"dispatches"| node_user_controller
node_scheme_controller -->|"calls"| node_scheme_service
node_elig_controller -->|"calls"| node_elig_service
node_admin_controller -->|"calls"| node_admin_service
node_user_controller -->|"calls"| node_user_service
node_user_service -->|"reads/writes"| node_user_model

click node_app "https://github.com/ajaypatel001/govt.scheems/blob/main/react/src/App.jsx"
click node_scheme_ui "https://github.com/ajaypatel001/govt.scheems/blob/main/react/src/pages/SchemeDetail.jsx"
click node_account_ui "https://github.com/ajaypatel001/govt.scheems/blob/main/react/src/components/Login.jsx"
click node_admin_ui "https://github.com/ajaypatel001/govt.scheems/blob/main/react/src/pages/AdminPage.jsx"
click node_api_clients "https://github.com/ajaypatel001/govt.scheems/blob/main/react/src/api/schemeApi.js"
click node_api_app "https://github.com/ajaypatel001/govt.scheems/blob/main/node/app.js"
click node_scheme_routes "https://github.com/ajaypatel001/govt.scheems/blob/main/node/routes/schemeRoutes.js"
click node_elig_routes "https://github.com/ajaypatel001/govt.scheems/blob/main/node/routes/eligibilityRoutes.js"
click node_admin_routes "https://github.com/ajaypatel001/govt.scheems/blob/main/node/routes/adminRoutes.js"
click node_user_routes "https://github.com/ajaypatel001/govt.scheems/blob/main/node/routes/userRoutes.js"
click node_scheme_controller "https://github.com/ajaypatel001/govt.scheems/blob/main/node/controllers/schemeController.js"
click node_elig_controller "https://github.com/ajaypatel001/govt.scheems/blob/main/node/controllers/eligibilityController.js"
click node_admin_controller "https://github.com/ajaypatel001/govt.scheems/blob/main/node/controllers/adminController.js"
click node_user_controller "https://github.com/ajaypatel001/govt.scheems/blob/main/node/controllers/userController.js"
click node_scheme_service "https://github.com/ajaypatel001/govt.scheems/blob/main/node/services/schemeService.js"
click node_elig_service "https://github.com/ajaypatel001/govt.scheems/blob/main/node/services/eligibilityService.js"
click node_admin_service "https://github.com/ajaypatel001/govt.scheems/blob/main/node/services/AdminService.js"
click node_user_service "https://github.com/ajaypatel001/govt.scheems/blob/main/node/services/userService.js"
click node_user_model "https://github.com/ajaypatel001/govt.scheems/blob/main/node/models/userModel.js"

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_scheme_ui,node_account_ui,node_admin_ui,node_api_clients toneBlue
class node_api_app,node_scheme_routes,node_elig_routes,node_admin_routes,node_user_routes,node_scheme_controller,node_elig_controller,node_admin_controller,node_user_controller toneAmber
class node_scheme_service,node_elig_service,node_admin_service,node_user_service toneMint
class node_user_model toneRose
class node_visitor toneIndigo
```

## Components

### React application

- [App router](https://github.com/ajaypatel001/govt.scheems/blob/main/react/src/App.jsx): `react/src/App.jsx`
- [Scheme pages](https://github.com/ajaypatel001/govt.scheems/blob/main/react/src/pages/SchemeDetail.jsx): `react/src/pages/SchemeDetail.jsx`
- [Account pages](https://github.com/ajaypatel001/govt.scheems/blob/main/react/src/components/Login.jsx): `react/src/components/Login.jsx`
- [Admin pages](https://github.com/ajaypatel001/govt.scheems/blob/main/react/src/pages/AdminPage.jsx): `react/src/pages/AdminPage.jsx`
- [API clients](https://github.com/ajaypatel001/govt.scheems/blob/main/react/src/api/schemeApi.js): `react/src/api/schemeApi.js`

### Node API

- [Express app](https://github.com/ajaypatel001/govt.scheems/blob/main/node/app.js): `node/app.js`
- [Scheme routes](https://github.com/ajaypatel001/govt.scheems/blob/main/node/routes/schemeRoutes.js): `node/routes/schemeRoutes.js`
- [Eligibility routes](https://github.com/ajaypatel001/govt.scheems/blob/main/node/routes/eligibilityRoutes.js): `node/routes/eligibilityRoutes.js`
- [Admin routes](https://github.com/ajaypatel001/govt.scheems/blob/main/node/routes/adminRoutes.js): `node/routes/adminRoutes.js`
- [User routes](https://github.com/ajaypatel001/govt.scheems/blob/main/node/routes/userRoutes.js): `node/routes/userRoutes.js`
- [Scheme controller](https://github.com/ajaypatel001/govt.scheems/blob/main/node/controllers/schemeController.js): `node/controllers/schemeController.js`
- [Eligibility controller](https://github.com/ajaypatel001/govt.scheems/blob/main/node/controllers/eligibilityController.js): `node/controllers/eligibilityController.js`
- [Admin controller](https://github.com/ajaypatel001/govt.scheems/blob/main/node/controllers/adminController.js): `node/controllers/adminController.js`
- [User controller](https://github.com/ajaypatel001/govt.scheems/blob/main/node/controllers/userController.js): `node/controllers/userController.js`

### Domain services

- [Scheme service](https://github.com/ajaypatel001/govt.scheems/blob/main/node/services/schemeService.js): `node/services/schemeService.js`
- [Eligibility service](https://github.com/ajaypatel001/govt.scheems/blob/main/node/services/eligibilityService.js): `node/services/eligibilityService.js`
- [Admin service](https://github.com/ajaypatel001/govt.scheems/blob/main/node/services/AdminService.js): `node/services/AdminService.js`
- [User service](https://github.com/ajaypatel001/govt.scheems/blob/main/node/services/userService.js): `node/services/userService.js`

### Persistence

- [User model](https://github.com/ajaypatel001/govt.scheems/blob/main/node/models/userModel.js): `node/models/userModel.js`

### Other components

- **Visitor**

## Connections

- Visitor → App router: uses
- App router → Scheme pages: routes to
- App router → Account pages: routes to
- App router → Admin pages: routes to
- Express app → Scheme routes: mounts
- Express app → Eligibility routes: mounts
- Express app → Admin routes: mounts
- Express app → User routes: mounts
- Scheme routes → Scheme controller: dispatches
- Eligibility routes → Eligibility controller: dispatches
- Admin routes → Admin controller: dispatches
- User routes → User controller: dispatches
- Scheme controller → Scheme service: calls
- Eligibility controller → Eligibility service: calls
- Admin controller → Admin service: calls
- User controller → User service: calls
- User service → User model: reads/writes
