# dhinesh-dhinesh/ridemap architecture

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

## Overview

Ridemap is a student-facing bus tracking and commute app. Its main flow is an authenticated user opening the live map, where the client reads bus updates and combines them with the user’s location; separate screens provide route information and notification preferences. Authentication, profile settings, issue reporting, and informational pages round out the product. The source excerpts show routing, Firebase access, map inputs, and profile writes; geofencing delivery is documented in the README, but its implementation is not shown.

Main entry points: [`src/App.js`](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/App.js) (App Router), [`src/pages/home/index.js`](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/home/index.js) (Live Bus Map), [`src/pages/profile/profile.js`](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/profile/profile.js) (Profile Settings), [`src/pages/routes/routes.js`](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/routes/routes.js) (Route Information)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Navigation"]
  node_router["App Router<br/>[App.js]"]
  node_bottomnav["Bottom Navigation<br/>[bottomNav.js]"]
end

subgraph group_tracking["Live Tracking"]
  node_home["Live Bus Map<br/>[index.js]"]
  node_geolocation["Location Watch<br/>[useGeolocation.js]"]
  node_busdata[("Live Bus Feed<br/>[firebase.js]")]
  node_maptiles["Map Tiles"]
  node_routegeometry["Route Geometry<br/>[routes.js]"]
end

subgraph group_account["Account and Alerts"]
  node_firebase[("Firebase Services<br/>[firebase.js]")]
  node_authpages["Auth Pages"]
  node_profile["Profile Settings<br/>[profile.js]"]
  node_profiledata["Profile Data<br/>[data.js]"]
  node_notifications["Notifications<br/>[notification.js]"]
  node_geofencing["Geofence Alerts"]
end

subgraph group_support["Routes and Support"]
  node_routespage["Route Information<br/>[routes.js]"]
  node_routefiles[("Route Images<br/>[firebase.js]")]
  node_routefunctions["Route Data Function<br/>[functions.js]"]
  node_issue["Issue Reporting<br/>[index.js]"]
  node_howto["Travel Guide<br/>[index.js]"]
end

node_student(("Student"))

node_student -->|"opens app"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_routespage
node_router -->|"routes to"| node_profile
node_router -->|"routes to"| node_notifications
node_router -->|"routes to"| node_authpages
node_router -->|"routes to"| node_issue
node_router -->|"routes to"| node_howto
node_router -->|"renders"| node_bottomnav
node_student -->|"tracks buses"| node_home
node_home -->|"reads updates"| node_busdata
node_home -->|"reads position"| node_geolocation
node_home -->|"renders map"| node_maptiles
node_student -->|"plans route"| node_routespage
node_routespage -->|"loads route images"| node_routefiles
node_routegeometry -->|"fetches route selection"| node_routefunctions
node_profile -->|"reads and writes settings"| node_firebase
node_profile -->|"uses profile data"| node_profiledata
node_notifications -->|"uses Firebase"| node_firebase
node_student -.->|"receives approach alerts"| node_geofencing
node_issue -->|"saves reports"| node_firebase
node_profile -.->|"configures alert preferences"| node_geofencing

