How akanxikushwaha/oceanhazardreporting works
OceanGuard is a coastal-hazard reporting web app with public information, user reporting, and administrator monitoring. A visitor signs in or signs up, users submit location- and image-supported hazard reports and can view dashboard features, while administrators review reports and access monitoring, analytics, and authority-contact views. The sampled source confirms routing, authentication, report submission and image storage, and administrator report retrieval; other dashboard component behavior is represented only at the documented component level.
Main entry points: supabaseClient.js Supabase client · App.jsx Router and session · HomePage.jsx Public home page · AdminDashboard.jsx Administrator dashboard
Components 20
Application and access
- React entry point
src/main.jsx - Router and session
src/App.jsx - Role gate
src/pages/homePage/signUp/ProtectedRoute.jsx - Sign-in and signup
src/pages/homePage/components/Header.jsx - Supabase client
src/pages/homePage/signUp/supabaseClient.js
Public information
- Public home page
src/pages/homePage/HomePage.jsx - Hero, features, statistics, footer
src/pages/homePage/components - Hazard news headlines
src/pages/homePage/components/NewsHeadlines.jsx
User reporting
- User dashboard
src/pages/userDashboard/UserDashboard.jsx - Hazard report submission
src/pages/userDashboard/components/ReportForm.jsx - Map, history, quick stats
src/pages/userDashboard/components
Administration
- Administrator dashboard
src/pages/adminDashboard/AdminDashboard.jsx - Report review and export
src/pages/adminDashboard/components/Reports.jsx - Dashboard, map, analytics
src/pages/adminDashboard/components - Authority contacts and alerts
src/pages/adminDashboard/components/AlertAuthorities.jsx
Other components
- Visitor or user
- Administrator
- Supabase service
- Reports data
- Report image storage
Connections 24
- Visitor or user → React entry point: opens app
- Administrator → React entry point: opens app
- React entry point → Router and session: renders
- Router and session → Supabase client: checks session and role
- Router and session → Public home page: routes public
- Router and session → Role gate: guards dashboards
- Role gate → User dashboard: admits user
- Role gate → Administrator dashboard: admits admin
- Public home page → Sign-in and signup: renders
- Public home page → Hero, features, statistics, footer: renders
- Public home page → Hazard news headlines: renders
- Sign-in and signup → Supabase client: signs in or up; reads profile
- Supabase client → Supabase service: auth and data requests
- Router and session → Supabase service: reads profile role
- User dashboard → Hazard report submission: renders
- User dashboard → Map, history, quick stats: renders
- Hazard report submission → Supabase client: gets user; uploads image; inserts report
- Supabase client → Reports data: stores and reads reports
- Supabase client → Report image storage: stores images
- Administrator dashboard → Report review and export: selects reports view
- Administrator dashboard → Dashboard, map, analytics: selects dashboard, map, or analytics
- Administrator dashboard → Authority contacts and alerts: selects alerts view
- Report review and export → Supabase client: fetches reports
- Report review and export → Reports data: reads reports