# jindaltiya25/purbiya_foundation_frontend architecture

> Architecture diagram of the GitHub repository jindaltiya25/purbiya_foundation_frontend, 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/jindaltiya25/purbiya_foundation_frontend
- Repository: https://github.com/jindaltiya25/purbiya_foundation_frontend

## Overview

Purbiya Foundation is a public-facing foundation website with informational pages and APIs for contact messages, donations, and dynamic content such as galleries, team members, events, feedback, sliders, and blog categories. Visitors request the site through the Express server; API handlers validate or retrieve data and use the MySQL pool where shown. The excerpts establish server routes and database access, but do not show frontend API wiring, so those connections are omitted.

Main entry points: [`server.js`](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js) (Express server), [`db.js`](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/db.js) (MySQL pool), [`public/index.html`](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/index.html) (Home page), [`public/about.html`](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/about.html) (About page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Public website"]
  node_server["Express server<br/>[server.js]"]
  node_home["Home page<br/>[index.html]"]
  node_about["About page<br/>[about.html]"]
  node_events_page["Events page<br/>[ourEvent.html]"]
  node_gallery_page["Gallery page<br/>[gallery.html]"]
  node_team_page["Team page<br/>[ourTeam.html]"]
  node_blogs_page["Blogs page<br/>[blogs.html]"]
  node_contact_page["Contact page<br/>[contactUs.html]"]
  node_donate_page["Donate page<br/>[donate.html]"]
end

subgraph group_api["Content APIs"]
  node_contact_api["Contact submissions<br/>[server.js]"]
  node_donation_api["Donation submissions<br/>[server.js]"]
  node_sliders_api["Slider content<br/>[server.js]"]
  node_gallery_api["Gallery content<br/>[server.js]"]
  node_team_api["Team content<br/>[server.js]"]
  node_feedback_api["Feedback content<br/>[server.js]"]
  node_events_api["Event content<br/>[server.js]"]
  node_categories_api["Blog categories<br/>[server.js]"]
end

subgraph group_data["Data storage"]
  node_pool[("MySQL pool<br/>[db.js]")]
end

node_visitor(("Visitor"))

node_visitor -->|"requests pages"| node_server
node_server -->|"serves static"| node_home
node_server -->|"serves static"| node_about
node_server -->|"serves static"| node_events_page
node_server -->|"serves static"| node_gallery_page
node_server -->|"serves static"| node_team_page
node_server -->|"serves static"| node_blogs_page
node_server -->|"serves static"| node_contact_page
node_server -->|"serves static"| node_donate_page
node_visitor -->|"submits contact"| node_contact_api
node_visitor -->|"submits donation"| node_donation_api
node_visitor -->|"requests content"| node_sliders_api
node_visitor -->|"requests content"| node_gallery_api
node_visitor -->|"requests content"| node_team_api
node_visitor -->|"requests content"| node_feedback_api
node_visitor -->|"requests content"| node_events_api
node_visitor -->|"requests content"| node_categories_api
node_contact_api -->|"inserts contact"| node_pool
node_donation_api -->|"inserts donation"| node_pool
node_sliders_api -->|"queries sliders"| node_pool
node_gallery_api -->|"queries gallery"| node_pool
node_team_api -->|"queries teams"| node_pool
node_feedback_api -->|"queries feedback"| node_pool
node_events_api -->|"queries events"| node_pool
node_categories_api -->|"queries categories"| node_pool

click node_server "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js"
click node_home "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/index.html"
click node_about "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/about.html"
click node_events_page "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/ourEvent.html"
click node_gallery_page "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/gallery.html"
click node_team_page "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/ourTeam.html"
click node_blogs_page "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/blogs.html"
click node_contact_page "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/contactUs.html"
click node_donate_page "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/donate.html"
click node_contact_api "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js"
click node_donation_api "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js"
click node_sliders_api "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js"
click node_gallery_api "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js"
click node_team_api "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js"
click node_feedback_api "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js"
click node_events_api "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js"
click node_categories_api "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js"
click node_pool "https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/db.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_home,node_about,node_events_page,node_gallery_page,node_team_page,node_blogs_page,node_contact_page,node_donate_page toneBlue
class node_contact_api,node_donation_api,node_sliders_api,node_gallery_api,node_team_api,node_feedback_api,node_events_api,node_categories_api toneAmber
class node_pool toneMint
class node_visitor toneIndigo
```

## Components

### Public website

- [Express server](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js): `server.js`
- [Home page](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/index.html): `public/index.html`
- [About page](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/about.html): `public/about.html`
- [Events page](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/ourEvent.html): `public/ourEvent.html`
- [Gallery page](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/gallery.html): `public/gallery.html`
- [Team page](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/ourTeam.html): `public/ourTeam.html`
- [Blogs page](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/blogs.html): `public/blogs.html`
- [Contact page](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/contactUs.html): `public/contactUs.html`
- [Donate page](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/public/donate.html): `public/donate.html`

### Content APIs

- [Contact submissions](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js): `server.js`
- [Donation submissions](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js): `server.js`
- [Slider content](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js): `server.js`
- [Gallery content](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js): `server.js`
- [Team content](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js): `server.js`
- [Feedback content](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js): `server.js`
- [Event content](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js): `server.js`
- [Blog categories](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/server.js): `server.js`

### Data storage

- [MySQL pool](https://github.com/jindaltiya25/purbiya_foundation_frontend/blob/main/db.js): `db.js`

### Other components

- **Visitor**

## Connections

- Visitor → Express server: requests pages
- Express server → Home page: serves static
- Express server → About page: serves static
- Express server → Events page: serves static
- Express server → Gallery page: serves static
- Express server → Team page: serves static
- Express server → Blogs page: serves static
- Express server → Contact page: serves static
- Express server → Donate page: serves static
- Visitor → Contact submissions: submits contact
- Visitor → Donation submissions: submits donation
- Visitor → Slider content: requests content
- Visitor → Gallery content: requests content
- Visitor → Team content: requests content
- Visitor → Feedback content: requests content
- Visitor → Event content: requests content
- Visitor → Blog categories: requests content
- Contact submissions → MySQL pool: inserts contact
- Donation submissions → MySQL pool: inserts donation
- Slider content → MySQL pool: queries sliders
- Gallery content → MySQL pool: queries gallery
- Team content → MySQL pool: queries teams
- Feedback content → MySQL pool: queries feedback
- Event content → MySQL pool: queries events
- Blog categories → MySQL pool: queries categories
