# balajikarthik2004/meenakshi-devotee architecture

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

- Interactive diagram: https://gitdiagram.com/balajikarthik2004/meenakshi-devotee
- Repository: https://github.com/balajikarthik2004/meenakshi-devotee

## Overview

#### Purpose and Runtime
Sri Meenakshi Temple’s Devotee App is a Vite/React/TypeScript SPA prototype for public temple engagement and authenticated devotee self-service: puja sponsorships, donations, events, membership, calendar, receipts, and profile views. It runs entirely against deterministic local mock data, with Vercel configured for SPA deployment.
Paths: `src/main.tsx`, `src/App.tsx`, `vercel.json`.

#### Application Shell and Routing
`main.tsx` mounts the React application; `App.tsx` is the application composition boundary, expected to own route definitions, shared providers, and page-level navigation. Shared header/footer/layout components establish the persistent site shell, while pages represent public, account, and transaction-oriented route endpoints.
Paths: `src/App.tsx`, `src/components/layout/layouts.tsx`, `src/pages/BookingFlow.tsx`.

#### Public Discovery Experience
The home, event, puja catalog, facility, membership, and about pages expose temple programming and conversion paths. The homepage is visually anchored by the rotating festival/deity hero and public financial-transparency presentation; image/video assets are served locally from the public bundle.
Paths: `src/pages/Home.tsx`, `src/components/shared/HeroBanner.tsx`, `public/deities/hero.mp4`.

#### Puja Booking Workflow
Puja sponsorship is the primary multi-step transactional flow. The booking page consumes catalog and scheduling data, collects sponsorship/sankalpam and payment selections through shared primitives, then renders a prototype success outcome. Devotees can subsequently view scheduled items in their timeline and calendar.
Paths: `src/pages/BookingFlow.tsx`, `src/components/shared/SankalpamFieldRepeater.tsx`, `src/components/devotee/MyPujaTimeline.tsx`.

#### Donations, Receipts, and Transparency
Donation flows select funds, preset/custom amounts, recurrence, and payment method, then present tax-receipt information. Transparency UI surfaces reconciled sponsorship and donation totals; mock seed generation guarantees repeatable figures, including the published $723,000 reconciliation.
Paths: `src/pages/Donate.tsx`, `src/components/shared/TaxReceiptPreview.tsx`, `src/lib/data/mock/seed.ts`.

#### Calendar and Event Domain
Calendar and event pages provide month-level discovery, event details, and filtering for a signed-in devotee’s pujas. Domain scheduling/calendar utilities separate date and occurrence calculations from rendering components.
Paths: `src/pages/CalendarPage.tsx`, `src/pages/EventDetail.tsx`, `src/lib/calendar.ts`.

#### Data, Identity, and Integration Boundary
Domain types and the `api.ts` module form the intended backend substitution boundary. Current implementations are local seeded fixtures covering bookings, catalog, donations, events, memberships, temple data, and users. Zustand-backed auth provides prototype sign-in state; any email/phone resolves to a seeded user behavior described by the prototype.
Paths: `src/lib/data/api.ts`, `src/lib/data/types.ts`, `src/lib/store/auth.ts`.

#### UI System and Deployment
Reusable shared components encode domain-facing UI patterns, while `src/components/ui/` supplies lower-level shadcn-style controls. Tailwind v4 supplies styling. The app has no live external services at present; fonts and deity imagery are bundled locally, and Vercel hosts the built SPA with route rewrites.
Paths: `src/components/ui`, `src/index.css`, `public/fonts`.

