How maharshi007/onexcode works
OneXCode is a company-specific DSA placement-preparation platform. Students browse companies and their questions, explore and filter the shared problem catalog, generate preparation sprints, inspect problem details, and track readiness and solved work. The frontend routes these experiences through a shared API client to a FastAPI service; company/problem data is modeled relationally, while authenticated progress has its own API and persistence path. The README documents capabilities whose page or route implementation was not sampled; those branches are included without asserting unverified internal calls.
Main entry points: App.tsx Router and shell · api.ts API client · companies.py Company endpoints · progress.py Progress endpoints
Components 21
Student application
- Router and shell
frontend/src/App.tsx - Company directory
frontend/src/pages/CompaniesPage.tsx - Company preparation
frontend/src/pages/CompanyDetailPage.tsx - Problem explorer
frontend/src/pages/ProblemsPage.tsx - Problem details
frontend/src/pages/ProblemDetailPage.tsx - Global search
frontend/src/components/common/GlobalSearchModal.tsx - Readiness dashboard
frontend/src/pages/DashboardPage.tsx - Navigation and sign-in
frontend/src/components/layout/Navbar.tsx - API client
frontend/src/services/api.ts - Sprint generator
frontend/src/components/problems/PreparationModeModal.tsx
Problem catalog
- Company endpoints
backend/app/api/companies.py - Problem endpoints
backend/app/api/problems.py - Catalog service
backend/app/services/dsa_service.py - Company problem data
backend/app/models/problem.py
Preparation progress
- Progress state
frontend/src/context/ProgressContext.tsx - Progress endpoints
backend/app/api/progress.py
API and persistence
- JWT validation
backend/app/core/auth.py - FastAPI application
backend/app/main.py - SQL database
backend/app/db/session.py
Other components
- Student
- Supabase auth
Connections 27
- Student → Router and shell: uses
- Router and shell → Company directory: routes to
frontend/src/App.tsx - Router and shell → Company preparation: routes to
frontend/src/App.tsx - Router and shell → Problem explorer: routes to
frontend/src/App.tsx - Router and shell → Problem details: routes to
frontend/src/App.tsx - Router and shell → Readiness dashboard: routes to
frontend/src/App.tsx - Router and shell → Global search: renders
frontend/src/App.tsx - Navigation and sign-in → Supabase auth: signs in with
frontend/src/components/layout/Navbar.tsx - Sprint generator → API client: requests sprint
frontend/src/components/problems/PreparationModeModal.tsx - Problem explorer → API client: fetches catalog
frontend/src/pages/ProblemsPage.tsx - Global search → API client: searches
frontend/src/components/common/GlobalSearchModal.tsx - API client → Company endpoints: requests companies
- API client → Problem endpoints: requests problems
- Company endpoints → Catalog service: delegates to
backend/app/api/companies.py - Company endpoints → Company problem data: queries
- Problem endpoints → Catalog service: delegates to
- Catalog service → Company problem data: reads catalog
- Readiness dashboard → Progress state: shows progress
- Navigation and sign-in → Progress state: reads solved count
frontend/src/components/layout/Navbar.tsx - Progress state → API client: syncs progress
- API client → Progress endpoints: requests progress
- Progress endpoints → JWT validation: validates identity
backend/app/api/progress.py - Progress endpoints → SQL database: reads and writes
backend/app/api/progress.py - FastAPI application → Company endpoints: mounts routes
backend/app/main.py - FastAPI application → Problem endpoints: mounts routes
- FastAPI application → Progress endpoints: mounts routes
- Company problem data → SQL database: uses ORM base
backend/app/models/problem.py