# saanvi-b-star/safe-routes-recommendation-project architecture

> Architecture diagram of the GitHub repository saanvi-b-star/safe-routes-recommendation-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/saanvi-b-star/safe-routes-recommendation-project
- Repository: https://github.com/saanvi-b-star/safe-routes-recommendation-project

## Overview

This repository is a web app for safer-route journeys, with account entry, route/map interaction, emergency actions, and route feedback. The visible journey begins at the landing page, proceeds through signup or login to Home, where users request and select routes, and can report feedback or trigger SOS actions. The backend server is present, but its implementation details are not exposed in the provided excerpts; edges to it reflect only the frontend’s explicit HTTP requests. The README is a placeholder, so broader claims about route-safety data inputs are not verified here.

Main entry points: [`src/frontend/src/Components/Home.jsx`](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/Home.jsx) (Journey Map), [`src/frontend/src/App.jsx`](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/App.jsx) (Route App), [`src/backend/server.js`](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/backend/server.js) (HTTP Server), [`src/frontend/src/Components/LandingPage.jsx`](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/LandingPage.jsx) (Landing Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and Accounts"]
  node_app["Route App<br/>[App.jsx]"]
  node_landing["Landing Page<br/>[LandingPage.jsx]"]
  node_navbar["Navigation Bar<br/>[Navbar.jsx]"]
  node_welcome["Welcome View<br/>[Welcome.jsx]"]
  node_about["About View<br/>[About.jsx]"]
  node_signup["Signup<br/>[SignUp.jsx]"]
  node_login["Login<br/>[Login.jsx]"]
end

subgraph group_journey["Journey and Routing"]
  node_home["Journey Map<br/>[Home.jsx]"]
  node_feedback["Route Feedback<br/>[Feedback.jsx]"]
end

subgraph group_safety["Safety Actions"]
  node_sosmsg["SOS Message<br/>[SOSmsg.jsx]"]
  node_soscall["Siren Control<br/>[SOScall.jsx]"]
  node_siren["Siren Audio<br/>[police-siren.mp3]"]
end

subgraph group_service["Server and Services"]
  node_backend["HTTP Server<br/>[server.js]"]
  node_graphhopper["GraphHopper"]
  node_openstreetmap["OpenStreetMap Tiles"]
end

node_traveler(("Traveler"))

node_traveler -->|"opens"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_signup
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_feedback
node_landing -->|"renders"| node_navbar
node_landing -->|"renders"| node_welcome
node_landing -->|"renders"| node_about
node_traveler -->|"submits details"| node_signup
node_signup -->|"posts registration"| node_backend
node_traveler -->|"submits email"| node_login
node_login -->|"posts login"| node_backend
node_traveler -->|"plans journey"| node_home
node_home -->|"requests routes"| node_graphhopper
node_home -->|"loads map tiles"| node_openstreetmap
node_home -->|"fetches alerts"| node_backend
node_home -->|"renders"| node_sosmsg
node_home -->|"renders"| node_soscall
node_traveler -->|"submits feedback"| node_feedback
node_feedback -->|"posts feedback"| node_backend
node_traveler -->|"confirms SOS"| node_sosmsg
node_sosmsg -->|"posts SMS request"| node_backend
node_traveler -->|"confirms siren"| node_soscall
node_soscall -->|"plays audio"| node_siren

click node_app "https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/App.jsx"
click node_landing "https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/LandingPage.jsx"
click node_navbar "https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/Navbar.jsx"
click node_welcome "https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/Welcome.jsx"
click node_about "https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/About.jsx"
click node_signup "https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/SignUp.jsx"
click node_login "https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/Login.jsx"
click node_home "https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/Home.jsx"
click node_feedback "https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/Feedback.jsx"
click node_sosmsg "https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/SOSmsg.jsx"
click node_soscall "https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/SOScall.jsx"
click node_siren "https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/assets/police-siren.mp3"
click node_backend "https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/backend/server.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_app,node_landing,node_navbar,node_welcome,node_about,node_signup,node_login toneBlue
class node_home,node_feedback toneAmber
class node_sosmsg,node_soscall,node_siren toneMint
class node_backend,node_graphhopper,node_openstreetmap toneRose
class node_traveler toneIndigo
```

## Components

### Entry and Accounts

- [Route App](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/App.jsx): `src/frontend/src/App.jsx`
- [Landing Page](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/LandingPage.jsx): `src/frontend/src/Components/LandingPage.jsx`
- [Navigation Bar](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/Navbar.jsx): `src/frontend/src/Components/Navbar.jsx`
- [Welcome View](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/Welcome.jsx): `src/frontend/src/Components/Welcome.jsx`
- [About View](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/About.jsx): `src/frontend/src/Components/About.jsx`
- [Signup](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/SignUp.jsx): `src/frontend/src/Components/SignUp.jsx`
- [Login](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/Login.jsx): `src/frontend/src/Components/Login.jsx`

### Journey and Routing

- [Journey Map](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/Home.jsx): `src/frontend/src/Components/Home.jsx`
- [Route Feedback](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/Feedback.jsx): `src/frontend/src/Components/Feedback.jsx`

### Safety Actions

- [SOS Message](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/SOSmsg.jsx): `src/frontend/src/Components/SOSmsg.jsx`
- [Siren Control](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/Components/SOScall.jsx): `src/frontend/src/Components/SOScall.jsx`
- [Siren Audio](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/frontend/src/assets/police-siren.mp3): `src/frontend/src/assets/police-siren.mp3`

### Server and Services

- [HTTP Server](https://github.com/saanvi-b-star/safe-routes-recommendation-project/blob/main/src/backend/server.js): `src/backend/server.js`
- **GraphHopper**
- **OpenStreetMap Tiles**

### Other components

- **Traveler**

## Connections

- Traveler → Route App: opens
- Route App → Landing Page: routes to (evidence: `src/frontend/src/App.jsx`)
- Route App → Signup: routes to (evidence: `src/frontend/src/App.jsx`)
- Route App → Login: routes to (evidence: `src/frontend/src/App.jsx`)
- Route App → Journey Map: routes to (evidence: `src/frontend/src/App.jsx`)
- Route App → Route Feedback: routes to (evidence: `src/frontend/src/App.jsx`)
- Landing Page → Navigation Bar: renders (evidence: `src/frontend/src/Components/LandingPage.jsx`)
- Landing Page → Welcome View: renders (evidence: `src/frontend/src/Components/LandingPage.jsx`)
- Landing Page → About View: renders (evidence: `src/frontend/src/Components/LandingPage.jsx`)
- Traveler → Signup: submits details (evidence: `src/frontend/src/Components/SignUp.jsx`)
- Signup → HTTP Server: posts registration (evidence: `src/frontend/src/Components/SignUp.jsx`)
- Traveler → Login: submits email (evidence: `src/frontend/src/Components/Login.jsx`)
- Login → HTTP Server: posts login (evidence: `src/frontend/src/Components/Login.jsx`)
- Traveler → Journey Map: plans journey (evidence: `src/frontend/src/Components/Home.jsx`)
- Journey Map → GraphHopper: requests routes (evidence: `src/frontend/src/Components/Home.jsx`)
- Journey Map → OpenStreetMap Tiles: loads map tiles (evidence: `src/frontend/src/Components/Home.jsx`)
- Journey Map → HTTP Server: fetches alerts (evidence: `src/frontend/src/Components/Home.jsx`)
- Journey Map → SOS Message: renders (evidence: `src/frontend/src/Components/Home.jsx`)
- Journey Map → Siren Control: renders (evidence: `src/frontend/src/Components/Home.jsx`)
- Traveler → Route Feedback: submits feedback (evidence: `src/frontend/src/Components/Feedback.jsx`)
- Route Feedback → HTTP Server: posts feedback (evidence: `src/frontend/src/Components/Feedback.jsx`)
- Traveler → SOS Message: confirms SOS (evidence: `src/frontend/src/Components/SOSmsg.jsx`)
- SOS Message → HTTP Server: posts SMS request (evidence: `src/frontend/src/Components/SOSmsg.jsx`)
- Traveler → Siren Control: confirms siren (evidence: `src/frontend/src/Components/SOScall.jsx`)
- Siren Control → Siren Audio: plays audio (evidence: `src/frontend/src/Components/SOScall.jsx`)
