How mradipatil770-cpu/cybersathi works
CyberSathi is a story-driven cybersecurity training platform with a separate institutional learning-management workflow. Learners authenticate or enter as guests, choose a scenario, investigate evidence through interactive challenges, and receive debriefs and progression rewards. The React client serves gameplay, learning notes, and role-based institution dashboards; authenticated data operations go through FastAPI to Supabase, while guest progress stays in browser storage. README documents capabilities beyond the sampled source, so uncertain implementation-level links are omitted.
Main entry points: Storyline.jsx Scenario gameplay · apiClient.js API client · MissionDetails.jsx Scenario map · AuthContext.jsx Auth context
Components 25
Scenario learning
- Scenario discovery
frontend/src/pages/Landing.jsx - Scenario map
frontend/src/pages/MissionDetails.jsx - Scenario gameplay
frontend/src/pages/Storyline.jsx - Challenge selector
frontend/src/components/storyline/LevelEngine.jsx - Challenge types
frontend/src/components/challenges - Scenario content
frontend/src/data/storylines.js - Learning notes
frontend/src/components/storyline/DocumentationViewer.jsx
Identity and access
- React application
frontend/src/App.jsx - Auth context
frontend/src/context/AuthContext.jsx
Player progress
- Player dashboard
frontend/src/pages/Dashboard.jsx - Progress client
frontend/src/lib/progress.js - Scoring logic
frontend/src/lib/scoring.js - Achievements and streaks
frontend/src/lib/db/achievementService.js - Leaderboard
frontend/src/lib/db/leaderboardService.js
Institution management
- Institution dashboards
frontend/src/pages/institution - Institution services
frontend/src/lib/db/institutionService.js
Backend services
- API client
frontend/src/lib/apiClient.js - FastAPI application
backend/app/main.py - API route modules
backend/app/routers - Session verification
backend/app/auth.py - Database access
backend/app/supabase_admin.py
Other components
- Learner
- Supabase Auth
- Supabase data services
- Browser progress storage
Connections 30
- Learner → React application: uses
- React application → Auth context: provides auth
- Auth context → Supabase Auth: signs in
- Auth context → API client: ensures profile
- Learner → Scenario discovery: discovers scenarios
- Scenario discovery → Scenario map: opens scenario
- Scenario map → Scenario gameplay: starts investigation
- Scenario gameplay → Scenario content: loads scenario
- Scenario gameplay → Challenge selector: renders level
- Challenge selector → Challenge types: selects challenge
- Scenario map → Learning notes: opens notes
- Scenario gameplay → Learning notes: opens notes
- Learner → Player dashboard: views progress
- Scenario gameplay → Progress client: saves progress
- Progress client → Browser progress storage: stores guest data
- Progress client → API client: syncs progress
- Scenario gameplay → Scoring logic: scores attempts
- Player dashboard → Achievements and streaks: loads rewards
- Player dashboard → Leaderboard: loads standings
- Learner → Institution dashboards: uses institution tools
- Institution dashboards → Institution services: requests institution data
- Institution services → API client: sends requests
- API client → FastAPI application: calls API
- FastAPI application → API route modules: dispatches routes
- API route modules → Session verification: verifies sessions
- API client → Supabase Auth: gets access token
- Session verification → Supabase Auth: validates token
- API route modules → Database access: reads and writes
- Database access → Supabase data services: accesses data
- Leaderboard → Supabase data services: subscribes to changes