How vikas-dev2002/codewithclassmate works
CodeWithClassMate is a coding-learning and campus community platform: users authenticate, explore and solve coding problems, and can also participate in contests, events, discussions, chats, and games. The frontend routes users to feature pages; the Express backend exposes feature APIs, persists domain data, and supports real-time play. The source index and excerpts establish several wiring relationships, but many feature implementations were not sampled, so uncertain links are omitted rather than inferred.
Main entry points: index.js API server · App.tsx Route shell · auth.js Auth routes · rapidfire.js Rapid Fire sockets
Components 30
Web application
- Route shell
CodeWithClassMate/src/App.tsx
Identity and profiles
- Auth state
CodeWithClassMate/src/contexts/AuthContext.tsx - OAuth callback
CodeWithClassMate/src/pages/OAuthHandler.tsx - Auth routes
CodeWithClassMate/backend/routes/auth.js - Token middleware
CodeWithClassMate/backend/middleware/auth.js - User records
CodeWithClassMate/backend/models/User.js - Profile page
CodeWithClassMate/src/pages/Profile.tsx
Coding and learning
- Problem browser
CodeWithClassMate/src/pages/Problems.tsx - Problem workspace
CodeWithClassMate/src/pages/ProblemDetail.tsx - Contest problems
CodeWithClassMate/src/pages/ContestProblems.tsx - Contest submission
CodeWithClassMate/src/pages/ContestProblemDetail.tsx - Problem routes
CodeWithClassMate/backend/routes/problems.js - Code execution
CodeWithClassMate/backend/services/judge0Service.js - Daily challenge
CodeWithClassMate/backend/services/POTDService.js
Campus community
- Event detail
CodeWithClassMate/src/pages/EventDetail.tsx - Event administration
CodeWithClassMate/src/pages/Admin/EventAdminDashboard.tsx - Chat page
CodeWithClassMate/src/pages/Chat.tsx - Chat routes
CodeWithClassMate/backend/routes/chat.js - Chat sockets
CodeWithClassMate/backend/socket/chat.js
Games and contests
- Contest hub
CodeWithClassMate/src/pages/Contest.tsx - Contest routes
CodeWithClassMate/backend/routes/contest.js - Game page
CodeWithClassMate/src/pages/Game.tsx - Rapid Fire page
CodeWithClassMate/src/pages/RapidFire.tsx - Rapid Fire sockets
CodeWithClassMate/backend/socket/rapidfire.js - Rapid Fire games
CodeWithClassMate/backend/models/RapidFireGame.js - Quiz questions
CodeWithClassMate/backend/models/MCQQuestion.js - Rewards page
CodeWithClassMate/src/pages/Redeem.tsx
Other components
- Platform user
- API server
CodeWithClassMate/backend/index.js - Judge0 service
Connections 35
- Platform user → Route shell: opens
CodeWithClassMate/src/App.tsx - Route shell → Auth state: provides auth
CodeWithClassMate/src/App.tsx - Route shell → Problem browser: routes to
CodeWithClassMate/src/App.tsx - Route shell → Problem workspace: routes to
CodeWithClassMate/src/App.tsx - Route shell → Chat page: routes to
CodeWithClassMate/src/App.tsx - Route shell → Game page: routes to
CodeWithClassMate/src/App.tsx - Route shell → Contest hub: routes to
CodeWithClassMate/src/App.tsx - Route shell → Event administration: routes to
CodeWithClassMate/src/App.tsx - Platform user → Auth state: signs in
CodeWithClassMate/src/contexts/AuthContext.tsx - Auth state → Auth routes: requests auth
CodeWithClassMate/src/contexts/AuthContext.tsx - OAuth callback → Auth routes: fetches user
CodeWithClassMate/src/pages/OAuthHandler.tsx - API server → Auth routes: mounts routes
CodeWithClassMate/backend/index.js - API server → Problem routes: mounts routes
CodeWithClassMate/backend/index.js - API server → Contest routes: mounts routes
CodeWithClassMate/backend/index.js - API server → Chat routes: mounts routes
CodeWithClassMate/backend/index.js - Auth routes → Token middleware: authenticates
CodeWithClassMate/backend/routes/auth.js - Token middleware → User records: loads user
CodeWithClassMate/backend/middleware/auth.js - Auth routes → User records: reads and saves
CodeWithClassMate/backend/routes/auth.js - Problem browser → Problem routes: requests problems
- Problem workspace → Problem routes: submits code
- Contest problems → Contest routes: loads contest
- Contest submission → Contest routes: submits solution
- Problem routes → Code execution: runs submissions
CodeWithClassMate/backend/routes/problems.js - Code execution → Judge0 service: sends requests
- API server → Daily challenge: mounts route
- Event detail → API server: loads event data
- Event administration → API server: manages events
- Chat page → Chat routes: uses chat API
- Chat page → Chat sockets: joins live chat
- Contest hub → Contest routes: loads contests
- Rapid Fire page → Rapid Fire sockets: plays live game
- API server → Rapid Fire sockets: registers sockets
CodeWithClassMate/backend/index.js - Rapid Fire sockets → Rapid Fire games: reads and updates
CodeWithClassMate/backend/socket/rapidfire.js - Rapid Fire sockets → Quiz questions: loads questions
CodeWithClassMate/backend/socket/rapidfire.js - Rewards page → API server: redeems rewards