# jyotiradityatiwary/shikshasetu architecture

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

- Interactive diagram: https://gitdiagram.com/jyotiradityatiwary/shikshasetu
- Repository: https://github.com/jyotiradityatiwary/shikshasetu

## Overview

Shikshasetu is an Express application connecting volunteer organizations with schools. Volunteers register, publish teaching topics with descriptions and cities, and schools register with a location; the school dashboard matches that location against volunteer offerings, then shows topic details and contact information. The sampled server routes coordinate sessions, database queries, topic serialization, and EJS views. The README documents the matching and user capabilities; unsampled route and view wiring is included only where the README or sampled server excerpt supports it.

Main entry points: [`database/query.js`](https://github.com/jyotiradityatiwary/shikshasetu/blob/main/database/query.js) (Account and offer queries), [`index.js`](https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js) (Location matching), [`views/volunteer`](https://github.com/jyotiradityatiwary/shikshasetu/tree/main/views/volunteer) (Volunteer pages), [`views/school`](https://github.com/jyotiradityatiwary/shikshasetu/tree/main/views/school) (School pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web workflows"]
  node_server["Express server<br/>[index.js]"]
end

subgraph group_volunteer["Volunteer offerings"]
  node_volunteer_access["Volunteer access<br/>[index.js]"]
  node_volunteer_profile["Volunteer profile<br/>[index.js]"]
  node_topic_editing["Topic publishing<br/>[index.js]"]
  node_volunteer_views["Volunteer pages"]
end

subgraph group_school["School discovery"]
  node_school_access["School access<br/>[index.js]"]
  node_school_profile["School profile<br/>[index.js]"]
  node_location_matching["Location matching<br/>[index.js]"]
  node_school_details["Offer details<br/>[index.js]"]
  node_school_views["School pages"]
end

subgraph group_data["Persistence"]
  node_topic_parser["Topic serialization"]
  node_query_layer["Account and offer queries<br/>[query.js]"]
  node_db_startup["Database startup<br/>[startup.js]"]
  node_mysql[("MySQL database")]
end

node_volunteers(("Volunteer users"))
node_schools(("School users"))

node_volunteers -->|"uses"| node_server
node_schools -->|"uses"| node_server
node_server -->|"starts"| node_db_startup
node_db_startup -->|"connects"| node_mysql
node_volunteer_access -->|"checks credentials"| node_query_layer
node_volunteer_profile -->|"loads profile"| node_query_layer
node_volunteer_profile -->|"parses topics"| node_topic_parser
node_topic_editing -->|"loads and updates"| node_query_layer
node_topic_editing -->|"serializes topics"| node_topic_parser
node_volunteer_profile -->|"renders"| node_volunteer_views
node_volunteer_access -->|"renders"| node_volunteer_views
node_topic_editing -->|"renders"| node_volunteer_views
node_school_access -->|"checks credentials"| node_query_layer
node_school_profile -->|"registers"| node_query_layer
node_location_matching -->|"loads location and offers"| node_query_layer
node_location_matching -->|"parses topics"| node_topic_parser
node_location_matching -->|"renders matches"| node_school_views
node_school_details -->|"renders details"| node_school_views
node_location_matching -->|"stores matched offers"| node_school_details
node_school_access -->|"renders"| node_school_views
node_query_layer -->|"queries"| node_mysql

click node_server "https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js"
click node_volunteer_access "https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js"
click node_volunteer_profile "https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js"
click node_topic_editing "https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js"
click node_volunteer_views "https://github.com/jyotiradityatiwary/shikshasetu/tree/main/views/volunteer"
click node_topic_parser "https://github.com/jyotiradityatiwary/shikshasetu/blob/main/database/parsing-function.js"
click node_school_access "https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js"
click node_school_profile "https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js"
click node_location_matching "https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js"
click node_school_details "https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js"
click node_school_views "https://github.com/jyotiradityatiwary/shikshasetu/tree/main/views/school"
click node_query_layer "https://github.com/jyotiradityatiwary/shikshasetu/blob/main/database/query.js"
click node_db_startup "https://github.com/jyotiradityatiwary/shikshasetu/blob/main/database/startup.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_server,node_volunteers,node_schools toneBlue
class node_volunteer_access,node_volunteer_profile,node_topic_editing,node_volunteer_views toneAmber
class node_school_access,node_school_profile,node_location_matching,node_school_details,node_school_views toneMint
class node_topic_parser,node_query_layer,node_db_startup,node_mysql toneRose
```

## Components

### Web workflows

- [Express server](https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js): `index.js`

### Volunteer offerings

- [Volunteer access](https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js): `index.js`
- [Volunteer profile](https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js): `index.js`
- [Topic publishing](https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js): `index.js`
- [Volunteer pages](https://github.com/jyotiradityatiwary/shikshasetu/tree/main/views/volunteer): `views/volunteer`

### School discovery

- [School access](https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js): `index.js`
- [School profile](https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js): `index.js`
- [Location matching](https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js): `index.js`
- [Offer details](https://github.com/jyotiradityatiwary/shikshasetu/blob/main/index.js): `index.js`
- [School pages](https://github.com/jyotiradityatiwary/shikshasetu/tree/main/views/school): `views/school`

### Persistence

- [Topic serialization](https://github.com/jyotiradityatiwary/shikshasetu/blob/main/database/parsing-function.js): `database/parsing-function.js`
- [Account and offer queries](https://github.com/jyotiradityatiwary/shikshasetu/blob/main/database/query.js): `database/query.js`
- [Database startup](https://github.com/jyotiradityatiwary/shikshasetu/blob/main/database/startup.js): `database/startup.js`
- **MySQL database**

### Other components

- **Volunteer users**
- **School users**

## Connections

- Volunteer users → Express server: uses (evidence: `readme.md`)
- School users → Express server: uses (evidence: `readme.md`)
- Express server → Database startup: starts (evidence: `index.js`)
- Database startup → MySQL database: connects (evidence: `database/startup.js`)
- Volunteer access → Account and offer queries: checks credentials (evidence: `index.js`)
- Volunteer profile → Account and offer queries: loads profile (evidence: `index.js`)
- Volunteer profile → Topic serialization: parses topics (evidence: `index.js`)
- Topic publishing → Account and offer queries: loads and updates (evidence: `index.js`)
- Topic publishing → Topic serialization: serializes topics (evidence: `index.js`)
- Volunteer profile → Volunteer pages: renders (evidence: `index.js`)
- Volunteer access → Volunteer pages: renders (evidence: `index.js`)
- Topic publishing → Volunteer pages: renders (evidence: `index.js`)
- School access → Account and offer queries: checks credentials (evidence: `index.js`)
- School profile → Account and offer queries: registers (evidence: `index.js`)
- Location matching → Account and offer queries: loads location and offers (evidence: `index.js`)
- Location matching → Topic serialization: parses topics (evidence: `index.js`)
- Location matching → School pages: renders matches (evidence: `index.js`)
- Offer details → School pages: renders details (evidence: `index.js`)
- Location matching → Offer details: stores matched offers (evidence: `index.js`)
- School access → School pages: renders (evidence: `index.js`)
- Account and offer queries → MySQL database: queries (evidence: `database/query.js`)
