# mahantyjayanta340-collab/campusride architecture

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

- Interactive diagram: https://gitdiagram.com/mahantyjayanta340-collab/campusride
- Repository: https://github.com/mahantyjayanta340-collab/campusride

## Overview

CampusRide is a small installable, offline-first PWA. The visible runtime centers on the service worker: it caches the app shell, serves navigation and static assets offline, handles Google Sheets requests with cached fallback, and displays push notifications. The README and file tree do not expose the app’s transit UI or business logic, so those capabilities and their connections are not inferred.

Main entry points: [`sw.js`](https://github.com/mahantyjayanta340-collab/campusride/blob/main/sw.js) (Service worker), [`index.html`](https://github.com/mahantyjayanta340-collab/campusride/blob/main/index.html) (App shell), [`manifest.json`](https://github.com/mahantyjayanta340-collab/campusride/blob/main/manifest.json) (PWA manifest)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("CampusRide user"))
node_app["App shell<br/>[index.html]"]
node_manifest["PWA manifest<br/>[manifest.json]"]
node_worker["Service worker<br/>[sw.js]"]
node_cache[("Browser cache")]
node_sheets["Google Sheets GViz"]
node_push["Web Push service"]
node_notification["Transit notification"]

node_user -->|"opens"| node_app
node_worker -->|"caches shell"| node_cache
node_worker -->|"serves navigation"| node_app
node_worker -->|"caches asset"| node_manifest
node_worker -->|"syncs requests"| node_sheets
node_worker -->|"stores responses"| node_cache
node_cache -->|"supplies fallback"| node_worker
node_push -->|"delivers push"| node_worker
node_worker -->|"displays"| node_notification
node_user -->|"clicks"| node_notification
node_worker -->|"focuses or opens"| node_app

click node_app "https://github.com/mahantyjayanta340-collab/campusride/blob/main/index.html"
click node_manifest "https://github.com/mahantyjayanta340-collab/campusride/blob/main/manifest.json"
click node_worker "https://github.com/mahantyjayanta340-collab/campusride/blob/main/sw.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_user toneBlue
class node_app,node_manifest toneTeal
class node_worker toneRose
class node_cache toneAmber
class node_sheets,node_push,node_notification toneIndigo
```

## Components

### Other components

- **CampusRide user**
- [App shell](https://github.com/mahantyjayanta340-collab/campusride/blob/main/index.html): `index.html`
- [PWA manifest](https://github.com/mahantyjayanta340-collab/campusride/blob/main/manifest.json): `manifest.json`
- [Service worker](https://github.com/mahantyjayanta340-collab/campusride/blob/main/sw.js): `sw.js`
- **Browser cache**
- **Google Sheets GViz**
- **Web Push service**
- **Transit notification**

## Connections

- CampusRide user → App shell: opens
- Service worker → Browser cache: caches shell (evidence: `sw.js`)
- Service worker → App shell: serves navigation (evidence: `sw.js`)
- Service worker → PWA manifest: caches asset (evidence: `sw.js`)
- Service worker → Google Sheets GViz: syncs requests (evidence: `sw.js`)
- Service worker → Browser cache: stores responses (evidence: `sw.js`)
- Browser cache → Service worker: supplies fallback (evidence: `sw.js`)
- Web Push service → Service worker: delivers push (evidence: `sw.js`)
- Service worker → Transit notification: displays (evidence: `sw.js`)
- CampusRide user → Transit notification: clicks
- Service worker → App shell: focuses or opens (evidence: `sw.js`)
