# adminsanjay/routemind-main architecture

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

- Interactive diagram: https://gitdiagram.com/adminsanjay/routemind-main
- Repository: https://github.com/adminsanjay/routemind-main

## Overview

RouteMind is a mobile travel copilot: a traveler submits a route and intent, gets AI-filtered stop recommendations, then navigates and receives proximity alerts. Its other major product branches cover place and route community intelligence, unified search, curated lists, exploration, reputation, and leaderboards. The graph follows documented workflow and explicit index references; unsampled feature implementations are represented at their exact source directories, and unverified links are omitted.

Main entry points: [`app/trip/results.tsx`](https://github.com/adminsanjay/routemind-main/blob/main/app/trip/results.tsx) (Stop results), [`src/hooks/useTripProgress.ts`](https://github.com/adminsanjay/routemind-main/blob/main/src/hooks/useTripProgress.ts) (Trip progress hook), [`src/services/supabase.service.ts`](https://github.com/adminsanjay/routemind-main/blob/main/src/services/supabase.service.ts) (Supabase data), [`app/place/[id].tsx`](https://github.com/adminsanjay/routemind-main/blob/main/app/place/%5Bid%5D.tsx) (Place detail)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Route discovery"]
  node_home["Route request<br/>[index.tsx]"]
  node_assistant["AI prompt assistant<br/>[AIAssistant.tsx]"]
  node_results["Stop results<br/>[results.tsx]"]
  node_place["Place detail<br/>[&#91;id&#93;.tsx]"]
end

subgraph group_trip["Trip guidance"]
  node_active["Active trip<br/>[active.tsx]"]
  node_monitorhook["Trip progress hook<br/>[useTripProgress.ts]"]
  node_monitorstate["Live trip state"]
  node_geofence["Geofence alerts"]
  node_notifications["Notifications"]
end

subgraph group_community["Community"]
  node_communityfeed["Community feeds<br/>[community.tsx]"]
  node_communityservices["Community services"]
  node_routecommunity["Route community<br/>[&#91;id&#93;.tsx]"]
  node_search["Unified search<br/>[search.tsx]"]
  node_lists["Travel lists"]
  node_explore["Explore<br/>[explore.tsx]"]
  node_leaderboard["Leaderboard<br/>[leaderboard.tsx]"]
  node_ranking["Reputation and ranking"]
end

subgraph group_data["Services and state"]
  node_maps["Maps and places<br/>[maps.service.ts]"]
  node_gemini["AI interpretation<br/>[gemini.service.ts]"]
  node_scoring["Stop scoring"]
  node_supabase[("Supabase data")]
  node_tripstate["Trip state<br/>[index.ts]"]
  node_notificationrepo["Notification records"]
  node_explorehook["Explore queries<br/>[useExplore.ts]"]
  node_exploreservice["Explore data<br/>[explore.service.ts]"]
end

node_traveler(("Traveler"))
node_externalmaps["Google Maps APIs"]
node_externalai["Gemini AI"]
node_externaldb[("Supabase")]

node_traveler -->|"submits route"| node_home
node_home -->|"uses assistant"| node_assistant
node_traveler -->|"views results"| node_results
node_results -->|"parses prompt"| node_gemini
node_results -->|"finds route stops"| node_maps
node_results -->|"scores stops"| node_scoring
node_results -.->|"updates trip"| node_tripstate
node_results -->|"saves places"| node_supabase
node_maps -->|"calls APIs"| node_externalmaps
node_gemini -->|"interprets prompts"| node_externalai
node_place -->|"loads place data"| node_supabase
node_place -->|"gets recommendation"| node_scoring
node_place -->|"requests alert"| node_notifications
node_supabase -->|"reads and writes"| node_externaldb
node_results -.->|"starts trip"| node_active
node_active -.->|"tracks progress"| node_monitorhook
node_monitorhook -->|"reads and updates"| node_monitorstate
node_monitorhook -->|"builds alerts"| node_geofence
node_monitorhook -->|"schedules alerts"| node_notifications
node_monitorhook -->|"records alerts"| node_notificationrepo
node_notificationrepo -->|"writes notifications"| node_externaldb
node_traveler -->|"shares and browses"| node_communityfeed
node_communityfeed -.->|"loads community"| node_communityservices
node_traveler -->|"views route insights"| node_routecommunity
node_traveler -->|"searches content"| node_search
node_search -->|"queries records"| node_supabase
node_traveler -->|"curates places"| node_lists
node_lists -.->|"stores lists"| node_supabase
node_traveler -->|"discovers content"| node_explore
node_explore -.->|"loads sections"| node_explorehook
node_explorehook -->|"queries categories"| node_exploreservice
node_traveler -->|"checks ranking"| node_leaderboard
node_leaderboard -.->|"loads reputation"| node_ranking

click node_home "https://github.com/adminsanjay/routemind-main/blob/main/app/(tabs)/index.tsx"
click node_assistant "https://github.com/adminsanjay/routemind-main/blob/main/src/components/AIAssistant.tsx"
click node_results "https://github.com/adminsanjay/routemind-main/blob/main/app/trip/results.tsx"
click node_place "https://github.com/adminsanjay/routemind-main/blob/main/app/place/%5Bid%5D.tsx"
click node_maps "https://github.com/adminsanjay/routemind-main/blob/main/src/services/maps.service.ts"
click node_gemini "https://github.com/adminsanjay/routemind-main/blob/main/src/services/gemini.service.ts"
click node_scoring "https://github.com/adminsanjay/routemind-main/blob/main/src/services/recommendation.service.ts"
click node_supabase "https://github.com/adminsanjay/routemind-main/blob/main/src/services/supabase.service.ts"
click node_tripstate "https://github.com/adminsanjay/routemind-main/blob/main/src/store/index.ts"
click node_active "https://github.com/adminsanjay/routemind-main/blob/main/app/trip/active.tsx"
click node_monitorhook "https://github.com/adminsanjay/routemind-main/blob/main/src/hooks/useTripProgress.ts"
click node_monitorstate "https://github.com/adminsanjay/routemind-main/blob/main/src/store/trip-monitor.store.ts"
click node_geofence "https://github.com/adminsanjay/routemind-main/blob/main/src/services/geofence.service.ts"
click node_notifications "https://github.com/adminsanjay/routemind-main/blob/main/src/services/notification.service.ts"
click node_notificationrepo "https://github.com/adminsanjay/routemind-main/blob/main/src/repositories/notification.repository.ts"
click node_communityfeed "https://github.com/adminsanjay/routemind-main/blob/main/app/(tabs)/community.tsx"
click node_communityservices "https://github.com/adminsanjay/routemind-main/blob/main/src/services/community.service.ts"
click node_routecommunity "https://github.com/adminsanjay/routemind-main/blob/main/app/route-community/%5Bid%5D.tsx"
click node_search "https://github.com/adminsanjay/routemind-main/blob/main/app/search.tsx"
click node_lists "https://github.com/adminsanjay/routemind-main/tree/main/app/list"
click node_explore "https://github.com/adminsanjay/routemind-main/blob/main/app/(tabs)/explore.tsx"
click node_explorehook "https://github.com/adminsanjay/routemind-main/blob/main/src/hooks/useExplore.ts"
click node_exploreservice "https://github.com/adminsanjay/routemind-main/blob/main/src/services/explore.service.ts"
click node_leaderboard "https://github.com/adminsanjay/routemind-main/blob/main/app/leaderboard.tsx"
click node_ranking "https://github.com/adminsanjay/routemind-main/blob/main/src/services/community-ranking.service.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_assistant,node_results,node_place toneBlue
class node_active,node_monitorhook,node_monitorstate,node_geofence,node_notifications,node_externaldb toneAmber
class node_communityfeed,node_communityservices,node_routecommunity,node_search,node_lists,node_explore,node_leaderboard,node_ranking,node_externalmaps toneMint
class node_maps,node_gemini,node_scoring,node_supabase,node_tripstate,node_notificationrepo,node_explorehook,node_exploreservice toneRose
class node_traveler,node_externalai toneIndigo
```

## Components

### Route discovery

- [Route request](https://github.com/adminsanjay/routemind-main/blob/main/app/(tabs)/index.tsx): `app/(tabs)/index.tsx`
- [AI prompt assistant](https://github.com/adminsanjay/routemind-main/blob/main/src/components/AIAssistant.tsx): `src/components/AIAssistant.tsx`
- [Stop results](https://github.com/adminsanjay/routemind-main/blob/main/app/trip/results.tsx): `app/trip/results.tsx`
- [Place detail](https://github.com/adminsanjay/routemind-main/blob/main/app/place/%5Bid%5D.tsx): `app/place/[id].tsx`

### Trip guidance

- [Active trip](https://github.com/adminsanjay/routemind-main/blob/main/app/trip/active.tsx): `app/trip/active.tsx`
- [Trip progress hook](https://github.com/adminsanjay/routemind-main/blob/main/src/hooks/useTripProgress.ts): `src/hooks/useTripProgress.ts`
- [Live trip state](https://github.com/adminsanjay/routemind-main/blob/main/src/store/trip-monitor.store.ts): `src/store/trip-monitor.store.ts`
- [Geofence alerts](https://github.com/adminsanjay/routemind-main/blob/main/src/services/geofence.service.ts): `src/services/geofence.service.ts`
- [Notifications](https://github.com/adminsanjay/routemind-main/blob/main/src/services/notification.service.ts): `src/services/notification.service.ts`

### Community

- [Community feeds](https://github.com/adminsanjay/routemind-main/blob/main/app/(tabs)/community.tsx): `app/(tabs)/community.tsx`
- [Community services](https://github.com/adminsanjay/routemind-main/blob/main/src/services/community.service.ts): `src/services/community.service.ts`
- [Route community](https://github.com/adminsanjay/routemind-main/blob/main/app/route-community/%5Bid%5D.tsx): `app/route-community/[id].tsx`
- [Unified search](https://github.com/adminsanjay/routemind-main/blob/main/app/search.tsx): `app/search.tsx`
- [Travel lists](https://github.com/adminsanjay/routemind-main/tree/main/app/list): `app/list`
- [Explore](https://github.com/adminsanjay/routemind-main/blob/main/app/(tabs)/explore.tsx): `app/(tabs)/explore.tsx`
- [Leaderboard](https://github.com/adminsanjay/routemind-main/blob/main/app/leaderboard.tsx): `app/leaderboard.tsx`
- [Reputation and ranking](https://github.com/adminsanjay/routemind-main/blob/main/src/services/community-ranking.service.ts): `src/services/community-ranking.service.ts`

### Services and state

- [Maps and places](https://github.com/adminsanjay/routemind-main/blob/main/src/services/maps.service.ts): `src/services/maps.service.ts`
- [AI interpretation](https://github.com/adminsanjay/routemind-main/blob/main/src/services/gemini.service.ts): `src/services/gemini.service.ts`
- [Stop scoring](https://github.com/adminsanjay/routemind-main/blob/main/src/services/recommendation.service.ts): `src/services/recommendation.service.ts`
- [Supabase data](https://github.com/adminsanjay/routemind-main/blob/main/src/services/supabase.service.ts): `src/services/supabase.service.ts`
- [Trip state](https://github.com/adminsanjay/routemind-main/blob/main/src/store/index.ts): `src/store/index.ts`
- [Notification records](https://github.com/adminsanjay/routemind-main/blob/main/src/repositories/notification.repository.ts): `src/repositories/notification.repository.ts`
- [Explore queries](https://github.com/adminsanjay/routemind-main/blob/main/src/hooks/useExplore.ts): `src/hooks/useExplore.ts`
- [Explore data](https://github.com/adminsanjay/routemind-main/blob/main/src/services/explore.service.ts): `src/services/explore.service.ts`

### Other components

- **Traveler**
- **Google Maps APIs**
- **Gemini AI**
- **Supabase**

## Connections

- Traveler → Route request: submits route
- Route request → AI prompt assistant: uses assistant (evidence: `app/(tabs)/index.tsx`)
- Traveler → Stop results: views results
- Stop results → AI interpretation: parses prompt (evidence: `app/trip/results.tsx`)
- Stop results → Maps and places: finds route stops (evidence: `app/trip/results.tsx`)
- Stop results → Stop scoring: scores stops (evidence: `app/trip/results.tsx`)
- Stop results → Trip state: updates trip (evidence: `app/trip/results.tsx`)
- Stop results → Supabase data: saves places (evidence: `app/trip/results.tsx`)
- Maps and places → Google Maps APIs: calls APIs (evidence: `src/services/maps.service.ts`)
- AI interpretation → Gemini AI: interprets prompts
- Place detail → Supabase data: loads place data (evidence: `app/place/[id].tsx`)
- Place detail → Stop scoring: gets recommendation (evidence: `app/place/[id].tsx`)
- Place detail → Notifications: requests alert (evidence: `app/place/[id].tsx`)
- Supabase data → Supabase: reads and writes
- Stop results → Active trip: starts trip
- Active trip → Trip progress hook: tracks progress
- Trip progress hook → Live trip state: reads and updates (evidence: `src/hooks/useTripProgress.ts`)
- Trip progress hook → Geofence alerts: builds alerts (evidence: `src/hooks/useTripProgress.ts`)
- Trip progress hook → Notifications: schedules alerts (evidence: `src/hooks/useTripProgress.ts`)
- Trip progress hook → Notification records: records alerts (evidence: `src/hooks/useTripProgress.ts`)
- Notification records → Supabase: writes notifications (evidence: `src/repositories/notification.repository.ts`)
- Traveler → Community feeds: shares and browses
- Community feeds → Community services: loads community
- Traveler → Route community: views route insights
- Traveler → Unified search: searches content (evidence: `app/search.tsx`)
- Unified search → Supabase data: queries records
- Traveler → Travel lists: curates places
- Travel lists → Supabase data: stores lists
- Traveler → Explore: discovers content
- Explore → Explore queries: loads sections
- Explore queries → Explore data: queries categories (evidence: `src/hooks/useExplore.ts`)
- Traveler → Leaderboard: checks ranking
- Leaderboard → Reputation and ranking: loads reputation