Main entry points: [`src/App.tsx`](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/App.tsx) (App shell & routes), [`src/lib/data/api.ts`](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/lib/data/api.ts) (Backend substitution API), [`src/pages/BookingFlow.tsx`](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/pages/BookingFlow.tsx) (Puja booking flow), [`src/pages/Donate.tsx`](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/pages/Donate.tsx) (Donations & receipts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["SPA Runtime"]
  node_entry(("React entry<br/>bootstrap<br/>[main.tsx]"))
  node_app["App shell &amp; routes<br/>composition<br/>[App.tsx]"]
  node_layout["Persistent layout<br/>site shell<br/>[layouts.tsx]"]
  node_vercel["Vercel SPA hosting<br/>deployment<br/>[vercel.json]"]
end

subgraph group_experiences["Devotee Experiences"]
  node_public_pages["Public discovery pages<br/>route pages<br/>[Home.tsx]"]
  node_booking["Puja booking flow<br/>transaction route<br/>[BookingFlow.tsx]"]
  node_timeline["My puja timeline<br/>devotee view<br/>[MyPujaTimeline.tsx]"]
  node_donate["Donations &amp; receipts<br/>transaction route<br/>[Donate.tsx]"]
  node_calendar_events["Calendar &amp; event routes<br/>route pages<br/>[CalendarPage.tsx]"]
end

subgraph group_domain["Domain &amp; Data"]
  node_calendar_domain{{"Calendar utilities<br/>domain utility<br/>[calendar.ts]"}}
  node_auth["Prototype auth store<br/>Zustand store<br/>[auth.ts]"]
  node_api{{"Backend substitution API<br/>data boundary<br/>[api.ts]"}}
  node_types["Domain types<br/>domain model<br/>[types.ts]"]
  node_seed[("Deterministic mock seed<br/>local fixtures<br/>[seed.ts]")]
end

subgraph group_ui["UI &amp; Assets"]
  node_hero["Festival hero<br/>shared component<br/>[HeroBanner.tsx]"]
  node_sankalpam["Sankalpam inputs<br/>shared component"]
  node_receipt["Tax receipt preview<br/>shared component"]
  node_ui_primitives["UI primitives<br/>component library"]
  node_styles["Tailwind styling<br/>styles<br/>[index.css]"]
  node_media["Bundled media<br/>local assets<br/>[hero.mp4]"]
end

node_entry -->|"mounts"| node_app
node_app -->|"uses"| node_layout
node_app -->|"routes to"| node_public_pages
node_app -->|"routes to"| node_booking
node_app -->|"routes to"| node_donate
node_app -->|"routes to"| node_calendar_events
node_app -->|"provides session state"| node_auth
node_public_pages -->|"renders"| node_hero
node_hero -->|"plays"| node_media
node_booking -->|"collects"| node_sankalpam
node_booking -->|"reads and creates"| node_api
node_booking -.->|"scheduled items appear in"| node_timeline
node_donate -->|"renders"| node_receipt
node_donate -->|"reads and records"| node_api
node_calendar_events -->|"calculates with"| node_calendar_domain
node_calendar_events -->|"loads events and pujas"| node_api
node_api -->|"uses"| node_types
node_api -->|"currently backed by"| node_seed
node_timeline -->|"loads scheduled pujas"| node_api
node_app -->|"composes"| node_ui_primitives
node_app -->|"applies"| node_styles
node_vercel -->|"serves SPA"| node_app

click node_entry "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/main.tsx"
click node_app "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/App.tsx"
click node_layout "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/components/layout/layouts.tsx"
click node_public_pages "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/pages/Home.tsx"
click node_hero "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/components/shared/HeroBanner.tsx"
click node_booking "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/pages/BookingFlow.tsx"
click node_sankalpam "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/components/shared/SankalpamFieldRepeater.tsx"
click node_timeline "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/components/devotee/MyPujaTimeline.tsx"
click node_donate "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/pages/Donate.tsx"
click node_receipt "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/components/shared/TaxReceiptPreview.tsx"
click node_calendar_events "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/pages/CalendarPage.tsx"
click node_calendar_domain "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/lib/calendar.ts"
click node_auth "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/lib/store/auth.ts"
click node_api "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/lib/data/api.ts"
click node_types "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/lib/data/types.ts"
click node_seed "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/lib/data/mock/seed.ts"
click node_ui_primitives "https://github.com/balajikarthik2004/meenakshi-devotee/tree/main/src/components/ui"
click node_styles "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/index.css"
click node_media "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/public/deities/hero.mp4"
click node_vercel "https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/vercel.json"

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_entry,node_app,node_layout,node_vercel toneBlue
class node_public_pages,node_booking,node_timeline,node_donate,node_calendar_events toneAmber
class node_calendar_domain,node_auth,node_api,node_types,node_seed toneMint
class node_hero,node_sankalpam,node_receipt,node_ui_primitives,node_styles,node_media toneRose
```

## Components

### SPA Runtime

- [React entry](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/main.tsx): bootstrap · Mounts the Vite React application. · `src/main.tsx`
- [App shell & routes](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/App.tsx): composition · Owns routes, providers, and page navigation. · `src/App.tsx`
- [Persistent layout](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/components/layout/layouts.tsx): site shell · Shared header, footer, and layout components. · `src/components/layout/layouts.tsx`
- [Vercel SPA hosting](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/vercel.json): deployment · Hosts the built SPA with route rewrites. · `vercel.json`

### Devotee Experiences

- [Public discovery pages](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/pages/Home.tsx): route pages · Home, catalog, facilities, membership, and about conversion paths. · `src/pages/Home.tsx`
- [Puja booking flow](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/pages/BookingFlow.tsx): transaction route · Multi-step sponsorship, sankalpam, payment, and success flow. · `src/pages/BookingFlow.tsx`
- [My puja timeline](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/components/devotee/MyPujaTimeline.tsx): devotee view · Shows scheduled devotee pujas after booking. · `src/components/devotee/MyPujaTimeline.tsx`
- [Donations & receipts](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/pages/Donate.tsx): transaction route · Fund, amount, recurrence, payment, and receipt flow. · `src/pages/Donate.tsx`
- [Calendar & event routes](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/pages/CalendarPage.tsx): route pages · Month discovery, event details, and devotee puja filtering. · `src/pages/CalendarPage.tsx`

### Domain & Data

- [Calendar utilities](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/lib/calendar.ts): domain utility · Date and occurrence calculations separate from rendering. · `src/lib/calendar.ts`
- [Prototype auth store](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/lib/store/auth.ts): Zustand store · Maps any email or phone sign-in to seeded-user state. · `src/lib/store/auth.ts`
- [Backend substitution API](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/lib/data/api.ts): data boundary · Intended interface for replacing local implementations. · `src/lib/data/api.ts`
- [Domain types](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/lib/data/types.ts): domain model · Types for bookings, catalog, donations, events, memberships, temple data, and users. · `src/lib/data/types.ts`
- [Deterministic mock seed](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/lib/data/mock/seed.ts): local fixtures · Produces repeatable domain data and reconciliation totals. · `src/lib/data/mock/seed.ts`

### UI & Assets

- [Festival hero](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/components/shared/HeroBanner.tsx): shared component · Rotating deity and festival presentation. · `src/components/shared/HeroBanner.tsx`
- [Sankalpam inputs](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/components/shared/SankalpamFieldRepeater.tsx): shared component · `src/components/shared/SankalpamFieldRepeater.tsx`
- [Tax receipt preview](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/components/shared/TaxReceiptPreview.tsx): shared component · `src/components/shared/TaxReceiptPreview.tsx`
- [UI primitives](https://github.com/balajikarthik2004/meenakshi-devotee/tree/main/src/components/ui): component library · Lower-level shadcn-style controls. · `src/components/ui`
- [Tailwind styling](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/src/index.css): styles · `src/index.css`
- [Bundled media](https://github.com/balajikarthik2004/meenakshi-devotee/blob/main/public/deities/hero.mp4): local assets · Local deity video and fonts; no external media service. · `public/deities/hero.mp4`

## Connections

- React entry → App shell & routes: mounts
- App shell & routes → Persistent layout: uses
- App shell & routes → Public discovery pages: routes to
- App shell & routes → Puja booking flow: routes to
- App shell & routes → Donations & receipts: routes to
- App shell & routes → Calendar & event routes: routes to
- App shell & routes → Prototype auth store: provides session state
- Public discovery pages → Festival hero: renders
- Festival hero → Bundled media: plays
- Puja booking flow → Sankalpam inputs: collects
- Puja booking flow → Backend substitution API: reads and creates
- Puja booking flow → My puja timeline: scheduled items appear in
- Donations & receipts → Tax receipt preview: renders
- Donations & receipts → Backend substitution API: reads and records
- Calendar & event routes → Calendar utilities: calculates with
- Calendar & event routes → Backend substitution API: loads events and pujas
- Backend substitution API → Domain types: uses
- Backend substitution API → Deterministic mock seed: currently backed by
- My puja timeline → Backend substitution API: loads scheduled pujas
- App shell & routes → UI primitives: composes
- App shell & routes → Tailwind styling: applies
- Vercel SPA hosting → App shell & routes: serves SPA
