A modern, full-stack competitive coding platform with AI-powered tutoring, real-time code execution, mock interviews, and an ML-driven dashboard. Built with React, Vite, Node.js, and MongoDB โ featuring a LeetCode-style problem solver, global leaderboard, Razorpay payments, and Firebase OAuth.
![]() Home Page |
![]() Sign Up |
![]() Email Verification |
![]() Email Verification |
![]() Problem List |
![]() Solve Page |
![]() AI suggestion |
![]() Profile Page |
![]() Help Page |
๐ Live Demo
- Judge0-powered code runner supporting C++, Python, Java, C, and JavaScript
- Run against sample test cases or submit against all hidden test cases
- Live verdict: Accepted, Wrong Answer, Runtime Error, TLE, Compilation Error
- Groq LLaMA 3.3 70B-powered AI tutor embedded in the problem solver
- Gives hints, approach strategies, and complexity analysis without spoiling solutions
- AI Code Review for Pro users โ feedback on submitted solutions
- 160+ handcrafted DSA problems with difficulty ratings (Easy / Medium / Hard)
- Company tags (Google, Amazon, Microsoft, Facebook, Apple, etc.)
- Premium problem lock with Pro plan unlock
- "Pick Random" for spontaneous practice
- Weakness Radar โ SVG radar chart showing accuracy per DSA topic
- Interview Readiness Score โ per-company readiness based on solved problems
- Smart Recommendations โ ML picks the best next problems based on weak tags
- 30-Day Study Plan โ personalised milestones with progress bars
- Submission Heatmap โ GitHub-style activity calendar
- Choose target company (Google, Amazon, Microsoft, etc.) and duration (45/90/120 min)
- 3 problems picked (1 Easy, 1 Medium, 1 Hard) from company-tagged pool
- Countdown timer with urgency alerts
- Scored result on completion
- Global leaderboard ranked by rating points
- Rating titles from Beginner โ Legendary Coder
- Streak tracking, coin system, and podium display for top 3
- Monthly (โน10) and yearly (โน50) Pro plans
- Webhook-based payment verification
- Transparent fee breakdown (gateway + GST)
- Email/password with 6-digit OTP verification
- Google & GitHub OAuth via Firebase
- JWT access tokens (15 min) + HTTP-only refresh tokens (1 year)
- Forgot password with OTP-based reset flow
- Automatic cleanup of unverified accounts after 24 hours
- Fully responsive โ mobile, tablet, desktop
- Dark theme with CSS variable design token system
- Resizable split-panel problem solver
- Page transition animations and skeleton loaders
- Offline detection banner
| Technology | Purpose | Version |
|---|---|---|
| React | UI Framework | 18+ |
| Vite | Build Tool | 5+ |
| React Router DOM | Client-side Routing | 6+ |
| TanStack React Query | Data Fetching & Caching | 5+ |
| Axios | HTTP Client | 1+ |
| Firebase | Google & GitHub OAuth | 10+ |
| React Icons | Icon Library | 5+ |
| React Helmet Async | SEO & Meta Tags | 3+ |
| CSS Modules | Component-scoped Styling | โ |
| Technology | Purpose | Version |
|---|---|---|
| Node.js | Runtime Environment | 18+ |
| Express.js | Web Framework | 4+ |
| MongoDB + Mongoose | Database & ODM | 8+ |
| bcryptjs | Password Hashing | 2+ |
| jsonwebtoken | JWT Auth | 9+ |
| Nodemailer | Transactional Email (dev) | 6+ |
| Resend HTTP API | Transactional Email (prod) | โ |
| Razorpay | Payment Processing | 2+ |
| Multer + Sharp | File Upload & Image Processing | โ |
| node-fetch | Groq AI API calls | 3+ |
| dotenv | Environment Variables | 16+ |
| cors | Cross-Origin Resource Sharing | 2+ |
| cookie-parser | HTTP Cookie Parsing | 1+ |
| express-rate-limit | API Rate Limiting | 8+ |
| Technology | Purpose | Version |
|---|---|---|
| React | UI Framework | 18+ |
| Vite | Build Tool | 5+ |
| Tool | Purpose |
|---|---|
| Vercel | Frontend Deployment |
| Render | Backend Deployment |
| Judge0 | Code Execution Engine |
| Nodemon | Dev Server Auto-reload |
| Git | Version Control |
- Node.js
>= 18.0.0 - npm
>= 8.0.0 - MongoDB URI (Atlas or local)
- Groq API key (get one free at console.groq.com)
- Firebase project with Google & GitHub auth enabled
- Razorpay account (for payment features)
-
Clone the repository
git clone https://github.com/ravibhushan10/CodeforgeAI.git cd codeforge -
Install Backend Dependencies
cd backend npm install -
Install Frontend Dependencies
cd frontend npm install -
Install Admin Dependencies
cd admin npm install -
Backend Environment Variables โ create
.envinbackend/PORT=5000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_super_secret_jwt_key REFRESH_TOKEN_SECRET=any_random_long_string GROQ_API_KEY=your_groq_api_key RAZORPAY_KEY_ID=rzp_test_your_key_id RAZORPAY_KEY_SECRET=your_razorpay_secret RAZORPAY_WEBHOOK_SECRET=your_webhook_secret FRONTEND_URL=http://localhost:5173 ADMIN_URL=http://localhost:3001 GMAIL_USER=yourname@gmail.com GMAIL_PASS=xxxx_xxxx_xxxx_xxxx NODE_ENV=development
-
Frontend Environment Variables โ create
.envinfrontend/VITE_API_URL=http://localhost:5000 VITE_FIREBASE_API_KEY=your_firebase_api_key VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com VITE_FIREBASE_PROJECT_ID=your_project_id VITE_FIREBASE_APP_ID=your_app_id VITE_RAZORPAY_KEY_ID=rzp_test_your_key_id
-
Start the Backend
cd backend npm run dev # Server runs on http://localhost:5000
-
Start the Frontend (in a new terminal)
cd frontend npm run dev # Client runs on http://localhost:5173
-
Start the Admin Panel (optional, in a new terminal)
cd admin npm run dev # Admin runs on http://localhost:5174
- Home โ Landing page with hero section and features overview
- Problems โ Browse all DSA problems with filters by difficulty, tag, and company
- Problem Solver โ Split-panel editor with description, AI Tutor, and submission tabs
- Dashboard โ ML insights, submission heatmap, and Pro features
- Leaderboard โ Global ranking by rating points
- Profile โ Personal stats, badge collection, and submission history
- Navigate to Problems and click any problem
- Select your preferred language (C++, Python, Java, C, JavaScript)
- Write your solution in the code editor
- Click โถ Run to test against sample cases
- Click Submit to judge against all hidden test cases
- Use the AI Tutor tab for hints without spoilers
- Navigate to
http://localhost:5174 - Sign in with an admin account
- Manage problems (add, edit, delete, bulk upload JSON)
- Toggle premium status per problem
- View and manage registered users
- Check platform statistics
codeforge/
โโโ frontend/
โ โโโ src/
โ โ โโโ components/ # Reusable UI components
โ โ โ โโโ Navbar.jsx
โ โ โ โโโ AuthModals.jsx # Login + Register with OTP flow
โ โ โ โโโ PaymentModal.jsx
โ โ โ โโโ MockInterview.jsx
โ โ โ โโโ WeaknessRadar.jsx
โ โ โ โโโ ReadinessScore.jsx
โ โ โโโ context/
โ โ โ โโโ AppContext.jsx # Global auth + toast state
โ โ โโโ hooks/
โ โ โ โโโ useAuth.js # Firebase OAuth hook
โ โ โ โโโ useResizable.js # Drag-to-resize panels
โ โ โโโ pages/
โ โ โ โโโ Home.jsx
โ โ โ โโโ Problems.jsx
โ โ โ โโโ Solve.jsx # Split-panel problem solver
โ โ โ โโโ Dashboard.jsx # ML insights
โ โ โ โโโ Leaderboard.jsx
โ โ โ โโโ Profile.jsx
โ โ โ โโโ Help.jsx
โ โ โโโ styles/
โ โ โโโ globals.css # Design token system
โ โโโ vite.config.js
โ
โโโ backend/
โ โโโ src/
โ โโโ models/
โ โ โโโ User.js
โ โ โโโ Problem.js
โ โ โโโ Submission.js
โ โโโ routes/
โ โ โโโ users.js # Auth, profile, leaderboard
โ โ โโโ problems.js # CRUD + bulk import
โ โ โโโ submissions.js # Run + Submit + Judge0 integration
โ โ โโโ ai.js # Groq AI hint + code review
โ โ โโโ payments.js # Razorpay order + verify + webhook
โ โโโ middleware/
โ โ โโโ auth.js # JWT + admin middleware
โ โโโ utils/
โ โ โโโ sendEmail.js # Resend (prod) / Gmail (dev)
โ โโโ server.js
โ
โโโ admin/
โโโ src/
โโโ pages/
โ โโโ LoginPage.jsx
โ โโโ ProblemsPage.jsx
โ โโโ UsersPage.jsx
โ โโโ StatsPage.jsx
โโโ components/
โโโ ProblemModal.jsx
โโโ DeleteByNumModal.jsx
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/users/register |
Register with email/password |
| POST | /api/users/verify-otp-register |
Verify registration OTP |
| POST | /api/users/login |
Login with email/password |
| POST | /api/users/logout |
Invalidate refresh token |
| POST | /api/users/refresh |
Refresh access token |
| POST | /api/users/oauth |
Google / GitHub OAuth login |
| POST | /api/users/forgot-password |
Send password reset OTP |
| POST | /api/users/verify-otp |
Verify reset OTP |
| POST | /api/users/reset-password |
Set new password |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/problems |
List problems (with filters) |
| GET | /api/problems/:slug |
Get single problem |
| POST | /api/problems |
Create problem (admin) |
| PUT | /api/problems/:id |
Update problem (admin) |
| DELETE | /api/problems/:id |
Delete & renumber (admin) |
| POST | /api/problems/bulk |
Bulk import JSON (admin) |
| PATCH | /api/problems/:id/toggle-premium |
Toggle premium flag (admin) |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/submissions/run |
Run code against sample test cases |
| POST | /api/submissions |
Submit for full judgement |
| GET | /api/submissions/me |
Get user's submission history |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/ai/hint |
Get AI hint / tutor response |
| POST | /api/ai/analyze |
AI code review (Pro) |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/payments/order |
Create Razorpay order |
| POST | /api/payments/verify |
Verify payment signature |
| POST | /api/payments/webhook |
Razorpay webhook handler |
| GET | /api/payments/status |
Get user's subscription status |
-
Fork the Repository
- Click the Fork button at the top right of this repository
-
Clone Your Fork
git clone https://github.com/ravibhushan10/CodeforgeAI.git cd codeforge -
Create a Branch
git checkout -b feature/AmazingFeature
-
Make Your Changes
- Write clean, readable code
- Follow the existing code style
- Test your changes thoroughly
-
Commit Your Changes
git add . git commit -m 'Add some AmazingFeature'
-
Push to Your Fork
git push origin feature/AmazingFeature
-
Open a Pull Request
- Go to your forked repository on GitHub
- Click "Compare & pull request"
- Fill in the PR form:
- Title: Brief summary (e.g., "Add dark mode animation")
- Description: What changed, why, screenshots if UI change
- Related issues: e.g., "Fixes #12"
- Click "Create pull request"
- Contests with real-time leaderboard updates
- Discussion forum per problem
- Editorial / official solution after solve
- Code execution via self-hosted Judge0 instance
- Multi-language i18n support
- PWA with offline support
- Email digest of recommended problems
Ravi Bhushan
- ๐ผ LinkedIn: https://www.linkedin.com/in/ravibhushan-kumar-55b312344
- ๐ Portfolio: https://ravibhushan-portfolio.vercel.app
- ๐ GitHub: @ravibhushan10
- ๐ง Email: ravibhushankumar87tp@gmail.com
Made with โค๏ธ by Ravi Bhushan








