# tirthghumo827-netizen/tg_backend architecture

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

- Interactive diagram: https://gitdiagram.com/tirthghumo827-netizen/tg_backend
- Repository: https://github.com/tirthghumo827-netizen/tg_backend

## Overview

TirthGhumo is a FastAPI backend for travel bookings and related services. Customers submit trip or darshan requests, while staff-facing routes support booking administration; the application also exposes authentication, coupons, and QR-based payment amount/QR endpoints. The sampled Divya Drishti flow delegates booking, approval, session, and review operations from its router to a service that persists records. The README is empty, and several package implementations were not sampled, so their product areas are shown without speculative internal wiring.

Main entry points: [`main.py`](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/main.py) (FastAPI application), [`app/divya_drishti/routers/divya_drishti.py`](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/divya_drishti/routers/divya_drishti.py) (Divya Drishti API), [`app/database.py`](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/database.py) (SQL database), [`app/divya_drishti/services/service.py`](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/divya_drishti/services/service.py) (Darshan operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_main["FastAPI application<br/>[main.py]"]
end

subgraph group_trips["Trip products"]
  node_manali["Manali trips<br/>[manali.py]"]
  node_tamia["Tamia trips<br/>[tamia.py]"]
  node_rishikesh["Rishikesh trips<br/>[rishikesh.py]"]
  node_saarthi["Saarthi bookings<br/>[saarthi.py]"]
  node_odt["One Day Trek<br/>[odt.py]"]
  node_pachmarhi["Pachmarhi trips<br/>[pachmarhi.py]"]
  node_enquiry["Enquiries<br/>[enquiry.py]"]
  node_hiring["Hiring<br/>[hiring.py]"]
  node_bhajan["Bhajan jamming<br/>[bhajan_jamming.py]"]
end

subgraph group_darshan["Darshan service"]
  node_vr_darshan["VR Darshan<br/>[vr_darshan.py]"]
  node_divya_router["Divya Drishti API<br/>[divya_drishti.py]"]
  node_executive_panel["Executive panel<br/>[executive_panel.py]"]
  node_darshan_service["Darshan operations<br/>[service.py]"]
  node_slots["Slot availability<br/>[slots.py]"]
end

subgraph group_shared["Shared services"]
  node_auth["Authentication<br/>[auth.py]"]
  node_user_panel["User panel<br/>[user_panel.py]"]
  node_coupons["Coupon routes<br/>[coupons.py]"]
  node_coupon_service["Coupon validation<br/>[coupon_service.py]"]
  node_heritage_coupon["Heritage coupons"]
  node_qr["QR payment tools<br/>[qr.py]"]
  node_database[("SQL database<br/>[database.py]")]
end

node_customer(("Customer"))
node_staff(("Staff"))

node_customer -->|"submits requests"| node_main
node_staff -->|"uses staff routes"| node_main
node_main -->|"mounts routes"| node_manali
node_main -->|"mounts routes"| node_tamia
node_main -->|"mounts routes"| node_rishikesh
node_main -->|"mounts routes"| node_saarthi
node_main -->|"mounts routes"| node_odt
node_main -->|"mounts routes"| node_enquiry
node_main -->|"mounts routes"| node_hiring
node_main -->|"mounts routes"| node_vr_darshan
node_main -->|"mounts routes"| node_bhajan
node_main -->|"mounts routes"| node_divya_router
node_main -->|"mounts routes"| node_executive_panel
node_main -->|"mounts routes"| node_auth
node_main -->|"mounts routes"| node_user_panel
node_main -->|"mounts routes"| node_coupons
node_main -->|"mounts routes"| node_qr
node_main -->|"creates tables"| node_database
node_divya_router -->|"delegates operations"| node_darshan_service
node_darshan_service -->|"reads and writes"| node_database
node_divya_router -->|"uses availability"| node_slots
node_auth -->|"loads user records"| node_database

click node_main "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/main.py"
click node_manali "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/manali.py"
click node_tamia "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/tamia.py"
click node_rishikesh "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/rishikesh.py"
click node_saarthi "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/saarthi.py"
click node_odt "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/odt.py"
click node_pachmarhi "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/pachmarhi.py"
click node_enquiry "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/enquiry.py"
click node_hiring "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/hiring.py"
click node_vr_darshan "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/vr_darshan.py"
click node_divya_router "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/divya_drishti/routers/divya_drishti.py"
click node_executive_panel "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/divya_drishti/routers/executive_panel.py"
click node_darshan_service "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/divya_drishti/services/service.py"
click node_slots "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/divya_drishti/slots.py"
click node_auth "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/routers/auth.py"
click node_user_panel "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/routers/user_panel.py"
click node_coupons "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/routers/coupons.py"
click node_coupon_service "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/services/coupon_service.py"
click node_heritage_coupon "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/services/heritage_coupon_service.py"
click node_qr "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/utils/qr.py"
click node_bhajan "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/bhajan_jamming.py"
click node_database "https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/database.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_main toneBlue
class node_manali,node_tamia,node_rishikesh,node_saarthi,node_odt,node_pachmarhi,node_enquiry,node_hiring,node_bhajan toneAmber
class node_vr_darshan,node_divya_router,node_executive_panel,node_darshan_service,node_slots toneMint
class node_auth,node_user_panel,node_coupons,node_coupon_service,node_heritage_coupon,node_qr,node_database toneRose
class node_customer,node_staff toneIndigo
```

## Components

### Application entry

- [FastAPI application](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/main.py): `main.py`

### Trip products

- [Manali trips](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/manali.py): `app/packages/manali.py`
- [Tamia trips](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/tamia.py): `app/packages/tamia.py`
- [Rishikesh trips](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/rishikesh.py): `app/packages/rishikesh.py`
- [Saarthi bookings](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/saarthi.py): `app/packages/saarthi.py`
- [One Day Trek](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/odt.py): `app/packages/odt.py`
- [Pachmarhi trips](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/pachmarhi.py): `app/packages/pachmarhi.py`
- [Enquiries](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/enquiry.py): `app/packages/enquiry.py`
- [Hiring](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/hiring.py): `app/packages/hiring.py`
- [Bhajan jamming](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/bhajan_jamming.py): `app/packages/bhajan_jamming.py`

### Darshan service

- [VR Darshan](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/packages/vr_darshan.py): `app/packages/vr_darshan.py`
- [Divya Drishti API](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/divya_drishti/routers/divya_drishti.py): `app/divya_drishti/routers/divya_drishti.py`
- [Executive panel](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/divya_drishti/routers/executive_panel.py): `app/divya_drishti/routers/executive_panel.py`
- [Darshan operations](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/divya_drishti/services/service.py): `app/divya_drishti/services/service.py`
- [Slot availability](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/divya_drishti/slots.py): `app/divya_drishti/slots.py`

### Shared services

- [Authentication](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/routers/auth.py): `app/routers/auth.py`
- [User panel](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/routers/user_panel.py): `app/routers/user_panel.py`
- [Coupon routes](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/routers/coupons.py): `app/routers/coupons.py`
- [Coupon validation](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/services/coupon_service.py): `app/services/coupon_service.py`
- [Heritage coupons](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/services/heritage_coupon_service.py): `app/services/heritage_coupon_service.py`
- [QR payment tools](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/utils/qr.py): `app/utils/qr.py`
- [SQL database](https://github.com/tirthghumo827-netizen/tg_backend/blob/main/app/database.py): `app/database.py`

### Other components

- **Customer**
- **Staff**

## Connections

- Customer → FastAPI application: submits requests
- Staff → FastAPI application: uses staff routes
- FastAPI application → Manali trips: mounts routes
- FastAPI application → Tamia trips: mounts routes
- FastAPI application → Rishikesh trips: mounts routes
- FastAPI application → Saarthi bookings: mounts routes
- FastAPI application → One Day Trek: mounts routes
- FastAPI application → Enquiries: mounts routes
- FastAPI application → Hiring: mounts routes
- FastAPI application → VR Darshan: mounts routes
- FastAPI application → Bhajan jamming: mounts routes
- FastAPI application → Divya Drishti API: mounts routes
- FastAPI application → Executive panel: mounts routes
- FastAPI application → Authentication: mounts routes
- FastAPI application → User panel: mounts routes
- FastAPI application → Coupon routes: mounts routes
- FastAPI application → QR payment tools: mounts routes
- FastAPI application → SQL database: creates tables
- Divya Drishti API → Darshan operations: delegates operations
- Darshan operations → SQL database: reads and writes
- Divya Drishti API → Slot availability: uses availability
- Authentication → SQL database: loads user records
