# juztisleague/sulitgas architecture

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

- Interactive diagram: https://gitdiagram.com/juztisleague/sulitgas
- Repository: https://github.com/juztisleague/sulitgas

## Overview

SulitGas is a React fuel-price and station-information app. Its main workflow loads station records, lets users browse and filter stations on a map/list, and accepts price reports that update a station record. Separate screens show fuel-price gauges and a news feed; an OSM import utility can add station records. The README is empty, and several indexed components were not excerpted, so their internals and undocumented links are not inferred.

Main entry points: [`sulitgas/src/App.jsx`](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/App.jsx) (App Router), [`sulitgas/src/pages/Home.jsx`](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/pages/Home.jsx) (Station Home), [`sulitgas/src/pages/Report.jsx`](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/pages/Report.jsx) (Report Page), [`sulitgas/src/utils/fetchOsmStations.js`](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/utils/fetchOsmStations.js) (OSM Station Import)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app["App Router<br/>[App.jsx]"]
  node_navbar["Navigation Bar<br/>[NavBar.jsx]"]
  node_entry["React Entry<br/>[main.jsx]"]
end

subgraph group_stations["Station Discovery"]
  node_home["Station Home<br/>[Home.jsx]"]
  node_fuel["Fuel Selector<br/>[FuelToggle.jsx]"]
  node_stationlist["Station List<br/>[StationList.jsx]"]
  node_distance["Distance Calculator<br/>[distance.js]"]
end

subgraph group_reports["Price Reporting"]
  node_reportpage["Report Page<br/>[Report.jsx]"]
  node_reportform["Price Report Form<br/>[ReportForm.jsx]"]
end

subgraph group_news["News and Prices"]
  node_news["News Page<br/>[News.jsx]"]
  node_gauge["Price Gauge<br/>[Gauge.jsx]"]
  node_newsdata["News Items<br/>[news.js]"]
end

subgraph group_data["Data Integrations"]
  node_stationdata["Station Data<br/>[stations.js]"]
  node_supabaseclient["Supabase Client<br/>[supabaseClient.js]"]
  node_osmimport["OSM Station Import"]
end

node_user(("User"))
node_browser(("Browser Runtime"))
node_database[("Supabase Stations")]
node_overpass["Overpass API"]
node_tiles["OpenStreetMap Tiles"]

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_reportpage
node_app -->|"routes to"| node_news
node_app -->|"uses"| node_supabaseclient
node_app -->|"reads and updates"| node_database
node_app -->|"passes stations"| node_home
node_home -->|"renders"| node_fuel
node_home -->|"renders"| node_stationlist
node_stationlist -->|"calculates distance"| node_distance
node_home -->|"loads map tiles"| node_tiles
node_user -->|"browses stations"| node_home
node_browser -->|"provides location"| node_home
node_stationlist -->|"links to report"| node_reportpage
node_reportpage -->|"renders"| node_reportform
node_reportform -->|"submits report"| node_reportpage
node_reportpage -->|"passes report callback"| node_app
node_news -->|"renders"| node_gauge
node_news -->|"displays items"| node_newsdata
node_osmimport -->|"fetches stations"| node_overpass
node_osmimport -->|"uses"| node_supabaseclient
node_osmimport -->|"inserts stations"| node_database
node_supabaseclient -.->|"connects"| node_database

