# kothakula-sagar/munner-trip architecture

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

- Interactive diagram: https://gitdiagram.com/kothakula-sagar/munner-trip
- Repository: https://github.com/kothakula-sagar/munner-trip

## Overview

Munnar Trip is a private group-trip web app. Members sign in, then use its tabbed interface for shared trip planning, expenses, chat, media, polls, notifications, and settlement tracking; administrators also manage members and approve group expenses. Feature modules read and write shared Firebase data, while authentication loads each member’s profile and role. The README documents member creation through a Cloud Function. Some capability modules were indexed but not excerpted, so their internal calls are not inferred here.

Main entry points: [`app.js`](https://github.com/kothakula-sagar/munner-trip/blob/main/app.js) (Tab and auth routing), [`notification-service.js`](https://github.com/kothakula-sagar/munner-trip/blob/main/notification-service.js) (Notification service), [`admin.js`](https://github.com/kothakula-sagar/munner-trip/blob/main/admin.js) (Member administration), [`dashboard.js`](https://github.com/kothakula-sagar/munner-trip/blob/main/dashboard.js) (Trip dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_app["Tab and auth routing<br/>[app.js]"]
  node_auth["Sign-in and profiles<br/>[auth.js]"]
  node_admin["Member administration<br/>[admin.js]"]
  node_memberfn["Create member account<br/>[index.js]"]
end

subgraph group_trip["Trip coordination"]
  node_dashboard["Trip dashboard<br/>[dashboard.js]"]
  node_planner["Itinerary planner<br/>[planner.js]"]
  node_media["Photo and video gallery<br/>[media.js]"]
  node_polls["Group polls<br/>[polls.js]"]
end

subgraph group_money["Shared finances"]
  node_expenses["Expense approval and split<br/>[expenses.js]"]
  node_settlements["Settlement tracking<br/>[settlements.js]"]
end

subgraph group_community["Group communication"]
  node_chat["Group and direct chat<br/>[chat.js]"]
  node_notifications["Notification center"]
  node_notifyservice["Notification service"]
  node_avatar["Avatar renderer<br/>[avatar.js]"]
end

subgraph group_platform["Application services"]
  node_config["Firebase configuration<br/>[firebase-config.js]"]
  node_firebase[("Firebase Auth and Firestore")]
end

node_member(("Trip member"))

node_member -->|"uses"| node_app
node_app -->|"handles sign-in"| node_auth
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_planner
node_app -->|"routes to"| node_media
node_app -->|"routes to"| node_chat
node_app -->|"routes to"| node_expenses
node_app -->|"routes to"| node_settlements
node_app -->|"routes to"| node_notifications
node_admin -->|"requests account creation"| node_memberfn
node_auth -->|"authenticates and loads profiles"| node_firebase
node_admin -->|"manages member records"| node_firebase
node_expenses -->|"reads and updates expenses"| node_firebase
node_planner -->|"reads and writes itinerary"| node_firebase
node_chat -->|"reads and writes messages"| node_firebase
node_dashboard -->|"subscribes to trip data"| node_firebase
node_settlements -->|"records settlement data"| node_firebase
node_notifyservice -->|"stores and subscribes"| node_firebase
node_app -->|"subscribes unread count"| node_notifyservice
node_notifications -->|"loads and marks notifications"| node_notifyservice
node_expenses -->|"sends approval alerts"| node_notifyservice
node_planner -->|"sends planner alerts"| node_notifyservice
node_admin -->|"sends member alerts"| node_notifyservice
node_chat -->|"renders avatars"| node_avatar
node_dashboard -->|"renders avatars"| node_avatar
node_settlements -->|"renders avatars"| node_avatar
node_config -->|"initializes clients"| node_firebase

click node_app "https://github.com/kothakula-sagar/munner-trip/blob/main/app.js"
click node_auth "https://github.com/kothakula-sagar/munner-trip/blob/main/auth.js"
click node_admin "https://github.com/kothakula-sagar/munner-trip/blob/main/admin.js"
click node_memberfn "https://github.com/kothakula-sagar/munner-trip/blob/main/functions/index.js"
click node_dashboard "https://github.com/kothakula-sagar/munner-trip/blob/main/dashboard.js"
click node_planner "https://github.com/kothakula-sagar/munner-trip/blob/main/planner.js"
click node_media "https://github.com/kothakula-sagar/munner-trip/blob/main/media.js"
click node_polls "https://github.com/kothakula-sagar/munner-trip/blob/main/polls.js"
click node_expenses "https://github.com/kothakula-sagar/munner-trip/blob/main/expenses.js"
click node_settlements "https://github.com/kothakula-sagar/munner-trip/blob/main/settlements.js"
click node_chat "https://github.com/kothakula-sagar/munner-trip/blob/main/chat.js"
click node_notifications "https://github.com/kothakula-sagar/munner-trip/blob/main/notification-center.js"
click node_notifyservice "https://github.com/kothakula-sagar/munner-trip/blob/main/notification-service.js"
click node_avatar "https://github.com/kothakula-sagar/munner-trip/blob/main/avatar.js"
click node_config "https://github.com/kothakula-sagar/munner-trip/blob/main/firebase-config.js"

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_auth,node_admin,node_memberfn toneBlue
class node_dashboard,node_planner,node_media,node_polls toneAmber
class node_expenses,node_settlements toneMint
class node_chat,node_notifications,node_notifyservice,node_avatar toneRose
class node_config,node_firebase,node_member toneIndigo
```

## Components

### Access and navigation

- [Tab and auth routing](https://github.com/kothakula-sagar/munner-trip/blob/main/app.js): `app.js`
- [Sign-in and profiles](https://github.com/kothakula-sagar/munner-trip/blob/main/auth.js): `auth.js`
- [Member administration](https://github.com/kothakula-sagar/munner-trip/blob/main/admin.js): `admin.js`
- [Create member account](https://github.com/kothakula-sagar/munner-trip/blob/main/functions/index.js): `functions/index.js`

### Trip coordination

- [Trip dashboard](https://github.com/kothakula-sagar/munner-trip/blob/main/dashboard.js): `dashboard.js`
- [Itinerary planner](https://github.com/kothakula-sagar/munner-trip/blob/main/planner.js): `planner.js`
- [Photo and video gallery](https://github.com/kothakula-sagar/munner-trip/blob/main/media.js): `media.js`
- [Group polls](https://github.com/kothakula-sagar/munner-trip/blob/main/polls.js): `polls.js`

### Shared finances

- [Expense approval and split](https://github.com/kothakula-sagar/munner-trip/blob/main/expenses.js): `expenses.js`
- [Settlement tracking](https://github.com/kothakula-sagar/munner-trip/blob/main/settlements.js): `settlements.js`

### Group communication

- [Group and direct chat](https://github.com/kothakula-sagar/munner-trip/blob/main/chat.js): `chat.js`
- [Notification center](https://github.com/kothakula-sagar/munner-trip/blob/main/notification-center.js): `notification-center.js`
- [Notification service](https://github.com/kothakula-sagar/munner-trip/blob/main/notification-service.js): `notification-service.js`
- [Avatar renderer](https://github.com/kothakula-sagar/munner-trip/blob/main/avatar.js): `avatar.js`

### Application services

- [Firebase configuration](https://github.com/kothakula-sagar/munner-trip/blob/main/firebase-config.js): `firebase-config.js`
- **Firebase Auth and Firestore**

### Other components

- **Trip member**

## Connections

- Trip member → Tab and auth routing: uses (evidence: `README.md`)
- Tab and auth routing → Sign-in and profiles: handles sign-in (evidence: `app.js`)
- Tab and auth routing → Member administration: routes to (evidence: `app.js`)
- Tab and auth routing → Trip dashboard: routes to (evidence: `app.js`)
- Tab and auth routing → Itinerary planner: routes to (evidence: `app.js`)
- Tab and auth routing → Photo and video gallery: routes to (evidence: `app.js`)
- Tab and auth routing → Group and direct chat: routes to (evidence: `app.js`)
- Tab and auth routing → Expense approval and split: routes to (evidence: `app.js`)
- Tab and auth routing → Settlement tracking: routes to (evidence: `app.js`)
- Tab and auth routing → Notification center: routes to (evidence: `app.js`)
- Member administration → Create member account: requests account creation (evidence: `README.md`)
- Sign-in and profiles → Firebase Auth and Firestore: authenticates and loads profiles (evidence: `auth.js`)
- Member administration → Firebase Auth and Firestore: manages member records (evidence: `admin.js`)
- Expense approval and split → Firebase Auth and Firestore: reads and updates expenses (evidence: `expenses.js`)
- Itinerary planner → Firebase Auth and Firestore: reads and writes itinerary (evidence: `planner.js`)
- Group and direct chat → Firebase Auth and Firestore: reads and writes messages (evidence: `chat.js`)
- Trip dashboard → Firebase Auth and Firestore: subscribes to trip data (evidence: `dashboard.js`)
- Settlement tracking → Firebase Auth and Firestore: records settlement data (evidence: `settlements.js`)
- Notification service → Firebase Auth and Firestore: stores and subscribes (evidence: `notification-service.js`)
- Tab and auth routing → Notification service: subscribes unread count (evidence: `app.js`)
- Notification center → Notification service: loads and marks notifications (evidence: `notification-center.js`)
- Expense approval and split → Notification service: sends approval alerts (evidence: `expenses.js`)
- Itinerary planner → Notification service: sends planner alerts (evidence: `planner.js`)
- Member administration → Notification service: sends member alerts (evidence: `admin.js`)
- Group and direct chat → Avatar renderer: renders avatars (evidence: `chat.js`)
- Trip dashboard → Avatar renderer: renders avatars (evidence: `dashboard.js`)
- Settlement tracking → Avatar renderer: renders avatars (evidence: `settlements.js`)
- Firebase configuration → Firebase Auth and Firestore: initializes clients (evidence: `firebase-config.js`)
