# hrishisawalkar82/eklavyaartschool architecture

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

- Interactive diagram: https://gitdiagram.com/hrishisawalkar82/eklavyaartschool
- Repository: https://github.com/hrishisawalkar82/eklavyaartschool

## Overview

Eklavya is an art-school website with a React frontend and FastAPI backend. Visitors browse school and artwork pages or submit a contact message; parents and administrators can authenticate, while parents submit payment plans and view student/payment information and administrators manage payments, students, and dues. The graph follows the frontend routes through its API client into backend routers and persistence. Backend route and model relationships are supported by the SOURCE INDEX; some frontend-to-endpoint links are based on the API calls shown. The README provides no further product detail.

Main entry points: [`Eklavya/frontend/src/App.jsx`](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/App.jsx) (Page routing), [`Eklavya/frontend/src/api/client.js`](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/api/client.js) (HTTP API client), [`Eklavya/backend/app/main.py`](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/main.py) (FastAPI application), [`Eklavya/backend/app/routes/payments.py`](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/routes/payments.py) (Payment handling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Website experience"]
  node_app["Page routing<br/>[App.jsx]"]
  node_home["Home page<br/>[Home.jsx]"]
  node_gallery["Artwork gallery<br/>[Gallery.jsx]"]
  node_kids["Kids gallery<br/>[Kids.jsx]"]
  node_imagegrid["Image grid<br/>[ImageGrid.jsx]"]
  node_contactpage["Contact form<br/>[Contact.jsx]"]
end

subgraph group_identity["Accounts and access"]
  node_login["Login pages<br/>[Login.jsx]"]
  node_authctx["Session state<br/>[AuthContext.jsx]"]
  node_guard["Role protection<br/>[ProtectedRoute.jsx]"]
  node_authlogic["Token and password logic<br/>[auth.py]"]
end

subgraph group_school["School operations"]
  node_paymentpage["Parent payments<br/>[Payment.jsx]"]
  node_adminpage["Payment administration<br/>[AdminPayments.jsx]"]
end

subgraph group_backend["API and persistence"]
  node_client["HTTP API client<br/>[client.js]"]
  node_api["FastAPI application<br/>[main.py]"]
  node_authroutes["Authentication routes<br/>[auth.py]"]
  node_contactroute["Contact handling<br/>[contact.py]"]
  node_imageroute["Image endpoints<br/>[images.py]"]
  node_paymentroute["Payment handling<br/>[payments.py]"]
  node_studentroute["Student and dues handling<br/>[students.py]"]
  node_db[("Database session<br/>[db.py]")]
  node_users[("User records<br/>[user.py]")]
  node_paymentrecords[("Payment records<br/>[payment.py]")]
  node_duerecords[("Payment due records<br/>[payment_due.py]")]
  node_students[("Student records<br/>[student.py]")]
  node_contacts[("Contact records<br/>[contact.py]")]
end

subgraph group_integrations["External services"]
  node_blob["Image blob storage<br/>[blob.py]"]
  node_email["Email delivery<br/>[email_service.py]"]
end

node_visitor(("Visitor or user"))

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_gallery
node_app -->|"routes to"| node_kids
node_app -->|"routes to"| node_contactpage
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_paymentpage
node_app -->|"protects route"| node_guard
node_guard -->|"renders"| node_adminpage
node_app -->|"provides session"| node_authctx
node_home -->|"requests content"| node_client
node_gallery -->|"requests images"| node_client
node_kids -->|"requests images"| node_client
node_home -->|"renders"| node_imagegrid
node_gallery -->|"renders"| node_imagegrid
node_kids -->|"renders"| node_imagegrid
node_contactpage -->|"submits message"| node_client
node_login -->|"sends credentials"| node_client
node_login -->|"sets session"| node_authctx
node_authctx -->|"validates session"| node_client
node_paymentpage -->|"manages payments"| node_client
node_adminpage -->|"manages records"| node_client
node_client -->|"calls API"| node_api
node_api -->|"registers router"| node_authroutes
node_api -->|"registers router"| node_contactroute
node_api -->|"registers router"| node_imageroute
node_api -->|"registers router"| node_paymentroute
node_api -->|"registers router"| node_studentroute
node_authroutes -->|"uses"| node_authlogic
node_authroutes -->|"queries"| node_users
node_authlogic -->|"loads user"| node_users
node_contactroute -->|"records message"| node_contacts
node_contactroute -->|"sends notifications"| node_email
node_imageroute -->|"loads images"| node_blob
node_paymentroute -->|"manages submissions"| node_paymentrecords
node_paymentroute -->|"manages dues"| node_duerecords
node_paymentroute -->|"looks up users"| node_users
node_paymentroute -->|"sends notification"| node_email
node_studentroute -->|"manages students"| node_students
node_studentroute -->|"manages dues"| node_duerecords
node_studentroute -->|"queries parents"| node_users
node_authroutes -->|"gets session"| node_db
node_contactroute -->|"gets session"| node_db
node_paymentroute -->|"gets session"| node_db
node_studentroute -->|"gets session"| node_db

click node_app "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/App.jsx"
click node_home "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/pages/Home.jsx"
click node_gallery "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/pages/Gallery.jsx"
click node_kids "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/pages/Kids.jsx"
click node_imagegrid "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/components/ImageGrid.jsx"
click node_contactpage "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/pages/Contact.jsx"
click node_login "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/pages/Login.jsx"
click node_authctx "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/context/AuthContext.jsx"
click node_guard "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/components/ProtectedRoute.jsx"
click node_paymentpage "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/pages/Payment.jsx"
click node_adminpage "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/pages/AdminPayments.jsx"
click node_client "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/api/client.js"
click node_api "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/main.py"
click node_authroutes "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/routes/auth.py"
click node_authlogic "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/auth.py"
click node_contactroute "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/routes/contact.py"
click node_imageroute "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/routes/images.py"
click node_paymentroute "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/routes/payments.py"
click node_studentroute "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/routes/students.py"
click node_db "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/db.py"
click node_users "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/models/user.py"
click node_paymentrecords "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/models/payment.py"
click node_duerecords "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/models/payment_due.py"
click node_students "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/models/student.py"
click node_contacts "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/models/contact.py"
click node_blob "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/blob.py"
click node_email "https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/email_service.py"

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_home,node_gallery,node_kids,node_imagegrid,node_contactpage,node_visitor toneBlue
class node_login,node_authctx,node_guard,node_authlogic toneAmber
class node_paymentpage,node_adminpage toneMint
class node_client,node_api,node_authroutes,node_contactroute,node_imageroute,node_paymentroute,node_studentroute,node_db,node_users,node_paymentrecords,node_duerecords,node_students,node_contacts toneRose
class node_blob,node_email toneIndigo
```

## Components

### Website experience

- [Page routing](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/App.jsx): `Eklavya/frontend/src/App.jsx`
- [Home page](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/pages/Home.jsx): `Eklavya/frontend/src/pages/Home.jsx`
- [Artwork gallery](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/pages/Gallery.jsx): `Eklavya/frontend/src/pages/Gallery.jsx`
- [Kids gallery](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/pages/Kids.jsx): `Eklavya/frontend/src/pages/Kids.jsx`
- [Image grid](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/components/ImageGrid.jsx): `Eklavya/frontend/src/components/ImageGrid.jsx`
- [Contact form](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/pages/Contact.jsx): `Eklavya/frontend/src/pages/Contact.jsx`

### Accounts and access

- [Login pages](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/pages/Login.jsx): `Eklavya/frontend/src/pages/Login.jsx`
- [Session state](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/context/AuthContext.jsx): `Eklavya/frontend/src/context/AuthContext.jsx`
- [Role protection](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/components/ProtectedRoute.jsx): `Eklavya/frontend/src/components/ProtectedRoute.jsx`
- [Token and password logic](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/auth.py): `Eklavya/backend/app/auth.py`

### School operations

- [Parent payments](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/pages/Payment.jsx): `Eklavya/frontend/src/pages/Payment.jsx`
- [Payment administration](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/pages/AdminPayments.jsx): `Eklavya/frontend/src/pages/AdminPayments.jsx`

### API and persistence

- [HTTP API client](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/frontend/src/api/client.js): `Eklavya/frontend/src/api/client.js`
- [FastAPI application](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/main.py): `Eklavya/backend/app/main.py`
- [Authentication routes](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/routes/auth.py): `Eklavya/backend/app/routes/auth.py`
- [Contact handling](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/routes/contact.py): `Eklavya/backend/app/routes/contact.py`
- [Image endpoints](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/routes/images.py): `Eklavya/backend/app/routes/images.py`
- [Payment handling](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/routes/payments.py): `Eklavya/backend/app/routes/payments.py`
- [Student and dues handling](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/routes/students.py): `Eklavya/backend/app/routes/students.py`
- [Database session](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/db.py): `Eklavya/backend/app/db.py`
- [User records](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/models/user.py): `Eklavya/backend/app/models/user.py`
- [Payment records](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/models/payment.py): `Eklavya/backend/app/models/payment.py`
- [Payment due records](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/models/payment_due.py): `Eklavya/backend/app/models/payment_due.py`
- [Student records](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/models/student.py): `Eklavya/backend/app/models/student.py`
- [Contact records](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/models/contact.py): `Eklavya/backend/app/models/contact.py`

### External services

- [Image blob storage](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/blob.py): `Eklavya/backend/app/blob.py`
- [Email delivery](https://github.com/hrishisawalkar82/eklavyaartschool/blob/main/Eklavya/backend/app/email_service.py): `Eklavya/backend/app/email_service.py`

### Other components

- **Visitor or user**

## Connections

- Visitor or user → Page routing: opens (evidence: `Eklavya/frontend/src/App.jsx`)
- Page routing → Home page: routes to (evidence: `Eklavya/frontend/src/App.jsx`)
- Page routing → Artwork gallery: routes to (evidence: `Eklavya/frontend/src/App.jsx`)
- Page routing → Kids gallery: routes to (evidence: `Eklavya/frontend/src/App.jsx`)
- Page routing → Contact form: routes to (evidence: `Eklavya/frontend/src/App.jsx`)
- Page routing → Login pages: routes to (evidence: `Eklavya/frontend/src/App.jsx`)
- Page routing → Parent payments: routes to (evidence: `Eklavya/frontend/src/App.jsx`)
- Page routing → Role protection: protects route (evidence: `Eklavya/frontend/src/App.jsx`)
- Role protection → Payment administration: renders (evidence: `Eklavya/frontend/src/App.jsx`)
- Page routing → Session state: provides session (evidence: `Eklavya/frontend/src/App.jsx`)
- Home page → HTTP API client: requests content (evidence: `Eklavya/frontend/src/pages/Home.jsx`)
- Artwork gallery → HTTP API client: requests images (evidence: `Eklavya/frontend/src/pages/Gallery.jsx`)
- Kids gallery → HTTP API client: requests images (evidence: `Eklavya/frontend/src/pages/Kids.jsx`)
- Home page → Image grid: renders (evidence: `Eklavya/frontend/src/pages/Home.jsx`)
- Artwork gallery → Image grid: renders (evidence: `Eklavya/frontend/src/pages/Gallery.jsx`)
- Kids gallery → Image grid: renders (evidence: `Eklavya/frontend/src/pages/Kids.jsx`)
- Contact form → HTTP API client: submits message (evidence: `Eklavya/frontend/src/pages/Contact.jsx`)
- Login pages → HTTP API client: sends credentials (evidence: `Eklavya/frontend/src/pages/Login.jsx`)
- Login pages → Session state: sets session (evidence: `Eklavya/frontend/src/pages/Login.jsx`)
- Session state → HTTP API client: validates session (evidence: `Eklavya/frontend/src/context/AuthContext.jsx`)
- Parent payments → HTTP API client: manages payments (evidence: `Eklavya/frontend/src/pages/Payment.jsx`)
- Payment administration → HTTP API client: manages records (evidence: `Eklavya/frontend/src/pages/AdminPayments.jsx`)
- HTTP API client → FastAPI application: calls API (evidence: `Eklavya/frontend/src/api/client.js`)
- FastAPI application → Authentication routes: registers router (evidence: `Eklavya/backend/app/main.py`)
- FastAPI application → Contact handling: registers router (evidence: `Eklavya/backend/app/main.py`)
- FastAPI application → Image endpoints: registers router (evidence: `Eklavya/backend/app/main.py`)
- FastAPI application → Payment handling: registers router (evidence: `Eklavya/backend/app/main.py`)
- FastAPI application → Student and dues handling: registers router (evidence: `Eklavya/backend/app/main.py`)
- Authentication routes → Token and password logic: uses (evidence: `Eklavya/backend/app/routes/auth.py`)
- Authentication routes → User records: queries (evidence: `Eklavya/backend/app/routes/auth.py`)
- Token and password logic → User records: loads user (evidence: `Eklavya/backend/app/auth.py`)
- Contact handling → Contact records: records message (evidence: `Eklavya/backend/app/routes/contact.py`)
- Contact handling → Email delivery: sends notifications (evidence: `Eklavya/backend/app/routes/contact.py`)
- Image endpoints → Image blob storage: loads images (evidence: `Eklavya/backend/app/routes/images.py`)
- Payment handling → Payment records: manages submissions (evidence: `Eklavya/backend/app/routes/payments.py`)
- Payment handling → Payment due records: manages dues (evidence: `Eklavya/backend/app/routes/payments.py`)
- Payment handling → User records: looks up users (evidence: `Eklavya/backend/app/routes/payments.py`)
- Payment handling → Email delivery: sends notification (evidence: `Eklavya/backend/app/routes/payments.py`)
- Student and dues handling → Student records: manages students (evidence: `Eklavya/backend/app/routes/students.py`)
- Student and dues handling → Payment due records: manages dues (evidence: `Eklavya/backend/app/routes/students.py`)
- Student and dues handling → User records: queries parents (evidence: `Eklavya/backend/app/routes/students.py`)
- Authentication routes → Database session: gets session (evidence: `Eklavya/backend/app/routes/auth.py`)
- Contact handling → Database session: gets session (evidence: `Eklavya/backend/app/routes/contact.py`)
- Payment handling → Database session: gets session (evidence: `Eklavya/backend/app/routes/payments.py`)
- Student and dues handling → Database session: gets session (evidence: `Eklavya/backend/app/routes/students.py`)
