How divinegupta0611/hawkshield-frontend works
HawkShield is a React frontend for surveillance and threat monitoring. Users enter through the routed web app, authenticate, then use camera streaming, a multi-camera dashboard, or local-camera threat detection. The sampled code shows Supabase-backed camera/auth operations and WebSocket/WebRTC streaming; the detection screen excerpt shows camera capture and displayed results, but not a verified model-service connection. Several page implementations were not sampled, so their internal behavior is not inferred.
Main entry points: App.jsx Route Application · SupabaseClient.js Supabase Client · Stream.jsx Camera Streaming · Dashboard.jsx Camera Dashboard
Components 19
Web Application
- Route Application
src/App.jsx - Home Page
src/pages/Home.jsx - Navigation
src/components/NavBar.jsx
Identity
- Login
src/pages/Login.jsx - Signup
src/pages/Signup.jsx - Password Recovery
src/pages/ForgotPassword.jsx - Password Reset
src/pages/ResetPassword.jsx - Auth Callback
src/pages/AuthCallback.jsx - Auth Success
src/pages/AuthSuccess.jsx - Supabase Client
src/SupabaseClient.js
Camera Monitoring
- Camera Dashboard
src/pages/Dashboard.jsx - Local Detection
src/pages/Detect.jsx - Camera Streaming
src/pages/Stream.jsx
Product Information
- About Page
src/pages/About.jsx - Contact Page
src/pages/Contact.jsx
Other components
- User
- Supabase
- Camera Device
- Streaming Endpoint
Connections 27
- User → Route Application: opens
- Route Application → Home Page: routes to
src/App.jsx - Route Application → About Page: routes to
src/App.jsx - Route Application → Contact Page: routes to
src/App.jsx - Route Application → Signup: routes to
src/App.jsx - Route Application → Login: routes to
src/App.jsx - Route Application → Camera Dashboard: routes to
src/App.jsx - Route Application → Local Detection: routes to
src/App.jsx - Route Application → Password Recovery: routes to
src/App.jsx - Route Application → Password Reset: routes to
src/App.jsx - Route Application → Auth Callback: routes to
src/App.jsx - Route Application → Auth Success: routes to
src/App.jsx - Route Application → Camera Streaming: routes to
src/App.jsx - Navigation → Supabase Client: signs out via
src/components/NavBar.jsx - Supabase Client → Supabase: connects to
- Auth Callback → Supabase Client: sets session
src/pages/AuthCallback.jsx - Auth Success → Supabase Client: fetches user
src/pages/AuthSuccess.jsx - Auth Success → User: stores login
src/pages/AuthSuccess.jsx - Camera Dashboard → Navigation: renders
src/pages/Dashboard.jsx - Camera Dashboard → Supabase Client: queries cameras
src/pages/Dashboard.jsx - Camera Dashboard → Streaming Endpoint: opens WebSocket
src/pages/Dashboard.jsx - Local Detection → Navigation: renders
src/pages/Detect.jsx - Local Detection → Camera Device: captures video
src/pages/Detect.jsx - Camera Streaming → Navigation: renders
src/pages/Stream.jsx - Camera Streaming → Camera Device: captures video
src/pages/Stream.jsx - Camera Streaming → Supabase Client: manages camera
src/pages/Stream.jsx - Camera Streaming → Streaming Endpoint: sends frames
src/pages/Stream.jsx