How arjunjayakrishnan-codes/suraksha-ai works
Secure Gig Guardian combines worker/insurer dashboards for income protection with a FastAPI service for identity, policies, claims and payouts. Users authenticate and enter role-protected dashboards; workers can review coverage, claims and payout status, while admins manage workers and claims. The README also describes pricing, risk, telemetry and ledger capabilities. Backend storage and some feature wiring are not shown in the sampled excerpts, so those links are limited to documented behavior or explicit API calls.
Main entry points: api_server.py FastAPI service · Index.tsx Protection overview · useAuth.tsx Auth and roles · App.tsx Routes and auth provider
Components 28
Access and dashboards
- App bootstrap
src/main.tsx - Routes and auth provider
src/App.tsx - Sign-in and signup
src/pages/Auth.tsx - Auth and roles
src/hooks/useAuth.tsx - Worker dashboard
src/pages/WorkerDashboard.tsx - Insurer dashboard
src/pages/InsurerDashboard.tsx
Worker protection
- Protection overview
src/pages/Index.tsx - Dynamic pricing
src/components/DynamicPricing.tsx - Risk pulse
src/components/RiskPulse.tsx - Telemetry insights
src/components/TelemetryCard.tsx - Micro ledger
src/components/MicroLedger.tsx - Policy management
src/components/PolicyManagement.tsx - Claims management
src/components/ClaimsManagement.tsx - Worker and claim review
src/components/AdminWorkerManagement.tsx
API and domain services
- Authenticated API client
src/lib/api-client.ts - FastAPI service
api_server.py - Role authorization
user_roles.py - Policy service
policy_management.py - Claims service
claims_management.py - Fraud analysis
fraud_detection.py - Advanced fraud analysis
advanced_fraud_detection.py - Pricing engine
dynamic_pricing.py - Instant payout system
instant_payout_system.py - Payment simulator
payment_simulator.py
External services
- Supabase Auth
src/integrations/supabase/client.ts - MongoDB or memory store
Other components
- Gig worker
- Insurer admin
Connections 34
- Gig worker → Sign-in and signup: signs in
- Insurer admin → Sign-in and signup: signs in
- App bootstrap → FastAPI service: fetches config
- App bootstrap → Routes and auth provider: renders
- Routes and auth provider → Auth and roles: provides auth
- Routes and auth provider → Sign-in and signup: routes
- Routes and auth provider → Worker dashboard: role routes
- Routes and auth provider → Insurer dashboard: role routes
- Sign-in and signup → Auth and roles: signs up/in
- Auth and roles → Supabase Auth: authenticates
- Auth and roles → FastAPI service: fetches profile
- Auth and roles → Worker dashboard: provides session
- Auth and roles → Insurer dashboard: provides session
- Worker dashboard → Authenticated API client: fetches dashboard data
- Insurer dashboard → Worker and claim review: manages workers
- Protection overview → Risk pulse: renders
- Protection overview → Dynamic pricing: renders
- Protection overview → Telemetry insights: renders
- Protection overview → Micro ledger: renders
- Protection overview → Policy management: renders
- Protection overview → Claims management: renders
- Policy management → Authenticated API client: requests policies
- Claims management → Authenticated API client: requests claims
- Worker and claim review → Authenticated API client: reviews workers/claims
- Authenticated API client → FastAPI service: sends authenticated requests
- FastAPI service → Role authorization: checks roles
- FastAPI service → Policy service: calls policy service
- FastAPI service → Claims service: calls claims service
- FastAPI service → Instant payout system: initiates payouts
- FastAPI service → MongoDB or memory store: persists records
- FastAPI service → Fraud analysis: uses fraud analysis
- FastAPI service → Advanced fraud analysis: uses enhanced analysis
- FastAPI service → Pricing engine: uses pricing engine
- Instant payout system → Payment simulator: simulates payment