# harshmishra2327/eldergo architecture

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

- Interactive diagram: https://gitdiagram.com/harshmishra2327/eldergo
- Repository: https://github.com/harshmishra2327/eldergo

## Overview

ElderGo+ is a Flask/MySQL platform connecting seniors with companions for visits, errands, transport, and daily support. Clients register, request assistance, track and manage a booking, then pay and leave feedback; companions manage availability and rates, accept requests, verify OTPs, and complete rides. Admins review companion verification and monitor platform activity. The README documents these capabilities, while sampled excerpts show the Flask API’s direct database access and frontend API calls. Some feature wiring is documented but unsampled, so uncertain internal links are omitted.

Main entry points: [`app.py`](https://github.com/harshmishra2327/eldergo/blob/main/app.py) (Flask application), [`schema.sql`](https://github.com/harshmishra2327/eldergo/blob/main/schema.sql) (ElderGo database), [`templates`](https://github.com/harshmishra2327/eldergo/tree/main/templates) (Role dashboards), [`static/js/api.js`](https://github.com/harshmishra2327/eldergo/blob/main/static/js/api.js) (Browser API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_pages["Role dashboards"]
  node_auth_pages["Sign-in and registration"]
  node_api_client["Browser API client<br/>[api.js]"]
  node_accessibility["Text-size controls<br/>[accessibility.js]"]
  node_auth_nav["Login navigation<br/>[auth.js]"]
end

subgraph group_service["Application services"]
  node_flask["Flask application<br/>[app.py]"]
  node_authentication["Identity and sessions<br/>[app.py]"]
  node_booking["Booking lifecycle<br/>[app.py]"]
  node_companion_ops["Companion operations<br/>[app.py]"]
  node_ride_completion["Ride completion<br/>[app.py]"]
  node_payment_feedback["Payment and feedback<br/>[app.py]"]
  node_emergency["Emergency SOS<br/>[app.py]"]
end

subgraph group_operations["Platform operations"]
  node_admin["Admin oversight<br/>[app.py]"]
end

subgraph group_state["Persistent state"]
  node_mysql[("ElderGo database<br/>[schema.sql]")]
end

node_users(("Clients, companions, admins"))
node_map_service["OpenStreetMap maps"]
node_sms_provider["SMS provider"]

node_users -->|"use dashboards"| node_pages
node_users -->|"sign in or register"| node_auth_pages
node_pages -->|"request actions"| node_api_client
node_auth_pages -->|"submit credentials"| node_api_client
node_api_client -->|"call REST APIs"| node_flask
node_auth_nav -->|"request logout"| node_flask
node_flask -->|"dispatch auth"| node_authentication
node_flask -->|"dispatch bookings"| node_booking
node_flask -->|"dispatch companion actions"| node_companion_ops
node_flask -->|"dispatch completion"| node_ride_completion
node_flask -->|"dispatch payment and reviews"| node_payment_feedback
node_flask -->|"dispatch SOS"| node_emergency
node_flask -->|"dispatch admin actions"| node_admin
node_authentication -->|"read and write"| node_mysql
node_booking -->|"read and write"| node_mysql
node_companion_ops -->|"read and write"| node_mysql
node_ride_completion -->|"read and write"| node_mysql
node_payment_feedback -->|"read and write"| node_mysql
node_emergency -->|"read contact"| node_mysql
node_admin -->|"read and update"| node_mysql
node_pages -.->|"show live maps"| node_map_service
node_emergency -.->|"send alert"| node_sms_provider

click node_pages "https://github.com/harshmishra2327/eldergo/tree/main/templates"
click node_auth_pages "https://github.com/harshmishra2327/eldergo/tree/main/templates"
click node_api_client "https://github.com/harshmishra2327/eldergo/blob/main/static/js/api.js"
click node_accessibility "https://github.com/harshmishra2327/eldergo/blob/main/static/js/accessibility.js"
click node_auth_nav "https://github.com/harshmishra2327/eldergo/blob/main/static/js/auth.js"
click node_flask "https://github.com/harshmishra2327/eldergo/blob/main/app.py"
click node_authentication "https://github.com/harshmishra2327/eldergo/blob/main/app.py"
click node_booking "https://github.com/harshmishra2327/eldergo/blob/main/app.py"
click node_companion_ops "https://github.com/harshmishra2327/eldergo/blob/main/app.py"
click node_ride_completion "https://github.com/harshmishra2327/eldergo/blob/main/app.py"
click node_payment_feedback "https://github.com/harshmishra2327/eldergo/blob/main/app.py"
click node_emergency "https://github.com/harshmishra2327/eldergo/blob/main/app.py"
click node_admin "https://github.com/harshmishra2327/eldergo/blob/main/app.py"
click node_mysql "https://github.com/harshmishra2327/eldergo/blob/main/schema.sql"

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_pages,node_auth_pages,node_api_client,node_accessibility,node_auth_nav,node_users toneBlue
class node_flask,node_authentication,node_booking,node_companion_ops,node_ride_completion,node_payment_feedback,node_emergency toneAmber
class node_admin toneMint
class node_mysql toneRose
class node_map_service,node_sms_provider toneIndigo
```

## Components

### Web experience

- [Role dashboards](https://github.com/harshmishra2327/eldergo/tree/main/templates): `templates`
- [Sign-in and registration](https://github.com/harshmishra2327/eldergo/tree/main/templates): `templates`
- [Browser API client](https://github.com/harshmishra2327/eldergo/blob/main/static/js/api.js): `static/js/api.js`
- [Text-size controls](https://github.com/harshmishra2327/eldergo/blob/main/static/js/accessibility.js): `static/js/accessibility.js`
- [Login navigation](https://github.com/harshmishra2327/eldergo/blob/main/static/js/auth.js): `static/js/auth.js`

### Application services

- [Flask application](https://github.com/harshmishra2327/eldergo/blob/main/app.py): `app.py`
- [Identity and sessions](https://github.com/harshmishra2327/eldergo/blob/main/app.py): `app.py`
- [Booking lifecycle](https://github.com/harshmishra2327/eldergo/blob/main/app.py): `app.py`
- [Companion operations](https://github.com/harshmishra2327/eldergo/blob/main/app.py): `app.py`
- [Ride completion](https://github.com/harshmishra2327/eldergo/blob/main/app.py): `app.py`
- [Payment and feedback](https://github.com/harshmishra2327/eldergo/blob/main/app.py): `app.py`
- [Emergency SOS](https://github.com/harshmishra2327/eldergo/blob/main/app.py): `app.py`

### Platform operations

- [Admin oversight](https://github.com/harshmishra2327/eldergo/blob/main/app.py): `app.py`

### Persistent state

- [ElderGo database](https://github.com/harshmishra2327/eldergo/blob/main/schema.sql): `schema.sql`

### Other components

- **Clients, companions, admins**
- **OpenStreetMap maps**
- **SMS provider**

## Connections

- Clients, companions, admins → Role dashboards: use dashboards
- Clients, companions, admins → Sign-in and registration: sign in or register
- Role dashboards → Browser API client: request actions
- Sign-in and registration → Browser API client: submit credentials
- Browser API client → Flask application: call REST APIs
- Login navigation → Flask application: request logout
- Flask application → Identity and sessions: dispatch auth
- Flask application → Booking lifecycle: dispatch bookings
- Flask application → Companion operations: dispatch companion actions
- Flask application → Ride completion: dispatch completion
- Flask application → Payment and feedback: dispatch payment and reviews
- Flask application → Emergency SOS: dispatch SOS
- Flask application → Admin oversight: dispatch admin actions
- Identity and sessions → ElderGo database: read and write
- Booking lifecycle → ElderGo database: read and write
- Companion operations → ElderGo database: read and write
- Ride completion → ElderGo database: read and write
- Payment and feedback → ElderGo database: read and write
- Emergency SOS → ElderGo database: read contact
- Admin oversight → ElderGo database: read and update
- Role dashboards → OpenStreetMap maps: show live maps
- Emergency SOS → SMS provider: send alert