click node_app "https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/App.jsx"
click node_navbar "https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/NavBar.jsx"
click node_home "https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/pages/Home.jsx"
click node_fuel "https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/FuelToggle.jsx"
click node_stationlist "https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/StationList.jsx"
click node_distance "https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/utils/distance.js"
click node_stationdata "https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/data/stations.js"
click node_reportpage "https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/pages/Report.jsx"
click node_reportform "https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/ReportForm.jsx"
click node_news "https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/pages/News.jsx"
click node_gauge "https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/Gauge.jsx"
click node_newsdata "https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/data/news.js"
click node_supabaseclient "https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/supabaseClient.js"
click node_osmimport "https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/utils/fetchOsmStations.js"
click node_entry "https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/main.jsx"

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_navbar,node_entry,node_user,node_browser toneBlue
class node_home,node_fuel,node_stationlist,node_distance,node_database toneAmber
class node_reportpage,node_reportform,node_overpass toneMint
class node_news,node_gauge,node_newsdata toneRose
class node_stationdata,node_supabaseclient,node_osmimport,node_tiles toneIndigo
```

## Components

### Application

- [App Router](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/App.jsx): `sulitgas/src/App.jsx`
- [Navigation Bar](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/NavBar.jsx): `sulitgas/src/NavBar.jsx`
- [React Entry](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/main.jsx): `sulitgas/src/main.jsx`

### Station Discovery

- [Station Home](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/pages/Home.jsx): `sulitgas/src/pages/Home.jsx`
- [Fuel Selector](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/FuelToggle.jsx): `sulitgas/src/FuelToggle.jsx`
- [Station List](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/StationList.jsx): `sulitgas/src/StationList.jsx`
- [Distance Calculator](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/utils/distance.js): `sulitgas/src/utils/distance.js`

### Price Reporting

- [Report Page](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/pages/Report.jsx): `sulitgas/src/pages/Report.jsx`
- [Price Report Form](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/ReportForm.jsx): `sulitgas/src/ReportForm.jsx`

### News and Prices

- [News Page](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/pages/News.jsx): `sulitgas/src/pages/News.jsx`
- [Price Gauge](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/Gauge.jsx): `sulitgas/src/Gauge.jsx`
- [News Items](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/data/news.js): `sulitgas/src/data/news.js`

### Data Integrations

- [Station Data](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/data/stations.js): `sulitgas/src/data/stations.js`
- [Supabase Client](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/supabaseClient.js): `sulitgas/src/supabaseClient.js`
- [OSM Station Import](https://github.com/juztisleague/sulitgas/blob/main/sulitgas/src/utils/fetchOsmStations.js): `sulitgas/src/utils/fetchOsmStations.js`

### Other components

- **User**
- **Browser Runtime**
- **Supabase Stations**
- **Overpass API**
- **OpenStreetMap Tiles**

## Connections

- User → React Entry: opens app (evidence: `sulitgas/src/main.jsx`)
- React Entry → App Router: renders (evidence: `sulitgas/src/main.jsx`)
- App Router → Navigation Bar: renders (evidence: `sulitgas/src/App.jsx`)
- App Router → Station Home: routes to (evidence: `sulitgas/src/App.jsx`)
- App Router → Report Page: routes to (evidence: `sulitgas/src/App.jsx`)
- App Router → News Page: routes to (evidence: `sulitgas/src/App.jsx`)
- App Router → Supabase Client: uses (evidence: `sulitgas/src/App.jsx`)
- App Router → Supabase Stations: reads and updates (evidence: `sulitgas/src/App.jsx`)
- App Router → Station Home: passes stations (evidence: `sulitgas/src/App.jsx`)
- Station Home → Fuel Selector: renders (evidence: `sulitgas/src/pages/Home.jsx`)
- Station Home → Station List: renders (evidence: `sulitgas/src/pages/Home.jsx`)
- Station List → Distance Calculator: calculates distance (evidence: `sulitgas/src/StationList.jsx`)
- Station Home → OpenStreetMap Tiles: loads map tiles (evidence: `sulitgas/src/pages/Home.jsx`)
- User → Station Home: browses stations (evidence: `sulitgas/src/pages/Home.jsx`)
- Browser Runtime → Station Home: provides location (evidence: `sulitgas/src/pages/Home.jsx`)
- Station List → Report Page: links to report (evidence: `sulitgas/src/StationList.jsx`)
- Report Page → Price Report Form: renders (evidence: `sulitgas/src/pages/Report.jsx`)
- Price Report Form → Report Page: submits report (evidence: `sulitgas/src/ReportForm.jsx`)
- Report Page → App Router: passes report callback (evidence: `sulitgas/src/App.jsx`)
- News Page → Price Gauge: renders (evidence: `sulitgas/src/pages/News.jsx`)
- News Page → News Items: displays items (evidence: `sulitgas/src/pages/News.jsx`)
- OSM Station Import → Overpass API: fetches stations (evidence: `sulitgas/src/utils/fetchOsmStations.js`)
- OSM Station Import → Supabase Client: uses (evidence: `sulitgas/src/utils/fetchOsmStations.js`)
- OSM Station Import → Supabase Stations: inserts stations (evidence: `sulitgas/src/utils/fetchOsmStations.js`)
- Supabase Client → Supabase Stations: connects
