How caseyyygg/bahaba-official works
Bahaba is a location-based flood information and response web app. Users sign up or log in, select a location, then view flood reports and alerts on a map or in a command-center dashboard, and manage profile and notification settings. The React app coordinates those screens and calls a PHP API backed by a database; flood-map logic aggregates reports into map features, while browser service-worker notifications provide an alert channel. The empty README and unsampled page/API implementations limit evidence for several domain links; those relationships are omitted where they cannot be established.
Main entry points: App.jsx App coordinator · Icon.jsx Icon components · MapPage.jsx Map screen · api PHP API endpoints
Components 23
Web application
- App coordinator
bahaba-app/src/App.jsx - Authentication screens
bahaba-app/src/pages/AuthPage.jsx - Location selection
bahaba-app/src/pages/SelectionPage.jsx - Command dashboard
bahaba-app/src/pages/CommandPage.jsx - User settings
bahaba-app/src/pages/SettingsPage.jsx - Welcome screen
bahaba-app/src/pages/SplashPage.jsx - API client
bahaba-app/src/api.js - Saved settings
bahaba-app/src/useSavedSetting.js - Icon components
bahaba-app/src/components/Icon.jsx
API and data
- PHP API endpoints
bahaba-app/api - Request bootstrap
bahaba-app/api/bootstrap.php - Location helpers
bahaba-app/api/location_helpers.php - Report retention
bahaba-app/api/report-retention.php - Application database
Flood mapping
- Map screen
bahaba-app/src/pages/MapPage.jsx - Interactive map
bahaba-app/src/components/FreeMap.jsx - Flood aggregation
bahaba-app/src/floodMap.js - Location lookup
bahaba-app/src/locations.js
Notifications
- Alerts screen
bahaba-app/src/pages/AlertsPage.jsx - Notification controls
bahaba-app/src/notifications.js - Browser notification client
bahaba-app/public/notification-client.js - Notification worker
bahaba-app/public/notification-worker.js
Other components
- Resident or responder
Connections 29
- Resident or responder → App coordinator: uses
- App coordinator → Authentication screens: renders
bahaba-app/src/App.jsx - App coordinator → Location selection: renders
bahaba-app/src/App.jsx - App coordinator → Map screen: renders
bahaba-app/src/App.jsx - App coordinator → Alerts screen: renders
bahaba-app/src/App.jsx - App coordinator → Command dashboard: renders
bahaba-app/src/App.jsx - App coordinator → User settings: renders
bahaba-app/src/App.jsx - App coordinator → Welcome screen: renders
bahaba-app/src/App.jsx - App coordinator → API client: calls
bahaba-app/src/App.jsx - App coordinator → Saved settings: uses
bahaba-app/src/App.jsx - App coordinator → Notification controls: calls
bahaba-app/src/App.jsx - API client → PHP API endpoints: requests
- PHP API endpoints → Request bootstrap: loads
bahaba-app/api/index.php - Request bootstrap → Location helpers: loads
bahaba-app/api/bootstrap.php - Request bootstrap → Application database: connects
bahaba-app/api/bootstrap.php - PHP API endpoints → Application database: reads and writes
- Map screen → Interactive map: renders
bahaba-app/src/pages/MapPage.jsx - Map screen → Flood aggregation: aggregates
bahaba-app/src/pages/MapPage.jsx - Map screen → Location lookup: looks up
bahaba-app/src/pages/MapPage.jsx - Interactive map → Flood aggregation: builds points
bahaba-app/src/components/FreeMap.jsx - Map screen → Icon components: renders
bahaba-app/src/pages/MapPage.jsx - Authentication screens → Icon components: renders
bahaba-app/src/pages/AuthPage.jsx - Command dashboard → Icon components: renders
bahaba-app/src/pages/CommandPage.jsx - Alerts screen → Icon components: renders
bahaba-app/src/pages/AlertsPage.jsx - User settings → Icon components: renders
bahaba-app/src/pages/SettingsPage.jsx - Welcome screen → Icon components: renders
bahaba-app/src/pages/SplashPage.jsx - Notification controls → Browser notification client: uses
bahaba-app/src/notifications.js - Browser notification client → Notification worker: registers
bahaba-app/public/notification-client.js - Report retention → Application database: archives reports
bahaba-app/api/report-retention.php