# parani6379/modern_event_management architecture

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

- Interactive diagram: https://gitdiagram.com/parani6379/modern_event_management
- Repository: https://github.com/parani6379/modern_event_management

## Overview

Karuna is an event-rental management and POS application. Customers browse a bilingual rental catalog, build and submit booking estimates, then track requests and invoices. Staff manage bookings, inventory, billing, scheduling, and reporting; the README describes these capabilities, while sampled code confirms selected booking, authentication, Supabase, invoice, and notification connections. Several admin and customer pages were not sampled, so their internal links are represented only where documented or indexed.

Main entry points: [`src/app/booking/page.tsx`](https://github.com/parani6379/modern_event_management/blob/main/src/app/booking/page.tsx) (Booking estimator), [`src/lib/supabase/client.ts`](https://github.com/parani6379/modern_event_management/blob/main/src/lib/supabase/client.ts) (Browser client), [`src/app/admin/page.tsx`](https://github.com/parani6379/modern_event_management/blob/main/src/app/admin/page.tsx) (Admin dashboard), [`src/app/admin/billing/page.tsx`](https://github.com/parani6379/modern_event_management/blob/main/src/app/admin/billing/page.tsx) (Billing and POS)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer experience"]
  node_catalog["Rental catalog<br/>[ServicesClient.tsx]"]
  node_estimator["Booking estimator<br/>[page.tsx]"]
  node_tracking["Booking tracking<br/>[page.tsx]"]
  node_home["Public home<br/>[HomeClient.tsx]"]
end

subgraph group_operations["Admin operations"]
  node_adminui["Admin dashboard<br/>[page.tsx]"]
  node_adminbookings["Booking management<br/>[page.tsx]"]
  node_inventory["Inventory management<br/>[page.tsx]"]
  node_billing["Billing and POS<br/>[page.tsx]"]
  node_workforce["Workforce scheduling<br/>[page.tsx]"]
  node_reports["Finance and reports<br/>[page.tsx]"]
end

subgraph group_runtime["Application services"]
  node_bookingactions["Booking actions<br/>[bookings.ts]"]
  node_adminauth["Admin authorization"]
  node_language["Language context"]
  node_products["Product actions<br/>[products.ts]"]
  node_invoice["Invoice rendering<br/>[InvoicePreview.tsx]"]
  node_receipt["Print receipts<br/>[PrintReceipt.tsx]"]
  node_billroute["Send bill API<br/>[route.ts]"]
end

subgraph group_data["Data and messaging"]
  node_notifications["Bill notifications<br/>[notify.ts]"]
  node_email["Email delivery<br/>[email.ts]"]
  node_sms["SMS delivery<br/>[sms.ts]"]
  node_browserdb["Browser client<br/>[client.ts]"]
  node_serverdb["Server client<br/>[server.ts]"]
  node_admindb["Admin client<br/>[admin.ts]"]
  node_supabase[("Supabase database")]
end

node_customer(("Customer"))

node_customer -->|"browses"| node_catalog
node_customer -->|"builds estimate"| node_estimator
node_customer -->|"tracks bookings"| node_tracking
node_home -->|"links to"| node_catalog
node_home -->|"links to"| node_estimator
node_catalog -->|"loads products"| node_products
node_estimator -->|"submits booking"| node_bookingactions
node_estimator -->|"loads products"| node_products
node_bookingactions -->|"uses"| node_admindb
node_bookingactions -->|"sends email"| node_email
node_catalog -->|"uses translations"| node_language
node_estimator -->|"uses translations"| node_language
node_adminui -->|"reads data"| node_browserdb
node_adminbookings -->|"reads data"| node_browserdb
node_adminbookings -->|"checks permissions"| node_adminauth
node_billing -->|"reads data"| node_browserdb
node_billing -->|"checks permissions"| node_adminauth
node_billing -->|"renders invoice"| node_invoice
node_billing -->|"prints receipt"| node_receipt
node_adminauth -->|"fetches roles"| node_browserdb
node_billroute -->|"authorizes request"| node_serverdb
node_billroute -->|"dispatches bill"| node_notifications
node_notifications -->|"sends email"| node_email
node_notifications -->|"sends SMS"| node_sms
node_browserdb -.->|"queries"| node_supabase
node_serverdb -.->|"queries"| node_supabase
node_admindb -.->|"queries"| node_supabase
node_adminbookings -->|"uses actions"| node_bookingactions
node_adminui -.->|"supports operations"| node_workforce
node_adminui -.->|"supports operations"| node_inventory
node_adminui -.->|"supports analytics"| node_reports

click node_catalog "https://github.com/parani6379/modern_event_management/blob/main/src/app/services/ServicesClient.tsx"
click node_estimator "https://github.com/parani6379/modern_event_management/blob/main/src/app/booking/page.tsx"
click node_bookingactions "https://github.com/parani6379/modern_event_management/blob/main/src/lib/actions/bookings.ts"
click node_tracking "https://github.com/parani6379/modern_event_management/blob/main/src/app/my-bookings/page.tsx"
click node_home "https://github.com/parani6379/modern_event_management/blob/main/src/app/HomeClient.tsx"
click node_adminui "https://github.com/parani6379/modern_event_management/blob/main/src/app/admin/page.tsx"
click node_adminbookings "https://github.com/parani6379/modern_event_management/blob/main/src/app/admin/bookings/page.tsx"
click node_inventory "https://github.com/parani6379/modern_event_management/blob/main/src/app/admin/products/page.tsx"
click node_billing "https://github.com/parani6379/modern_event_management/blob/main/src/app/admin/billing/page.tsx"
click node_workforce "https://github.com/parani6379/modern_event_management/blob/main/src/app/admin/labourers/page.tsx"
click node_reports "https://github.com/parani6379/modern_event_management/blob/main/src/app/admin/expenses/page.tsx"
click node_adminauth "https://github.com/parani6379/modern_event_management/blob/main/src/context/AdminAuthContext.tsx"
click node_language "https://github.com/parani6379/modern_event_management/blob/main/src/context/LanguageContext.tsx"
click node_products "https://github.com/parani6379/modern_event_management/blob/main/src/lib/actions/products.ts"
click node_invoice "https://github.com/parani6379/modern_event_management/blob/main/src/components/ui/InvoicePreview.tsx"
click node_receipt "https://github.com/parani6379/modern_event_management/blob/main/src/components/ui/PrintReceipt.tsx"
click node_billroute "https://github.com/parani6379/modern_event_management/blob/main/src/app/api/send-bill/route.ts"
click node_notifications "https://github.com/parani6379/modern_event_management/blob/main/src/lib/notifications/notify.ts"
click node_email "https://github.com/parani6379/modern_event_management/blob/main/src/lib/notifications/email.ts"
click node_sms "https://github.com/parani6379/modern_event_management/blob/main/src/lib/notifications/sms.ts"
click node_browserdb "https://github.com/parani6379/modern_event_management/blob/main/src/lib/supabase/client.ts"
click node_serverdb "https://github.com/parani6379/modern_event_management/blob/main/src/lib/supabase/server.ts"
click node_admindb "https://github.com/parani6379/modern_event_management/blob/main/src/lib/supabase/admin.ts"

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_catalog,node_estimator,node_tracking,node_home toneBlue
class node_adminui,node_adminbookings,node_inventory,node_billing,node_workforce,node_reports toneAmber
class node_bookingactions,node_adminauth,node_language,node_products,node_invoice,node_receipt,node_billroute toneMint
class node_notifications,node_email,node_sms,node_browserdb,node_serverdb,node_admindb,node_supabase toneRose
class node_customer toneIndigo
```

## Components

### Customer experience

- [Rental catalog](https://github.com/parani6379/modern_event_management/blob/main/src/app/services/ServicesClient.tsx): `src/app/services/ServicesClient.tsx`
- [Booking estimator](https://github.com/parani6379/modern_event_management/blob/main/src/app/booking/page.tsx): `src/app/booking/page.tsx`
- [Booking tracking](https://github.com/parani6379/modern_event_management/blob/main/src/app/my-bookings/page.tsx): `src/app/my-bookings/page.tsx`
- [Public home](https://github.com/parani6379/modern_event_management/blob/main/src/app/HomeClient.tsx): `src/app/HomeClient.tsx`

### Admin operations

- [Admin dashboard](https://github.com/parani6379/modern_event_management/blob/main/src/app/admin/page.tsx): `src/app/admin/page.tsx`
- [Booking management](https://github.com/parani6379/modern_event_management/blob/main/src/app/admin/bookings/page.tsx): `src/app/admin/bookings/page.tsx`
- [Inventory management](https://github.com/parani6379/modern_event_management/blob/main/src/app/admin/products/page.tsx): `src/app/admin/products/page.tsx`
- [Billing and POS](https://github.com/parani6379/modern_event_management/blob/main/src/app/admin/billing/page.tsx): `src/app/admin/billing/page.tsx`
- [Workforce scheduling](https://github.com/parani6379/modern_event_management/blob/main/src/app/admin/labourers/page.tsx): `src/app/admin/labourers/page.tsx`
- [Finance and reports](https://github.com/parani6379/modern_event_management/blob/main/src/app/admin/expenses/page.tsx): `src/app/admin/expenses/page.tsx`

### Application services

- [Booking actions](https://github.com/parani6379/modern_event_management/blob/main/src/lib/actions/bookings.ts): `src/lib/actions/bookings.ts`
- [Admin authorization](https://github.com/parani6379/modern_event_management/blob/main/src/context/AdminAuthContext.tsx): `src/context/AdminAuthContext.tsx`
- [Language context](https://github.com/parani6379/modern_event_management/blob/main/src/context/LanguageContext.tsx): `src/context/LanguageContext.tsx`
- [Product actions](https://github.com/parani6379/modern_event_management/blob/main/src/lib/actions/products.ts): `src/lib/actions/products.ts`
- [Invoice rendering](https://github.com/parani6379/modern_event_management/blob/main/src/components/ui/InvoicePreview.tsx): `src/components/ui/InvoicePreview.tsx`
- [Print receipts](https://github.com/parani6379/modern_event_management/blob/main/src/components/ui/PrintReceipt.tsx): `src/components/ui/PrintReceipt.tsx`
- [Send bill API](https://github.com/parani6379/modern_event_management/blob/main/src/app/api/send-bill/route.ts): `src/app/api/send-bill/route.ts`

### Data and messaging

- [Bill notifications](https://github.com/parani6379/modern_event_management/blob/main/src/lib/notifications/notify.ts): `src/lib/notifications/notify.ts`
- [Email delivery](https://github.com/parani6379/modern_event_management/blob/main/src/lib/notifications/email.ts): `src/lib/notifications/email.ts`
- [SMS delivery](https://github.com/parani6379/modern_event_management/blob/main/src/lib/notifications/sms.ts): `src/lib/notifications/sms.ts`
- [Browser client](https://github.com/parani6379/modern_event_management/blob/main/src/lib/supabase/client.ts): `src/lib/supabase/client.ts`
- [Server client](https://github.com/parani6379/modern_event_management/blob/main/src/lib/supabase/server.ts): `src/lib/supabase/server.ts`
- [Admin client](https://github.com/parani6379/modern_event_management/blob/main/src/lib/supabase/admin.ts): `src/lib/supabase/admin.ts`
- **Supabase database**

### Other components

- **Customer**

## Connections

- Customer → Rental catalog: browses
- Customer → Booking estimator: builds estimate
- Customer → Booking tracking: tracks bookings
- Public home → Rental catalog: links to (evidence: `src/app/HomeClient.tsx`)
- Public home → Booking estimator: links to (evidence: `src/app/HomeClient.tsx`)
- Rental catalog → Product actions: loads products (evidence: `src/app/services/ServicesClient.tsx`)
- Booking estimator → Booking actions: submits booking (evidence: `src/app/booking/page.tsx`)
- Booking estimator → Product actions: loads products (evidence: `src/app/booking/page.tsx`)
- Booking actions → Admin client: uses (evidence: `src/lib/actions/bookings.ts`)
- Booking actions → Email delivery: sends email (evidence: `src/lib/actions/bookings.ts`)
- Rental catalog → Language context: uses translations (evidence: `src/app/services/ServicesClient.tsx`)
- Booking estimator → Language context: uses translations (evidence: `src/app/booking/page.tsx`)
- Admin dashboard → Browser client: reads data (evidence: `src/app/admin/page.tsx`)
- Booking management → Browser client: reads data (evidence: `src/app/admin/bookings/page.tsx`)
- Booking management → Admin authorization: checks permissions (evidence: `src/app/admin/bookings/page.tsx`)
- Billing and POS → Browser client: reads data (evidence: `src/app/admin/billing/page.tsx`)
- Billing and POS → Admin authorization: checks permissions (evidence: `src/app/admin/billing/page.tsx`)
- Billing and POS → Invoice rendering: renders invoice (evidence: `src/app/admin/billing/page.tsx`)
- Billing and POS → Print receipts: prints receipt (evidence: `src/app/admin/billing/page.tsx`)
- Admin authorization → Browser client: fetches roles (evidence: `src/context/AdminAuthContext.tsx`)
- Send bill API → Server client: authorizes request (evidence: `src/app/api/send-bill/route.ts`)
- Send bill API → Bill notifications: dispatches bill (evidence: `src/app/api/send-bill/route.ts`)
- Bill notifications → Email delivery: sends email (evidence: `src/lib/notifications/notify.ts`)
- Bill notifications → SMS delivery: sends SMS (evidence: `src/lib/notifications/notify.ts`)
- Browser client → Supabase database: queries
- Server client → Supabase database: queries
- Admin client → Supabase database: queries
- Booking management → Booking actions: uses actions (evidence: `src/app/admin/bookings/page.tsx`)
- Admin dashboard → Workforce scheduling: supports operations
- Admin dashboard → Inventory management: supports operations
- Admin dashboard → Finance and reports: supports analytics
