# chaithumoorpa/svvd-thorur architecture

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

- Interactive diagram: https://gitdiagram.com/chaithumoorpa/svvd-thorur
- Repository: https://github.com/chaithumoorpa/svvd-thorur

## Overview

SVVD Thorur is a temple-management platform combining a multilingual public site, online seva booking, and staff administration. The principal workflow is a devotee browsing sevas and booking one; the backend validates the selected seva, creates a ticket, and records related operational data. Staff then manage tickets, donations, finance, and temple content through role-protected admin workflows. The map includes the documented auth, notifications, and storage capabilities. Some feature modules are represented by their exact tree paths; their internal wiring is not expanded where source excerpts were unavailable.

Main entry points: [`backend/app/repositories`](https://github.com/chaithumoorpa/svvd-thorur/tree/development/backend/app/repositories) (Repositories), [`backend/app/api/v1/api.py`](https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/api/v1/api.py) (API routes), [`backend/app/services/seva_ticket_service.py`](https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/services/seva_ticket_service.py) (Ticket service), [`backend/app/services/donor_service.py`](https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/services/donor_service.py) (Donations service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_public["Public pages"]
  node_admin["Admin pages"]
  node_booking_ui["Seva booking UI<br/>[BookSeva.tsx]"]
  node_web_api["API client<br/>[api.ts]"]
end

subgraph group_api["API and access"]
  node_app["FastAPI app<br/>[main.py]"]
  node_routes["API routes<br/>[api.py]"]
  node_auth_routes["Auth routes<br/>[auth.py]"]
  node_auth_service["Auth service<br/>[auth_service.py]"]
  node_tickets_api["Seva ticket API<br/>[seva_tickets.py]"]
  node_donors_api["Donor API<br/>[donors.py]"]
end

subgraph group_domain["Temple operations"]
  node_tickets["Ticket service"]
  node_donors["Donations service<br/>[donor_service.py]"]
  node_content_services["Content services"]
  node_finance_services["Finance services<br/>[finance_service.py]"]
  node_notifications["Email notifications<br/>[email_service.py]"]
end

subgraph group_data["Persistence and integrations"]
  node_models["Domain models"]
  node_repositories["Repositories"]
  node_database[("SQL database<br/>[database.py]")]
  node_storage["Object storage<br/>[storage_service.py]"]
end

node_devotee(("Devotee"))
node_staff(("Temple staff"))
node_s3[("AWS S3")]
node_ses["AWS SES"]

node_devotee -->|"browses"| node_public
node_devotee -->|"books seva"| node_booking_ui
node_staff -->|"manages"| node_admin
node_booking_ui -->|"submits booking"| node_web_api
node_public -->|"requests data"| node_web_api
node_admin -->|"requests operations"| node_web_api
node_web_api -->|"calls API"| node_app
node_app -->|"dispatches"| node_routes
node_routes -->|"routes auth"| node_auth_routes
node_auth_routes -->|"invokes"| node_auth_service
node_auth_service -->|"reads and writes"| node_repositories
node_routes -->|"routes tickets"| node_tickets_api
node_tickets_api -->|"invokes"| node_tickets
node_tickets -->|"reads and writes"| node_repositories
node_routes -->|"routes donations"| node_donors_api
node_donors_api -->|"invokes"| node_donors
node_donors -->|"reads and writes"| node_repositories
node_tickets -->|"records income"| node_finance_services
node_donors -->|"syncs ledger"| node_finance_services
node_repositories -->|"queries"| node_models
node_repositories -->|"persists"| node_database
node_content_services -->|"uses repositories"| node_repositories
node_tickets -.->|"archives ticket"| node_storage
node_donors -.->|"archives receipt"| node_storage
node_storage -.->|"uploads"| node_s3
node_auth_routes -->|"sends account email"| node_notifications
node_notifications -.->|"sends email"| node_ses

click node_public "https://github.com/chaithumoorpa/svvd-thorur/tree/development/frontend/app/%5Blocale%5D/(public)"
click node_admin "https://github.com/chaithumoorpa/svvd-thorur/tree/development/frontend/app/admin"
click node_booking_ui "https://github.com/chaithumoorpa/svvd-thorur/blob/development/frontend/components/public/BookSeva.tsx"
click node_web_api "https://github.com/chaithumoorpa/svvd-thorur/blob/development/frontend/lib/api.ts"
click node_app "https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/main.py"
click node_routes "https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/api/v1/api.py"
click node_auth_routes "https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/api/v1/auth.py"
click node_auth_service "https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/services/auth_service.py"
click node_tickets_api "https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/api/v1/seva_tickets.py"
click node_tickets "https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/services/seva_ticket_service.py"
click node_donors_api "https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/api/v1/donors.py"
click node_donors "https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/services/donor_service.py"
click node_content_services "https://github.com/chaithumoorpa/svvd-thorur/tree/development/backend/app/services"
click node_finance_services "https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/services/finance_service.py"
click node_models "https://github.com/chaithumoorpa/svvd-thorur/tree/development/backend/app/models"
click node_repositories "https://github.com/chaithumoorpa/svvd-thorur/tree/development/backend/app/repositories"
click node_database "https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/core/database.py"
click node_storage "https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/services/storage_service.py"
click node_notifications "https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/services/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_public,node_admin,node_booking_ui,node_web_api toneBlue
class node_app,node_routes,node_auth_routes,node_auth_service,node_tickets_api,node_donors_api,node_s3 toneAmber
class node_tickets,node_donors,node_content_services,node_finance_services,node_notifications toneMint
class node_models,node_repositories,node_database,node_storage toneRose
class node_devotee,node_staff,node_ses toneIndigo
```

## Components

### Web experience

- [Public pages](https://github.com/chaithumoorpa/svvd-thorur/tree/development/frontend/app/%5Blocale%5D/(public)): `frontend/app/[locale]/(public)`
- [Admin pages](https://github.com/chaithumoorpa/svvd-thorur/tree/development/frontend/app/admin): `frontend/app/admin`
- [Seva booking UI](https://github.com/chaithumoorpa/svvd-thorur/blob/development/frontend/components/public/BookSeva.tsx): `frontend/components/public/BookSeva.tsx`
- [API client](https://github.com/chaithumoorpa/svvd-thorur/blob/development/frontend/lib/api.ts): `frontend/lib/api.ts`

### API and access

- [FastAPI app](https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/main.py): `backend/app/main.py`
- [API routes](https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/api/v1/api.py): `backend/app/api/v1/api.py`
- [Auth routes](https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/api/v1/auth.py): `backend/app/api/v1/auth.py`
- [Auth service](https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/services/auth_service.py): `backend/app/services/auth_service.py`
- [Seva ticket API](https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/api/v1/seva_tickets.py): `backend/app/api/v1/seva_tickets.py`
- [Donor API](https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/api/v1/donors.py): `backend/app/api/v1/donors.py`

### Temple operations

- [Ticket service](https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/services/seva_ticket_service.py): `backend/app/services/seva_ticket_service.py`
- [Donations service](https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/services/donor_service.py): `backend/app/services/donor_service.py`
- [Content services](https://github.com/chaithumoorpa/svvd-thorur/tree/development/backend/app/services): `backend/app/services`
- [Finance services](https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/services/finance_service.py): `backend/app/services/finance_service.py`
- [Email notifications](https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/services/email_service.py): `backend/app/services/email_service.py`

### Persistence and integrations

- [Domain models](https://github.com/chaithumoorpa/svvd-thorur/tree/development/backend/app/models): `backend/app/models`
- [Repositories](https://github.com/chaithumoorpa/svvd-thorur/tree/development/backend/app/repositories): `backend/app/repositories`
- [SQL database](https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/core/database.py): `backend/app/core/database.py`
- [Object storage](https://github.com/chaithumoorpa/svvd-thorur/blob/development/backend/app/services/storage_service.py): `backend/app/services/storage_service.py`

### Other components

- **Devotee**
- **Temple staff**
- **AWS S3**
- **AWS SES**

## Connections

- Devotee → Public pages: browses
- Devotee → Seva booking UI: books seva
- Temple staff → Admin pages: manages
- Seva booking UI → API client: submits booking
- Public pages → API client: requests data
- Admin pages → API client: requests operations
- API client → FastAPI app: calls API
- FastAPI app → API routes: dispatches
- API routes → Auth routes: routes auth
- Auth routes → Auth service: invokes
- Auth service → Repositories: reads and writes
- API routes → Seva ticket API: routes tickets
- Seva ticket API → Ticket service: invokes
- Ticket service → Repositories: reads and writes
- API routes → Donor API: routes donations
- Donor API → Donations service: invokes
- Donations service → Repositories: reads and writes
- Ticket service → Finance services: records income
- Donations service → Finance services: syncs ledger
- Repositories → Domain models: queries
- Repositories → SQL database: persists
- Content services → Repositories: uses repositories
- Ticket service → Object storage: archives ticket
- Donations service → Object storage: archives receipt
- Object storage → AWS S3: uploads
- Auth routes → Email notifications: sends account email
- Email notifications → AWS SES: sends email
