A full-featured coding contest platform with admin panel and participant interface.
- ✅ Create and manage coding contests
- ✅ Set start/end times
- ✅ List upcoming, ongoing, and past contests
- ✅ Contest status indicators
- ✅ Add coding questions to contests
- ✅ Complete question details:
- Title and problem description
- Input/output format specifications
- Constraints
- Sample input/output (visible to users)
- Points assignment (customizable)
- ✅ Question editing and deletion
- ✅ Preview questions from participant view
- ✅ Upload multiple test cases for evaluation
- ✅ Mark test cases as hidden or public
- ✅ Bulk test case management
- ✅ Sample test cases (shown to participants)
- ✅ Hidden test cases (for evaluation only)
- ✅ View submissions
- ✅ Plagiarism checker
- ✅ Leaderboard management
- ✅ List of upcoming, ongoing, and past contests
- ✅ Real-time contest status indicators
- ✅ Countdown timers for ongoing contests
- ✅ View all coding questions in contest
- ✅ Click on question to open IDE panel
- ✅ Points display for each question
- ✅ Monaco Editor with syntax highlighting
- ✅ Multiple language support:
- C++ (GCC 9.2.0)
- Java (OpenJDK 13.0.1)
- Python 3 (3.8.1)
- C (GCC 9.2.0)
- ✅ Code templates for each language
- ✅ Custom input testing area
- ✅ "Run Code" button - Test against sample input/output
- ✅ "Submit Code" button - Evaluate against all test cases
- ✅ Real-time execution feedback
- ✅ Custom input testing
- ✅ Show which test cases passed/failed
- ✅ Detailed submission results:
- Score out of total points
- Number of test cases passed
- Individual test case results
- Execution time and memory usage
- ✅ Save submission status, time, and score
- ✅ Real-time leaderboard updates
- Frontend: Next.js 15, React, TypeScript, Tailwind CSS
- Backend: Next.js API Routes, Prisma ORM
- Database: SQLite (easily changeable to PostgreSQL/MySQL)
- Code Execution: Judge0 API
- Editor: Monaco Editor
- Authentication: Simplified (no login required)
- Node.js 18+
- npm or yarn
-
Clone the repository
git clone <repository-url> cd ide-web
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env # Edit .env with your Judge0 API key -
Set up the database
npx prisma generate npx prisma db push npx prisma db seed
-
Start the development server
npm run dev
-
Open in browser
- Main app: http://localhost:3000
- Admin panel: http://localhost:3000/admin
/admin/contests- Manage contests/admin/contests/new- Create new contest/admin/contests/[id]- Manage specific contest/admin/contests/[id]/questions/new- Add question to contest/admin/contests/[id]/questions/[qid]/edit- Edit question & test cases/admin/submissions- View all submissions/admin/plagiarism- Plagiarism checker
/contests- Browse contests/contests/[id]- View contest details/contests/[id]/problems/[qid]- Solve specific problem/contests/[id]/leaderboard- Contest leaderboard
-
Create a Contest
- Go to
/admin/contests - Click "Create New Contest"
- Set title, start time, end time
- Go to
-
Add Questions
- Enter contest management page
- Click "Add Question"
- Fill in all question details:
- Title and description
- Input/output format
- Constraints
- Sample input/output
- Points (default: 100)
-
Add Test Cases
- In question creation/edit form
- Add multiple test cases
- Mark some as "hidden" (for evaluation)
- Mark others as "public" (shown to users)
- Sample input/output is always visible
-
Manage Contest
- Preview questions from user view
- Edit questions and test cases
- Monitor submissions and leaderboard
-
Browse Contests
- Visit
/contests - See upcoming, ongoing, and past contests
- Join active contests
- Visit
-
Solve Problems
- Click on a contest
- Choose a problem to solve
- Read problem description carefully
- Select programming language
- Write your solution
-
Test & Submit
- Use "Run" to test with custom input
- Test against sample cases
- Use "Submit" for final evaluation
- View detailed results
- Get API key from RapidAPI Judge0
- Add to
.env:RAPIDAPI_KEY=your_judge0_api_key
- Default: SQLite (file-based)
- For production: Update
DATABASE_URLin.envto PostgreSQL/MySQL
- Update
LANGUAGE_MAPin/app/api/submit/route.ts - Add language to
LANGUAGESarray in problem page - Add default code template in
DEFAULT_CODE
- Uses Tailwind CSS
- Customize colors in
tailwind.config.js - Component styles in individual
.tsxfiles
| Feature | Status | Description |
|---|---|---|
| Contest Management | ✅ | Full CRUD for contests |
| Question Management | ✅ | Rich question editor with test cases |
| Multi-language Support | ✅ | C++, Java, Python, C |
| Code Execution | ✅ | Real-time code testing |
| Hidden Test Cases | ✅ | Secure evaluation system |
| Leaderboard | ✅ | Real-time rankings |
| Submissions | ✅ | Complete submission tracking |
| Plagiarism Detection | ✅ | Built-in plagiarism checker |
| Monaco Editor | ✅ | Professional code editor |
| Responsive Design | ✅ | Works on all devices |
-
Submit button not working
- Check Judge0 API key in
.env - Verify network connectivity
- Check browser console for errors
- Check Judge0 API key in
-
Database issues
- Run
npx prisma generate - Run
npx prisma db push - Reset with
npx prisma db seed
- Run
-
Build errors
- Clear
.nextfolder - Run
npm installagain - Check TypeScript errors
- Clear
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details.
Your complete coding contest platform is ready to use! Perfect for:
- Educational institutions
- Coding competitions
- Interview processes
- Practice platforms
- Corporate coding challenges
Happy coding! 🚀