# divyanshgupta-mips/pathly architecture

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

- Interactive diagram: https://gitdiagram.com/divyanshgupta-mips/pathly
- Repository: https://github.com/divyanshgupta-mips/pathly

## Overview

Pathly is a venue wayfinding app: hosts sign in, create or upload a venue plan, edit its map, and assign guest destinations; guests can open a venue map and choose a route. Firebase provides authentication and venue data, while the sampled pages show the map editor saving map elements and the guest view loading venue data. The README is only a generic Next.js starter, so it documents no product capabilities. Some listed pages were not sampled in detail; their links and behavior are therefore not inferred.

Main entry points: [`lib/firebase.ts`](https://github.com/divyanshgupta-mips/pathly/blob/main/lib/firebase.ts) (Firebase client), [`app/dashboard/page.tsx`](https://github.com/divyanshgupta-mips/pathly/blob/main/app/dashboard/page.tsx) (Host dashboard), [`app/editor/page.tsx`](https://github.com/divyanshgupta-mips/pathly/blob/main/app/editor/page.tsx) (Map editor), [`app/assign/page.tsx`](https://github.com/divyanshgupta-mips/pathly/blob/main/app/assign/page.tsx) (Guest assignment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Host Management"]
  node_host["Host sign-in<br/>[page.tsx]"]
  node_dashboard["Host dashboard<br/>[page.tsx]"]
  node_assign["Guest assignment<br/>[page.tsx]"]
  node_generate["Pass design<br/>[page.tsx]"]
end

subgraph group_mapping["Venue Mapping"]
  node_setup["Venue setup<br/>[page.tsx]"]
  node_editor["Map editor<br/>[page.tsx]"]
  node_canvas["Map canvas<br/>[MapCanvas.tsx]"]
end

subgraph group_guest["Guest Wayfinding"]
  node_pass["Guest pass<br/>[page.tsx]"]
  node_guestmap["Guest map<br/>[page.tsx]"]
  node_route["Route view<br/>[page.tsx]"]
  node_scanner["Pass scanner<br/>[page.tsx]"]
end

subgraph group_services["Cloud Services"]
  node_firebase["Firebase client<br/>[firebase.ts]"]
  node_firestore[("Firestore")]
  node_authservice["Firebase Auth"]
end

node_hostactor(("Host"))
node_guestactor(("Guest"))

node_hostactor -->|"signs in"| node_host
node_host -->|"authenticates; reads and creates venues"| node_firebase
node_host -.->|"opens"| node_dashboard
node_dashboard -->|"links to"| node_setup
node_dashboard -->|"links to"| node_assign
node_dashboard -->|"links to"| node_generate
node_setup -->|"reads and creates venues"| node_firebase
node_setup -->|"routes to"| node_editor
node_editor -->|"loads and updates venue"| node_firebase
node_editor -->|"renders"| node_canvas
node_editor -->|"routes to"| node_assign
node_canvas -->|"saves map data"| node_firebase
node_assign -->|"loads venue; saves guests"| node_firebase
node_assign -->|"encodes guest map link"| node_guestmap
node_generate -->|"links to"| node_pass
node_guestactor -.->|"opens venue map"| node_guestmap
node_guestmap -->|"loads venue"| node_firebase
node_pass -.->|"links to"| node_route
node_firebase -->|"initializes client"| node_firestore
node_firebase -->|"initializes client"| node_authservice

click node_host "https://github.com/divyanshgupta-mips/pathly/blob/main/app/page.tsx"
click node_dashboard "https://github.com/divyanshgupta-mips/pathly/blob/main/app/dashboard/page.tsx"
click node_setup "https://github.com/divyanshgupta-mips/pathly/blob/main/app/upload/page.tsx"
click node_editor "https://github.com/divyanshgupta-mips/pathly/blob/main/app/editor/page.tsx"
click node_canvas "https://github.com/divyanshgupta-mips/pathly/blob/main/app/editor/MapCanvas.tsx"
click node_assign "https://github.com/divyanshgupta-mips/pathly/blob/main/app/assign/page.tsx"
click node_generate "https://github.com/divyanshgupta-mips/pathly/blob/main/app/generate/page.tsx"
click node_pass "https://github.com/divyanshgupta-mips/pathly/blob/main/app/pass/page.tsx"
click node_guestmap "https://github.com/divyanshgupta-mips/pathly/blob/main/app/guest/page.tsx"
click node_route "https://github.com/divyanshgupta-mips/pathly/blob/main/app/route/page.tsx"
click node_scanner "https://github.com/divyanshgupta-mips/pathly/blob/main/app/scanner/page.tsx"
click node_firebase "https://github.com/divyanshgupta-mips/pathly/blob/main/lib/firebase.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_host,node_dashboard,node_assign,node_generate toneBlue
class node_setup,node_editor,node_canvas toneAmber
class node_pass,node_guestmap,node_route,node_scanner toneMint
class node_firebase,node_firestore,node_authservice toneRose
class node_hostactor,node_guestactor toneIndigo
```

## Components

### Host Management

- [Host sign-in](https://github.com/divyanshgupta-mips/pathly/blob/main/app/page.tsx): `app/page.tsx`
- [Host dashboard](https://github.com/divyanshgupta-mips/pathly/blob/main/app/dashboard/page.tsx): `app/dashboard/page.tsx`
- [Guest assignment](https://github.com/divyanshgupta-mips/pathly/blob/main/app/assign/page.tsx): `app/assign/page.tsx`
- [Pass design](https://github.com/divyanshgupta-mips/pathly/blob/main/app/generate/page.tsx): `app/generate/page.tsx`

### Venue Mapping

- [Venue setup](https://github.com/divyanshgupta-mips/pathly/blob/main/app/upload/page.tsx): `app/upload/page.tsx`
- [Map editor](https://github.com/divyanshgupta-mips/pathly/blob/main/app/editor/page.tsx): `app/editor/page.tsx`
- [Map canvas](https://github.com/divyanshgupta-mips/pathly/blob/main/app/editor/MapCanvas.tsx): `app/editor/MapCanvas.tsx`

### Guest Wayfinding

- [Guest pass](https://github.com/divyanshgupta-mips/pathly/blob/main/app/pass/page.tsx): `app/pass/page.tsx`
- [Guest map](https://github.com/divyanshgupta-mips/pathly/blob/main/app/guest/page.tsx): `app/guest/page.tsx`
- [Route view](https://github.com/divyanshgupta-mips/pathly/blob/main/app/route/page.tsx): `app/route/page.tsx`
- [Pass scanner](https://github.com/divyanshgupta-mips/pathly/blob/main/app/scanner/page.tsx): `app/scanner/page.tsx`

### Cloud Services

- [Firebase client](https://github.com/divyanshgupta-mips/pathly/blob/main/lib/firebase.ts): `lib/firebase.ts`
- **Firestore**
- **Firebase Auth**

### Other components

- **Host**
- **Guest**

## Connections

- Host → Host sign-in: signs in (evidence: `app/page.tsx`)
- Host sign-in → Firebase client: authenticates; reads and creates venues (evidence: `app/page.tsx`)
- Host sign-in → Host dashboard: opens
- Host dashboard → Venue setup: links to (evidence: `app/dashboard/page.tsx`)
- Host dashboard → Guest assignment: links to (evidence: `app/dashboard/page.tsx`)
- Host dashboard → Pass design: links to (evidence: `app/dashboard/page.tsx`)
- Venue setup → Firebase client: reads and creates venues (evidence: `app/upload/page.tsx`)
- Venue setup → Map editor: routes to (evidence: `app/upload/page.tsx`)
- Map editor → Firebase client: loads and updates venue (evidence: `app/editor/page.tsx`)
- Map editor → Map canvas: renders (evidence: `app/editor/page.tsx`)
- Map editor → Guest assignment: routes to (evidence: `app/editor/page.tsx`)
- Map canvas → Firebase client: saves map data (evidence: `app/editor/MapCanvas.tsx`)
- Guest assignment → Firebase client: loads venue; saves guests (evidence: `app/assign/page.tsx`)
- Guest assignment → Guest map: encodes guest map link (evidence: `app/assign/page.tsx`)
- Pass design → Guest pass: links to (evidence: `app/generate/page.tsx`)
- Guest → Guest map: opens venue map
- Guest map → Firebase client: loads venue (evidence: `app/guest/page.tsx`)
- Guest pass → Route view: links to
- Firebase client → Firestore: initializes client (evidence: `lib/firebase.ts`)
- Firebase client → Firebase Auth: initializes client (evidence: `lib/firebase.ts`)
