How steamedbunss/vancouverhub works
Vancouver Hub is a React city-information dashboard for guests and signed-in residents. Users enter through the shared app shell, visit a configurable dashboard or dedicated category pages, and get local events, environmental conditions, traffic, gas prices, and nearby 311 reports from municipal and backend providers. Settings manage location, appearance, navigation, alert thresholds, and report filters; alert evaluation feeds navbar notifications. The README documents the provider and proxy capabilities; sampled source confirms routing, configuration persistence, and 311 preference handling, but not every page-to-provider call.
Main entry points: Layout.tsx Navigation shell · TrafficPage.tsx Traffic · App.tsx App routing · SettingsPage.tsx Settings
Components 25
Application shell
- App routing
src/App.tsx - Navigation shell
src/components/layout/Layout.tsx
Resident experience
- Dashboard
src/pages/DashboardPage.tsx - Settings
src/pages/SettingsPage.tsx - Authentication
src/pages/AuthPage.tsx
City information
- Local events
src/pages/EventsPage.tsx - Environment
src/pages/EnvironmentPage.tsx - Traffic
src/pages/TrafficPage.tsx - Neighbour reports
src/pages/Safety311Page.tsx - Dashboard sections
src/components/dashboard/sections
Data integrations
- Events provider
src/lib/api/events.ts - Environment provider
src/lib/api/environment.ts - Traffic providers
src/lib/api/open511.ts - Camera data
src/lib/api/vancouverTrafficCams.ts - Border wait function
netlify/functions/border-waits.ts - 311 provider
src/lib/api/serviceRequests.ts
Personalization and alerts
- User configuration
src/lib/userConfigStorage.ts - Configuration context
src/context/UserConfigContext.tsx - 311 preferences
src/context/ServiceRequestPreferencesContext.tsx - Alert evaluation
src/lib/alerts/evaluateAlerts.ts - Wildfire alerts
src/lib/alerts/evaluateNewWildfireAlerts.ts - Seen wildfire history
src/lib/alerts/seenWildfiresStorage.ts
Other components
- Resident
- Cascade Gateway
- Hub backend
Connections 28
- Resident → App routing: opens
- App routing → Navigation shell: routes through
- Navigation shell → Dashboard: displays
- Navigation shell → Settings: displays
- Navigation shell → Local events: displays
- Navigation shell → Environment: displays
- Navigation shell → Traffic: displays
- Navigation shell → Neighbour reports: displays
- App routing → Authentication: routes
- Dashboard → Dashboard sections: renders
- Dashboard sections → Events provider: loads events
- Dashboard sections → Environment provider: loads conditions
- Local events → Events provider: loads events
- Environment → Environment provider: loads conditions
- Traffic → Traffic providers: loads events
- Traffic → Camera data: loads cameras
- Traffic → Border wait function: requests waits
- Border wait function → Cascade Gateway: fetches waits
- Neighbour reports → 311 provider: loads reports
- 311 provider → Hub backend: requests data
- Events provider → Hub backend: requests data
- Environment provider → Hub backend: requests data
- Settings → Configuration context: updates preferences
- Configuration context → User configuration: reads and writes
- Settings → 311 preferences: edits filters
- 311 preferences → 311 provider: loads and saves
- Alert evaluation → Wildfire alerts: evaluates fires
- Wildfire alerts → Seen wildfire history: tracks seen fires