A modern, responsive React web application that integrates with the official Codeforces API to explore user profiles, contests, and problems. This project demonstrates proficiency in React fundamentals, API integration, state management, and modern UI/UX design.
๐ Live Demo: https://codeforces-explorer.vercel.app
๐ GitHub Repository: https://github.com/deepakvishwakarma24/codeforces-explorer
- Features
- Tech Stack
- Project Structure
- Installation
- Usage
- API Integration
- Components Overview
- Screenshots
- Future Enhancements
-
User Info Lookup ๐
- Search for any Codeforces user by handle
- Display username, rating, rank, and problems solved
- Color-coded ratings based on Codeforces ranking system
- Shows additional info like country, city, organization, and contribution
-
Contest Information ๐
- View upcoming and past contests
- Display contest name, start time, and duration
- Tab-based navigation between upcoming and past contests
- Real-time countdown for upcoming contests
-
Problem Explorer ๐ป
- Browse thousands of Codeforces problems
- Search problems by name
- Filter by tags (e.g., dp, graphs, math)
- Filter by difficulty rating
- Pagination for better performance
- Display problem tags, ratings, and solve counts
-
User Comparison โ๏ธ
- Compare two users side by side
- Visual highlighting of better stats
- Compare ratings, problems solved, and contributions
- Declare overall winner based on current rating
-
Rating History Chart ๐
- Interactive line chart showing rating progression
- Display rating changes over contests
- Statistics: current rating, max rating, min rating, total change
- Hover tooltips with detailed contest information
- Built with Recharts for smooth animations
- Frontend Framework: React 18.3.1 (Functional Components with Hooks)
- Build Tool: Vite 5.1.4
- Styling: TailwindCSS 3.4.1
- Animations: Framer Motion 11.0.5
- Charts: Recharts 2.12.0
- HTTP Client: Axios 1.6.7
- Icons: Lucide React 0.344.0
codeforces-explorer/
โโโ public/
โโโ src/
โ โโโ components/
โ โ โโโ UserInfo.jsx # User lookup component
โ โ โโโ ContestInfo.jsx # Contest listing component
โ โ โโโ ProblemExplorer.jsx # Problem browser component
โ โ โโโ UserComparison.jsx # User comparison (bonus)
โ โ โโโ RatingChart.jsx # Rating chart (bonus)
โ โโโ config/
โ โ โโโ api.js # API configuration and constants
โ โโโ services/
โ โ โโโ codeforcesService.js # API service functions
โ โโโ App.jsx # Main app component
โ โโโ main.jsx # Entry point
โ โโโ index.css # Global styles
โโโ .env # Environment variables
โโโ .env.example # Example environment file
โโโ index.html # HTML template
โโโ package.json # Dependencies
โโโ tailwind.config.js # Tailwind configuration
โโโ vite.config.js # Vite configuration
โโโ README.md # This file
- Node.js (v16 or higher)
- npm or yarn
- Clone the repository
git clone https://github.com/deepakvishwakarma24/codeforces-explorer.git
cd codeforces-explorer-
Install dependencies
npm install
-
Set up environment variables
- The
.envfile is already configured with the Codeforces API base URL - You can modify it if needed:
VITE_CODEFORCES_API_BASE_URL=https://codeforces.com/api - The
-
Start the development server
npm run dev
-
Open in browser
- The app will automatically open at
http://localhost:3000
- The app will automatically open at
Access the deployed application here:
- Enter a Codeforces handle (e.g.,
tourist,Benq,Errichto) - Click "Search" or press Enter
- View user statistics including rating, rank, and problems solved
- Switch between "Upcoming" and "Past" tabs
- View contest details including name, start time, and duration
- Click "Refresh" to update the contest list
- Use the search bar to find problems by name
- Filter by tags (e.g., "dp", "graphs", "greedy")
- Filter by difficulty rating (800-3000)
- Navigate through pages using pagination controls
- Enter two Codeforces handles
- Click "Compare Users"
- View side-by-side comparison with highlighted better stats
- Enter a Codeforces handle
- Click "Show Chart"
- View interactive rating progression chart
- Hover over data points for detailed information
This project uses the official Codeforces API (https://codeforces.com/apiHelp).
-
user.info - Fetch user information
GET https://codeforces.com/api/user.info?handles={handle} -
user.rating - Fetch user rating history
GET https://codeforces.com/api/user.rating?handle={handle} -
user.status - Fetch user submissions
GET https://codeforces.com/api/user.status?handle={handle}&from=1&count=10000 -
contest.list - Fetch all contests
GET https://codeforces.com/api/contest.list -
problemset.problems - Fetch all problems
GET https://codeforces.com/api/problemset.problems
- Configuration:
src/config/api.js- Contains API base URL and endpoint definitions - Service Layer:
src/services/codeforcesService.js- Handles all API calls with error handling - Components: Use service functions to fetch data and manage state with React hooks
- Purpose: User lookup functionality
- State Management:
useStatefor handle input, user data, loading, and errors - API Calls: Fetches user info and submission count in parallel
- Features: Real-time search, error handling, color-coded ratings
- Purpose: Display upcoming and past contests
- State Management: Tab state, contest data, loading state
- API Calls: Fetches and separates contests by phase
- Features: Tab navigation, countdown timers, refresh functionality
- Purpose: Browse and filter problems
- State Management: Problems list, filters, pagination
- API Calls: Fetches all problems once, filters client-side
- Features: Search, tag filter, rating filter, pagination
- Purpose: Compare two users
- State Management: Two user handles and their data
- API Calls: Parallel fetching of both users' data
- Features: Side-by-side comparison, visual highlighting, winner declaration
- Purpose: Visualize rating history
- State Management: Rating data, chart configuration
- API Calls: Fetches user rating history
- Features: Interactive chart, statistics, custom tooltips
Modern landing page with project description and tech stack badges.
Search for users and view detailed statistics with color-coded ratings.
Browse upcoming and past contests with countdown timers.
Filter and search through thousands of problems with pagination.
Compare two users side by side with visual highlighting.
Interactive chart showing rating progression over time.
- Color Scheme: Dark theme with Codeforces blue accent (#1E88E5)
- Typography: System fonts for optimal performance
- Animations: Smooth transitions using Framer Motion
- Responsiveness: Mobile-first design with TailwindCSS
- Accessibility: Proper focus states and semantic HTML
- Performance: Lazy loading, pagination, and optimized API calls
- Add user authentication to save favorite users
- Implement problem recommendations based on user rating
- Add virtual contest feature
- Include problem difficulty predictor
- Add dark/light theme toggle
- Implement progressive web app (PWA) features
- Add social sharing functionality
- Include problem submission tracker
All components include detailed comments explaining:
- Component purpose and functionality
- State management logic
- API integration approach
- Key functions and their parameters
- UI/UX decisions
This is a personal interview project, but suggestions are welcome!
This project is created for educational purposes as part of the DJS CODESTARS 2026 interview process.
Hosted on Vercel
Auto-deploy enabled via GitHub integration
๐ Live link: https://codeforces-explorer.vercel.app
Deepak Vishwakarma
GitHub: https://github.com/deepakvishwakarma24
- Codeforces for providing the public API
- React for the amazing framework
- TailwindCSS for utility-first styling
- Framer Motion for smooth animations
- Recharts for beautiful charts
Happy Coding! ๐
โญ If you found this useful
Give it a โญ on GitHub and share!