Train your weaknesses. Forge your rating.
A personalized Codeforces training tool that analyzes your submission history, identifies weak topics, and recommends problems to systematically improve your rating.
Competitive programmers on Codeforces practice randomly without insight into their weak areas, wasting time on topics they're already strong at. There's no single tool that combines:
- Weakness detection from submission history
- Curated problem recommendations
- Solve logging with a live weakness model
- Quick access to CP learning resources
CPForge solves this by pulling your CF submission history, computing a weakness score per tag, and building a personalized practice plan.
| Feature | Description |
|---|---|
| 📊 Weakness Dashboard | Tag-wise weakness scores from your CF submissions |
| 🎯 Problem Recommendations | Filtered by your weakest tags + difficulty range |
| 📝 Solve Logging | Auto-fetch problem tags, log time + result |
| 🧠 Live Weakness Model | Updates tag scores every time you log a solve |
| 📋 Practice Sheet | Save problems with To Do / Attempted / Solved tracking |
| 📚 Resources Panel | Quick access to CSES, USACO Guide, CP-Algorithms, and more |
| 🔐 Firebase Auth | Email/password login with persistent data |
- React 18 (functional components, hooks)
- React Router v6 (routing + lazy loading)
- Context API (global state management)
- Firebase (Authentication + Firestore)
- Codeforces Public API (submission history + problem metadata)
- Recharts (data visualization)
- Vite (build tool)
git clone <your-repo-url>
cd cpforge
npm install- Go to Firebase Console
- Create a new project
- Add a Web App → copy the
firebaseConfigobject - Enable Authentication → Email/Password
- Enable Firestore Database (start in test mode)
Edit src/services/firebase.js and replace the placeholder values:
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_PROJECT.firebaseapp.com",
projectId: "YOUR_PROJECT_ID",
// ...
}npm run devnpm run build
# Then deploy the dist/ folder to Vercel or Netlifysrc/
├── components/
│ ├── Sidebar.jsx # Navigation sidebar
│ ├── Onboarding.jsx # CF handle entry overlay
│ ├── ProblemCard.jsx # Reusable problem card
│ ├── WeakBar.jsx # Tag weakness bar
│ └── ProtectedRoute.jsx # Auth guard
├── pages/
│ ├── Dashboard.jsx # Main dashboard
│ ├── Weaknesses.jsx # Full tag analysis
│ ├── Recommendations.jsx # Problem recommendations
│ ├── Sheet.jsx # Practice sheet
│ ├── LogSolve.jsx # Log a solve
│ ├── History.jsx # Solve history
│ ├── Resources.jsx # CP resources
│ └── Login.jsx # Auth page
├── context/
│ ├── AppContext.jsx # Global app state + weakness engine
│ └── AuthContext.jsx # Firebase auth state
├── hooks/
│ └── useCFData.js # CF API fetching hook
├── services/
│ ├── firebase.js # Firebase init
│ ├── cfApi.js # Codeforces API wrapper
│ ├── firestoreService.js # Firestore CRUD
│ └── data.js # Static problem + resource data
├── App.jsx # Root with routing
├── main.jsx # Entry point
└── index.css # Global styles
weakness_score(tag) =
(wrong_submissions × 2)
- (solved_count × 1.5)
+ time_penalty_from_logs
where:
time_penalty = max(0, (solve_time_mins - 45) / 30)
solved_clean log → score - 3
solved_hint log → score - 1
partially log → score + 1
Higher score = weaker topic = prioritized in recommendations.
MIT — build something great.