click node_router "https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/App.js"
click node_bottomnav "https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/components/bottomNav.js"
click node_home "https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/home/index.js"
click node_geolocation "https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/hooks/useGeolocation.js"
click node_busdata "https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/firebase/firebase.js"
click node_routegeometry "https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/data/routes.js"
click node_firebase "https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/firebase/firebase.js"
click node_authpages "https://github.com/dhinesh-dhinesh/ridemap/tree/master/src/pages"
click node_profile "https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/profile/profile.js"
click node_profiledata "https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/profile/data.js"
click node_notifications "https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/notification/notification.js"
click node_geofencing "https://github.com/dhinesh-dhinesh/ridemap/tree/master/src/pages/notification"
click node_routespage "https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/routes/routes.js"
click node_routefiles "https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/firebase/firebase.js"
click node_routefunctions "https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/firebase/functions/functions.js"
click node_issue "https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/issue/index.js"
click node_howto "https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/howto/index.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_router,node_bottomnav toneBlue
class node_home,node_geolocation,node_busdata,node_maptiles,node_routegeometry toneAmber
class node_firebase,node_authpages,node_profile,node_profiledata,node_notifications,node_geofencing toneMint
class node_routespage,node_routefiles,node_routefunctions,node_issue,node_howto toneRose
class node_student toneIndigo
```

## Components

### App Navigation

- [App Router](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/App.js): `src/App.js`
- [Bottom Navigation](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/components/bottomNav.js): `src/components/bottomNav.js`

### Live Tracking

- [Live Bus Map](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/home/index.js): `src/pages/home/index.js`
- [Location Watch](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/hooks/useGeolocation.js): `src/hooks/useGeolocation.js`
- [Live Bus Feed](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/firebase/firebase.js): `src/firebase/firebase.js`
- **Map Tiles**
- [Route Geometry](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/data/routes.js): `src/data/routes.js`

### Account and Alerts

- [Firebase Services](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/firebase/firebase.js): `src/firebase/firebase.js`
- [Auth Pages](https://github.com/dhinesh-dhinesh/ridemap/tree/master/src/pages): `src/pages`
- [Profile Settings](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/profile/profile.js): `src/pages/profile/profile.js`
- [Profile Data](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/profile/data.js): `src/pages/profile/data.js`
- [Notifications](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/notification/notification.js): `src/pages/notification/notification.js`
- [Geofence Alerts](https://github.com/dhinesh-dhinesh/ridemap/tree/master/src/pages/notification): `src/pages/notification`

### Routes and Support

- [Route Information](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/routes/routes.js): `src/pages/routes/routes.js`
- [Route Images](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/firebase/firebase.js): `src/firebase/firebase.js`
- [Route Data Function](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/firebase/functions/functions.js): `src/firebase/functions/functions.js`
- [Issue Reporting](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/issue/index.js): `src/pages/issue/index.js`
- [Travel Guide](https://github.com/dhinesh-dhinesh/ridemap/blob/master/src/pages/howto/index.js): `src/pages/howto/index.js`

### Other components

- **Student**

## Connections

- Student → App Router: opens app (evidence: `README.md`)
- App Router → Live Bus Map: routes to (evidence: `src/App.js`)
- App Router → Route Information: routes to (evidence: `src/App.js`)
- App Router → Profile Settings: routes to (evidence: `src/App.js`)
- App Router → Notifications: routes to (evidence: `src/App.js`)
- App Router → Auth Pages: routes to (evidence: `src/App.js`)
- App Router → Issue Reporting: routes to (evidence: `src/App.js`)
- App Router → Travel Guide: routes to (evidence: `src/App.js`)
- App Router → Bottom Navigation: renders (evidence: `src/App.js`)
- Student → Live Bus Map: tracks buses (evidence: `README.md`)
- Live Bus Map → Live Bus Feed: reads updates (evidence: `src/pages/home/index.js`)
- Live Bus Map → Location Watch: reads position (evidence: `src/pages/home/index.js`)
- Live Bus Map → Map Tiles: renders map (evidence: `src/pages/home/index.js`)
- Student → Route Information: plans route (evidence: `README.md`)
- Route Information → Route Images: loads route images (evidence: `src/pages/routes/routes.js`)
- Route Geometry → Route Data Function: fetches route selection (evidence: `src/data/routes.js`)
- Profile Settings → Firebase Services: reads and writes settings (evidence: `src/pages/profile/profile.js`)
- Profile Settings → Profile Data: uses profile data (evidence: `src/pages/profile/profile.js`)
- Notifications → Firebase Services: uses Firebase (evidence: `src/pages/notification/notification.js`)
- Student → Geofence Alerts: receives approach alerts (evidence: `README.md`)
- Issue Reporting → Firebase Services: saves reports (evidence: `src/pages/issue/index.js`)
- Profile Settings → Geofence Alerts: configures alert preferences
