How vishnu7332/ocean-guard works
OceanGuard is a coastal-hazard reporting and monitoring web app. Users enter through the application shell, authenticate when Supabase is configured, and can submit hazard reports or view reports and summary metrics; officials and analysts also have analytics and user-management views. The graph preserves the indexed feature modules, including features whose implementation was not excerpted. Edges are limited to relationships visible in excerpts or the source index; unsampled behavior is not inferred.
Main entry points: App.tsx Application Shell · supabase.ts Supabase Client · useAuth.ts Auth State · HazardReporting.tsx Hazard Reporting
Components 16
Application Shell
- Web Entry
src/main.tsx - Application Shell
src/App.tsx - Header
src/components/Header.tsx - Role Navigation
src/components/Sidebar.tsx
Identity and Localization
- Sign-in Form
src/components/AuthModal.tsx - Auth State
src/hooks/useAuth.ts - Translations
src/i18n/config.ts - Language Switcher
src/components/LanguageSwitcher.tsx
Hazard Operations
- Hazard Reporting
src/components/HazardReporting.tsx - Report Dashboard
src/components/Dashboard.tsx - Hazard Map
src/components/HazardMap.tsx - Supabase Client
src/lib/supabase.ts
Monitoring and Administration
- Social Analytics
src/components/SocialAnalytics.tsx - User Management
src/components/UserManagement.tsx
Other components
- Supabase Backend
- Google Maps
Connections 23
- Web Entry → Application Shell: renders
src/main.tsx - Application Shell → Report Dashboard: routes to
src/App.tsx - Application Shell → Hazard Reporting: routes to
src/App.tsx - Application Shell → Hazard Map: routes to
src/App.tsx - Application Shell → Social Analytics: routes to
src/App.tsx - Application Shell → User Management: routes to
src/App.tsx - Application Shell → Sign-in Form: renders
src/App.tsx - Application Shell → Role Navigation: renders
src/App.tsx - Application Shell → Header: renders
src/App.tsx - Application Shell → Auth State: reads state
src/App.tsx - Sign-in Form → Auth State: invokes auth
src/components/AuthModal.tsx - Auth State → Supabase Client: uses client
src/hooks/useAuth.ts - Header → Auth State: invokes logout
src/components/Header.tsx - Header → Language Switcher: renders
src/components/Header.tsx - Web Entry → Translations: initializes
src/main.tsx - Hazard Reporting → Auth State: reads user
src/components/HazardReporting.tsx - Hazard Reporting → Supabase Client: writes reports
src/components/HazardReporting.tsx - Report Dashboard → Supabase Client: reads reports
src/components/Dashboard.tsx - Hazard Map → Supabase Client: reads reports
src/components/HazardMap.tsx - Social Analytics → Supabase Client: uses client
src/components/SocialAnalytics.tsx - Supabase Client → Supabase Backend: connects to
src/lib/supabase.ts - Hazard Reporting → Google Maps: geocodes location
src/components/HazardReporting.tsx - Hazard Map → Google Maps: renders map
src/components/HazardMap.tsx