# durga-57/meetmidway architecture

> Architecture diagram of the GitHub repository durga-57/meetmidway, 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/durga-57/meetmidway
- Repository: https://github.com/durga-57/meetmidway

## Overview

MeetMidway is a collaborative meetup-planning app: users create or join a trip, add participants’ starting locations, search for balanced nearby venues, then vote and confirm together. The client routes these journeys through Angular pages, services, and shared trip state; the API manages trip operations, venue discovery, fairness scoring, persistence, and live room updates. The map and recommendation presentation are preserved as product capabilities. Some client and server modules were indexed but not excerpted, so edges involving them are limited to documented or indexed relationships.

Main entry points: [`server/src/routes/trips.ts`](https://github.com/durga-57/meetmidway/blob/main/server/src/routes/trips.ts) (Trip operations), [`client/src/app/pages/trip-room/trip-room.ts`](https://github.com/durga-57/meetmidway/blob/main/client/src/app/pages/trip-room/trip-room.ts) (Trip workspace), [`client/src/app/app.routes.ts`](https://github.com/durga-57/meetmidway/blob/main/client/src/app/app.routes.ts) (Trip routes), [`client/src/app/services/trip.service.ts`](https://github.com/durga-57/meetmidway/blob/main/client/src/app/services/trip.service.ts) (Trip API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client journeys"]
  node_home["Home dashboard<br/>[home.ts]"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_create["Create trip<br/>[create.ts]"]
  node_join["Join trip<br/>[join.ts]"]
  node_triproutes["Trip routes<br/>[app.routes.ts]"]
  node_dashboard["Activity dashboard"]
end

subgraph group_planning["Trip planning"]
  node_room["Trip workspace<br/>[trip-room.ts]"]
  node_tripservice["Trip API client<br/>[trip.service.ts]"]
  node_tripstate["Trip state"]
  node_map["Participant map<br/>[map.ts]"]
  node_recommendations["Place recommendations<br/>[place-list.ts]"]
  node_searchcontrols["Search controls<br/>[search-controls.ts]"]
  node_socketclient["Live client sync<br/>[socket.service.ts]"]
  node_geocoderclient["Client geocoder"]
end

subgraph group_api["Trip API"]
  node_tripsapi["Trip operations<br/>[trips.ts]"]
  node_authmiddleware["API authentication<br/>[auth.ts]"]
  node_geocode["Address geocoding<br/>[trips.ts]"]
  node_socketserver["Live trip events<br/>[handlers.ts]"]
end

subgraph group_domain["Discovery and state"]
  node_places["Nearby venue search<br/>[overpass.ts]"]
  node_scoring["Midpoint and scoring<br/>[scoring.ts]"]
  node_tripstore[("Trip persistence<br/>[redis.ts]")]
  node_triptypes["Trip domain types<br/>[types.ts]"]
end

node_participants(("Group members"))
node_authprovider["Supabase Auth"]
node_nominatim["Nominatim"]
node_overpassapi["Overpass API"]
node_redis[("Redis")]

node_participants -->|"navigate"| node_triproutes
node_triproutes -->|"route"| node_home
node_triproutes -->|"route"| node_create
node_triproutes -->|"route"| node_join
node_triproutes -->|"route"| node_room
node_home -->|"uses"| node_auth
node_create -->|"creates via"| node_tripservice
node_create -->|"uses"| node_auth
node_join -->|"joins via"| node_tripservice
node_join -->|"uses"| node_geocoderclient
node_room -->|"operates via"| node_tripservice
node_room -->|"updates"| node_tripstate
node_room -->|"syncs via"| node_socketclient
node_room -->|"renders"| node_map
node_room -->|"renders"| node_recommendations
node_room -->|"renders"| node_searchcontrols
node_recommendations -->|"reads"| node_tripstate
node_searchcontrols -->|"updates"| node_tripstate
node_map -->|"reads"| node_tripstate
node_tripservice -->|"HTTP requests"| node_tripsapi
node_tripservice -->|"gets token"| node_auth
node_auth -->|"authenticates"| node_authprovider
node_tripsapi -->|"guards routes"| node_authmiddleware
node_authmiddleware -->|"verifies token"| node_authprovider
node_tripsapi -->|"geocodes addresses"| node_geocode
node_geocode -->|"queries"| node_nominatim
node_tripsapi -->|"reads and writes"| node_tripstore
node_tripsapi -->|"computes midpoint and ranks"| node_scoring
node_tripsapi -->|"searches venues"| node_places
node_places -->|"queries"| node_overpassapi
node_places -->|"scores results"| node_scoring
node_socketserver -->|"loads trip"| node_tripstore
node_socketclient -->|"syncs state"| node_tripstate
node_participants -.->|"live updates"| node_socketclient
node_tripsapi -->|"broadcasts updates"| node_socketserver
node_tripstore -->|"persists trips"| node_redis
node_home -->|"records activity"| node_dashboard
node_tripsapi -->|"uses domain data"| node_triptypes
node_scoring -->|"uses domain data"| node_triptypes

click node_home "https://github.com/durga-57/meetmidway/blob/main/client/src/app/pages/home/home.ts"
click node_auth "https://github.com/durga-57/meetmidway/blob/main/client/src/app/services/auth.service.ts"
click node_create "https://github.com/durga-57/meetmidway/blob/main/client/src/app/pages/create/create.ts"
click node_join "https://github.com/durga-57/meetmidway/blob/main/client/src/app/pages/join/join.ts"
click node_room "https://github.com/durga-57/meetmidway/blob/main/client/src/app/pages/trip-room/trip-room.ts"
click node_tripservice "https://github.com/durga-57/meetmidway/blob/main/client/src/app/services/trip.service.ts"
click node_tripstate "https://github.com/durga-57/meetmidway/blob/main/client/src/app/services/trip-store.service.ts"
click node_map "https://github.com/durga-57/meetmidway/blob/main/client/src/app/components/map/map.ts"
click node_recommendations "https://github.com/durga-57/meetmidway/blob/main/client/src/app/components/place-list/place-list.ts"
click node_searchcontrols "https://github.com/durga-57/meetmidway/blob/main/client/src/app/components/search-controls/search-controls.ts"
click node_triproutes "https://github.com/durga-57/meetmidway/blob/main/client/src/app/app.routes.ts"
click node_tripsapi "https://github.com/durga-57/meetmidway/blob/main/server/src/routes/trips.ts"
click node_authmiddleware "https://github.com/durga-57/meetmidway/blob/main/server/src/middleware/auth.ts"
click node_geocode "https://github.com/durga-57/meetmidway/blob/main/server/src/routes/trips.ts"
click node_places "https://github.com/durga-57/meetmidway/blob/main/server/src/services/overpass.ts"
click node_scoring "https://github.com/durga-57/meetmidway/blob/main/server/src/services/scoring.ts"
click node_tripstore "https://github.com/durga-57/meetmidway/blob/main/server/src/services/redis.ts"
click node_socketserver "https://github.com/durga-57/meetmidway/blob/main/server/src/socket/handlers.ts"
click node_socketclient "https://github.com/durga-57/meetmidway/blob/main/client/src/app/services/socket.service.ts"
click node_dashboard "https://github.com/durga-57/meetmidway/blob/main/client/src/app/services/dashboard.service.ts"
click node_geocoderclient "https://github.com/durga-57/meetmidway/blob/main/client/src/app/services/geocoder.service.ts"
click node_triptypes "https://github.com/durga-57/meetmidway/blob/main/shared/types.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_home,node_auth,node_create,node_join,node_triproutes,node_dashboard toneBlue
class node_room,node_tripservice,node_tripstate,node_map,node_recommendations,node_searchcontrols,node_socketclient,node_geocoderclient,node_redis toneAmber
class node_tripsapi,node_authmiddleware,node_geocode,node_socketserver,node_overpassapi toneMint
class node_places,node_scoring,node_tripstore,node_triptypes toneRose
class node_participants,node_authprovider,node_nominatim toneIndigo
```

## Components

### Client journeys

- [Home dashboard](https://github.com/durga-57/meetmidway/blob/main/client/src/app/pages/home/home.ts): `client/src/app/pages/home/home.ts`
- [Authentication](https://github.com/durga-57/meetmidway/blob/main/client/src/app/services/auth.service.ts): `client/src/app/services/auth.service.ts`
- [Create trip](https://github.com/durga-57/meetmidway/blob/main/client/src/app/pages/create/create.ts): `client/src/app/pages/create/create.ts`
- [Join trip](https://github.com/durga-57/meetmidway/blob/main/client/src/app/pages/join/join.ts): `client/src/app/pages/join/join.ts`
- [Trip routes](https://github.com/durga-57/meetmidway/blob/main/client/src/app/app.routes.ts): `client/src/app/app.routes.ts`
- [Activity dashboard](https://github.com/durga-57/meetmidway/blob/main/client/src/app/services/dashboard.service.ts): `client/src/app/services/dashboard.service.ts`

### Trip planning

- [Trip workspace](https://github.com/durga-57/meetmidway/blob/main/client/src/app/pages/trip-room/trip-room.ts): `client/src/app/pages/trip-room/trip-room.ts`
- [Trip API client](https://github.com/durga-57/meetmidway/blob/main/client/src/app/services/trip.service.ts): `client/src/app/services/trip.service.ts`
- [Trip state](https://github.com/durga-57/meetmidway/blob/main/client/src/app/services/trip-store.service.ts): `client/src/app/services/trip-store.service.ts`
- [Participant map](https://github.com/durga-57/meetmidway/blob/main/client/src/app/components/map/map.ts): `client/src/app/components/map/map.ts`
- [Place recommendations](https://github.com/durga-57/meetmidway/blob/main/client/src/app/components/place-list/place-list.ts): `client/src/app/components/place-list/place-list.ts`
- [Search controls](https://github.com/durga-57/meetmidway/blob/main/client/src/app/components/search-controls/search-controls.ts): `client/src/app/components/search-controls/search-controls.ts`
- [Live client sync](https://github.com/durga-57/meetmidway/blob/main/client/src/app/services/socket.service.ts): `client/src/app/services/socket.service.ts`
- [Client geocoder](https://github.com/durga-57/meetmidway/blob/main/client/src/app/services/geocoder.service.ts): `client/src/app/services/geocoder.service.ts`

### Trip API

- [Trip operations](https://github.com/durga-57/meetmidway/blob/main/server/src/routes/trips.ts): `server/src/routes/trips.ts`
- [API authentication](https://github.com/durga-57/meetmidway/blob/main/server/src/middleware/auth.ts): `server/src/middleware/auth.ts`
- [Address geocoding](https://github.com/durga-57/meetmidway/blob/main/server/src/routes/trips.ts): `server/src/routes/trips.ts`
- [Live trip events](https://github.com/durga-57/meetmidway/blob/main/server/src/socket/handlers.ts): `server/src/socket/handlers.ts`

### Discovery and state

- [Nearby venue search](https://github.com/durga-57/meetmidway/blob/main/server/src/services/overpass.ts): `server/src/services/overpass.ts`
- [Midpoint and scoring](https://github.com/durga-57/meetmidway/blob/main/server/src/services/scoring.ts): `server/src/services/scoring.ts`
- [Trip persistence](https://github.com/durga-57/meetmidway/blob/main/server/src/services/redis.ts): `server/src/services/redis.ts`
- [Trip domain types](https://github.com/durga-57/meetmidway/blob/main/shared/types.ts): `shared/types.ts`

### Other components

- **Group members**
- **Supabase Auth**
- **Nominatim**
- **Overpass API**
- **Redis**

## Connections

- Group members → Trip routes: navigate (evidence: `client/src/app/app.routes.ts`)
- Trip routes → Home dashboard: route (evidence: `client/src/app/app.routes.ts`)
- Trip routes → Create trip: route (evidence: `client/src/app/app.routes.ts`)
- Trip routes → Join trip: route (evidence: `client/src/app/app.routes.ts`)
- Trip routes → Trip workspace: route (evidence: `client/src/app/app.routes.ts`)
- Home dashboard → Authentication: uses (evidence: `client/src/app/pages/home/home.ts`)
- Create trip → Trip API client: creates via (evidence: `client/src/app/pages/create/create.ts`)
- Create trip → Authentication: uses (evidence: `client/src/app/pages/create/create.ts`)
- Join trip → Trip API client: joins via (evidence: `client/src/app/pages/join/join.ts`)
- Join trip → Client geocoder: uses (evidence: `client/src/app/pages/join/join.ts`)
- Trip workspace → Trip API client: operates via (evidence: `client/src/app/pages/trip-room/trip-room.ts`)
- Trip workspace → Trip state: updates (evidence: `client/src/app/pages/trip-room/trip-room.ts`)
- Trip workspace → Live client sync: syncs via (evidence: `client/src/app/pages/trip-room/trip-room.ts`)
- Trip workspace → Participant map: renders (evidence: `client/src/app/pages/trip-room/trip-room.ts`)
- Trip workspace → Place recommendations: renders (evidence: `client/src/app/pages/trip-room/trip-room.ts`)
- Trip workspace → Search controls: renders (evidence: `client/src/app/pages/trip-room/trip-room.ts`)
- Place recommendations → Trip state: reads (evidence: `client/src/app/components/place-list/place-list.ts`)
- Search controls → Trip state: updates (evidence: `client/src/app/components/search-controls/search-controls.ts`)
- Participant map → Trip state: reads (evidence: `client/src/app/components/map/map.ts`)
- Trip API client → Trip operations: HTTP requests (evidence: `client/src/app/services/trip.service.ts`)
- Trip API client → Authentication: gets token (evidence: `client/src/app/services/trip.service.ts`)
- Authentication → Supabase Auth: authenticates (evidence: `client/src/app/services/auth.service.ts`)
- Trip operations → API authentication: guards routes (evidence: `server/src/routes/trips.ts`)
- API authentication → Supabase Auth: verifies token (evidence: `server/src/middleware/auth.ts`)
- Trip operations → Address geocoding: geocodes addresses (evidence: `server/src/routes/trips.ts`)
- Address geocoding → Nominatim: queries (evidence: `server/src/routes/trips.ts`)
- Trip operations → Trip persistence: reads and writes (evidence: `server/src/routes/trips.ts`)
- Trip operations → Midpoint and scoring: computes midpoint and ranks (evidence: `server/src/routes/trips.ts`)
- Trip operations → Nearby venue search: searches venues (evidence: `server/src/routes/trips.ts`)
- Nearby venue search → Overpass API: queries (evidence: `server/src/services/overpass.ts`)
- Nearby venue search → Midpoint and scoring: scores results (evidence: `server/src/services/overpass.ts`)
- Live trip events → Trip persistence: loads trip (evidence: `server/src/socket/handlers.ts`)
- Live client sync → Trip state: syncs state (evidence: `client/src/app/services/socket.service.ts`)
- Group members → Live client sync: live updates (evidence: `README.md`)
- Trip operations → Live trip events: broadcasts updates (evidence: `server/src/routes/trips.ts`)
- Trip persistence → Redis: persists trips (evidence: `server/src/services/redis.ts`)
- Home dashboard → Activity dashboard: records activity (evidence: `client/src/app/pages/home/home.ts`)
- Trip operations → Trip domain types: uses domain data (evidence: `server/src/routes/trips.ts`)
- Midpoint and scoring → Trip domain types: uses domain data (evidence: `server/src/services/scoring.ts`)
