How josephamuasi001/camp-sec-system works
Camp-Sec is a campus security incident reporting and case-management application for students and security staff. Users enter through a React interface, register or log in, and can report incidents, review their own reports, and edit incident details. Security staff have separate account flows, a dashboard, and tools to review cases and change their statuses. The FastAPI backend handles these operations and uses Supabase for persistence. The shown source supports the frontend routing, selected API calls, and backend storage access; other frontend-to-backend links are shown as unverified HTTP interactions.
Main entry points: App.jsx Application router · api.js HTTP API client · Dashboard.jsx Student dashboard · SecurityDashboard.jsx Security dashboard
Components 18
Web application
- Application router
frontend/src/App.jsx - Role navigation
frontend/src/components/Navbar.jsx - HTTP API client
frontend/src/services/api.js
Student workflows
- Student accounts
frontend/src/pages/Login.jsx - Student registration
frontend/src/pages/Register.jsx - Student dashboard
frontend/src/pages/Dashboard.jsx - Incident card
frontend/src/components/IncidentCard.jsx - Incident reporting
frontend/src/pages/ReportIncident.jsx - Incident details
frontend/src/pages/IncidentDetails.jsx - Edit incident
frontend/src/pages/EditIncident.jsx
Security workflows
- Security accounts
frontend/src/pages/AdminLogin.jsx - Security registration
frontend/src/pages/AdminRegister.jsx - Security dashboard
frontend/src/pages/SecurityDashboard.jsx - Case management
frontend/src/pages/ManageIncident.jsx
Backend and storage
- Incident and account API
backend/app/main.py - Supabase client
backend/app/database.py - Supabase data store
Other components
- Campus users
Connections 28
- Campus users → Application router: uses
- Application router → Role navigation: renders
frontend/src/App.jsx - Application router → Student accounts: routes to
frontend/src/App.jsx - Application router → Student registration: routes to
frontend/src/App.jsx - Application router → Student dashboard: routes to
frontend/src/App.jsx - Application router → Incident reporting: routes to
frontend/src/App.jsx - Application router → Incident details: routes to
frontend/src/App.jsx - Application router → Edit incident: routes to
frontend/src/App.jsx - Application router → Security accounts: routes to
frontend/src/App.jsx - Application router → Security registration: routes to
frontend/src/App.jsx - Application router → Security dashboard: routes to
frontend/src/App.jsx - Application router → Case management: routes to
frontend/src/App.jsx - Student accounts → HTTP API client: calls
frontend/src/pages/Login.jsx - Student registration → HTTP API client: calls
frontend/src/pages/Register.jsx - Student dashboard → HTTP API client: loads reports
frontend/src/pages/Dashboard.jsx - Student dashboard → Incident card: renders
frontend/src/pages/Dashboard.jsx - Incident reporting → HTTP API client: submits reports
frontend/src/pages/ReportIncident.jsx - Incident details → HTTP API client: loads and updates
frontend/src/pages/IncidentDetails.jsx - Edit incident → HTTP API client: loads and updates
frontend/src/pages/EditIncident.jsx - Security accounts → HTTP API client: calls
frontend/src/pages/AdminLogin.jsx - Security registration → HTTP API client: calls
frontend/src/pages/AdminRegister.jsx - Security dashboard → HTTP API client: loads cases
frontend/src/pages/SecurityDashboard.jsx - Security dashboard → Incident card: renders
frontend/src/pages/SecurityDashboard.jsx - Case management → HTTP API client: loads and updates status
frontend/src/pages/ManageIncident.jsx - HTTP API client → Incident and account API: sends HTTP requests
- Incident and account API → Supabase client: imports client
backend/app/main.py - Supabase client → Supabase data store: connects
backend/app/database.py - Incident and account API → Supabase data store: reads and writes
backend/app/main.py