Skip to content

PranshuPujara/ForgeSolve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

31 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ForgeSolve

A tool to discover, filter, and practice competitive programming problems with real-time Codeforces tracking.


πŸš€ Live Demo

✨ Try ForgeSolve Now


✨ Key Features

πŸ”Ž Problem Discovery & Filtering

  • Multi-Platform: Codeforces, LeetCode, GeeksforGeeks
  • Smart Filters: Rating range, difficulty levels, tags
  • Problem Pool: 10K+ problems across platforms
  • Smart Mode: Auto-adjust difficulty based on last solved problem rating
  • Tag Search: Filter by algorithm/data structure tags

πŸ‘₯ Collaborative Features (Codeforces Only)

  • Friend Filtering: Filter problems by what friends have solved/attempted
    • Friends' Solved: Only show problems your friends completed
    • Friends' Unsolved: Target problems your friends tried but couldn't solve
    • Any Problem: No friend-based restrictions
  • Add up to 10 friends: Validate Codeforces handles and track their progress
  • Per-Problem Stats: See how many friends solved each problem

⏱️ Submission Tracking

  • Real-Time Detection: Automatically detect accepted Codeforces submissions
  • Built-In Timer: Auto-starts when problem is picked, stops on AC verdict
  • Streak System: Track consecutive days of solved problems
  • History Management: Keep record of all picked problems with timestamps

πŸ“ˆ Profile Stats & Analytics

  • Rich Stats Dashboard: Solved/Attempted counts, AC rate, streaks, rating distribution, top tags, monthly activity
  • Rank & Rating: Color-coded badges with current/max rating
  • Profile Sync: One-click refresh to update stats from Codeforces

βš™οΈ Personalization

  • Exclude Solved: Hide completed problems
  • Review Mode: Practice only solved problems
  • Local Storage: All preferences, history, and friends persisted

🎯 Usage Guide

Getting Started

  1. Select a platform (Codeforces, LeetCode, or GeeksforGeeks)
  2. Set difficulty range and add tags (optional)
  3. Click "Pick Problem" to get a random match

Friend Features (Codeforces)

  1. Open the "Friends" panel and enter Codeforces handles
  2. Choose filter mode: "Any Problem", "Friends' Unsolved", or "Friends' Solved"
  3. Get problems based on your friends' activity

Tracking Progress

  • View history in the History Panel
  • Enable "Exclude Solved" to hide completed problems
  • Check your Streak Badge for consecutive days solved

πŸ’» Tech Stack

Frontend

  • React 18 (Vite) β€” Fast build tooling & HMR
  • Tailwind CSS 4 β€” Utility-first styling
  • Lucide React β€” Lightweight SVG icons
  • Axios β€” Promise-based HTTP client

Backend

  • Node.js + Express 4 β€” Fast, lightweight REST API
  • Codeforces API β€” Problem data, user submissions, ratings
  • LeetCode & GeeksforGeeks APIs β€” Problem data
  • Node Cache β€” In-memory caching (5-10 min TTL)
  • Express Rate Limit β€” API protection (30 req/min)
  • Axios β€” API calls with timeouts

Data & Storage

  • Problem Dataset: 10K+ problems across 3 platforms
  • Caching: Problem list (10 min), user stats (10 min)
  • Client Storage: localStorage for history, filters, friends
  • No Database: Everything computed on-the-fly from APIs

πŸ“‹ Roadmap

  • User authentication and cloud storage for cross-device sync
  • Problem recommendation engine based on solving history and weak tags
  • LeetCode and GeeksforGeeks real-time submission tracking (currently Codeforces only)
  • Timed contest mode with leaderboards
  • Mobile application (iOS/Android)

πŸ—οΈ Architecture

System Design

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 β”‚         β”‚                  β”‚         β”‚                 β”‚
β”‚  Frontend       │◄────────►│  Backend API     │◄────────►│ Codeforces API  β”‚
β”‚  (React/Vite)   β”‚ HTTPS    β”‚  (Express)       β”‚ HTTP    β”‚  + LeetCode     β”‚
β”‚                 β”‚         β”‚                  β”‚         β”‚  + GeeksforGeeksβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  (Vercel)                     (Render)

Design Principles

  • Stateless Backend: Express API runs on Render with auto-scaling β€” no server sessions
  • Client-Side State: All user data stored in localStorage for offline access
  • Multi-Criteria Filtering: O(n) filter engine (rating, tags, history, friend status)
  • Graceful Degradation: Promise.allSettled() handles partial failures in friend data collection
  • Rate Limiting: 30 requests per minute per IP to prevent abuse
  • Caching Strategy: 10-min TTL on problem lists and user stats; fresh friend data per request
  • Parallel Processing: Concurrent API calls for user submissions and friend data
  • Timeout Protection: 8-10 second timeouts on external API calls

Scaling Options

  • Database Addition: Replace in-memory cache with Redis for distributed caching
  • Friend Batch Processing: Queue long operations (10+ friends) asynchronously
  • Problem Pre-computation: Periodically cache and pre-filter problem subsets
  • CDN: Serve problem data from edge locations
  • Horizontal Scaling: Deploy multiple backend instances behind load balancer

πŸš€ Deployment

πŸ“„ License

Apache-2.0. See LICENSE file for details.

Note: The ForgeSolve name and logo are not available for reuse without explicit permission.

βš™οΈ Setup Instructions (Local Development)

Prerequisites

  • Node.js 16+ and npm

Clone & Install

git clone https://github.com/PranshuPujara/SolveForge.git
cd SolveForge

cd backend && npm install
cd ../frontend && npm install

Run Locally

# Terminal 1 - Backend
cd backend && npm run dev

# Terminal 2 - Frontend
cd frontend && npm run dev

Visit http://localhost:5173

πŸ‘€ Author

Pranshu Pujara

About

SolveForge - It helps you discover and practice coding problems with focused filtering, progress tracking, and seamless integration with platforms like Codeforces, LeetCode and GFG

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors