How atharv170705/cp-contest-generator works
This is a Codeforces contest-practice and performance-reporting application. Users sign in with Google, set a Codeforces handle, generate or inspect contests, finish contests, and view generated reports and history. The graph includes the documented route-level contest capabilities and sampled authentication/profile behavior. The contest controller, frontend page internals, and persistence implementations were not sampled, so their internal calls and UI-to-API wiring are not asserted.
Main entry points: main.jsx React router · app.js Express app · cfRoutes.js Contest routes · auth.routes.js Auth routes
Components 22
Web application
- React router
frontend/src/main.jsx - Home
frontend/src/pages/Home.jsx - Profile setup
frontend/src/pages/Setup.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Contest view
frontend/src/pages/ContestPage.jsx - Contest history
frontend/src/pages/ContestHistoryPage.jsx - Report history
frontend/src/pages/ReportHistoryPage.jsx - Contest report
frontend/src/pages/ContestReportPage.jsx
API and workflows
- Express app
backend/src/app.js - Contest routes
backend/src/routes/cfRoutes.js - Contest workflows
backend/src/controllers/contest.js
Identity and profiles
- Auth routes
backend/src/routes/auth.routes.js - Google auth
backend/src/controllers/auth.controller.js - JWT middleware
backend/src/middleware/auth.middleware.js - Profile route
backend/src/routes/user.routes.js - Profile setup
backend/src/controllers/user.controller.js
Persistence
- User model
backend/src/model/user.model.js - Contest model
backend/src/model/contest.model.js - Contest problems model
backend/src/model/contestProblems.model.js
Other components
- User
- Google OAuth
- Codeforces API
Connections 21
- User → React router: uses
- React router → Home: routes
- React router → Profile setup: routes
- React router → Dashboard: routes
- React router → Contest view: routes
- React router → Contest history: routes
- React router → Report history: routes
- React router → Contest report: routes
- Express app → Contest routes: mounts
- Express app → Auth routes: mounts
- Express app → Profile route: mounts
- Contest routes → Contest workflows: dispatches
- Auth routes → Google auth: dispatches
- Profile route → Profile setup: dispatches
- Auth routes → JWT middleware: guards
- Contest routes → JWT middleware: guards
- Profile route → JWT middleware: guards
- Google auth → Google OAuth: exchanges tokens
- Google auth → User model: reads/writes user
- Profile setup → User model: updates handle
- Profile setup → Codeforces API: fetches rating