๐ฏ A comprehensive full-stack coding education platform featuring interactive DSA visualizations, real-time coding interviews, competitive programming contests, AI-powered assistance, and structured learning paths.
๐ Live Demo โข Features โข Tech Stack โข Installation โข Screenshots โข Contributing
- ๐ Features
- ๐ ๏ธ Tech Stack
- ๐ Installation
- ๐ Usage Guide
- ๐ API Documentation
- ๐๏ธ Database Structure
- ๐ธ Screenshots
โ ๏ธ Known Issues- ๐ฎ Future Improvements
- ๐ค Contributing
- ๐ License
- ๐จ Modern UI/UX: Beautiful blue/cyan/teal themed interface with dark/light mode support
- Interactive Problem Solving: 500+ coding problems with Easy, Medium, and Hard difficulty levels
- Live Code Execution: Support for Python, JavaScript, Java, and C++ with real-time testing and instant feedback
- AI-Powered Assistance: Integrated Google Gemini AI chatbot for coding help, explanations, and debugging
- User Authentication: Secure NextAuth.js with OAuth integration (Google & GitHub) and email/password login
- Premium Membership: Razorpay payment integration for premium features and exclusive content
- Array Algorithms: Bubble Sort, Quick Sort, Merge Sort, Heap Sort, Insertion Sort, Selection Sort, Binary Search, Linear Search
- Tree Data Structures: Binary Trees, BST, AVL Trees, Red-Black Trees, Heaps with step-by-step animations
- Graph Algorithms: DFS, BFS, Dijkstra, Floyd-Warshall, Kruskal, Prim's Algorithm
- Dynamic Programming: Fibonacci, Knapsack, Coin Change, LCS, Edit Distance
- Linked Lists: Singly, Doubly, Circular Linked Lists
- Stacks & Queues: Stack, Queue, Deque, Priority Queue
- Real-time Controls: Play/pause, step-through, speed adjustment, and animation customization
- Live Interview System: Real-time coding interviews with video/audio support
- AI Interview Bot: Automated technical interviews with instant feedback
- Peer-Graded Reviews: Community-driven code review system
- Performance Analytics: Detailed statistics and progress tracking
- Live Contests: Real-time competitive programming events
- Leaderboards: Dynamic ranking system with ELO ratings
- Team Battles: Collaborative coding challenges
- Contest Analytics: Performance metrics and insights
- Structured Study Plans: Curated learning paths for different skill levels
- Course Management: Interactive programming courses
- Progress Tracking: Comprehensive learning analytics
- Community Features: Discussion forums and knowledge sharing
- Framework: Next.js 15.5.0 (React 19)
- Styling: TailwindCSS 3.4.15 with custom blue/cyan/teal theme
- UI Components: Custom components with Radix UI primitives
- Animations: Framer Motion 12.23.12 with custom keyframe animations
- Code Editor: Monaco Editor, CodeMirror with syntax highlighting
- Charts: Chart.js 4.5.0, React Chart.js 2
- Icons: Lucide React 0.542.0
- State Management: React Context API with custom hooks
- Runtime: Node.js with Express.js
- Database: MongoDB 6.18.0 with Mongoose ODM
- Authentication: NextAuth.js with OAuth providers
- File Storage: Local filesystem with upload handling
- Real-time: Socket.io for live features
- Code Execution: Judge0 API integration
- Email Service: SendGrid for notifications
- Payment: Razorpay integration
- AI Services: Google Generative AI (Gemini)
- Video Calls: Jitsi Meet integration
- Containerization: Docker with multi-stage builds
- Version Control: Git with GitHub
- Environment: Development, staging, and production configs
- Process Management: PM2 for production
- Node.js (v18 or higher)
- MongoDB (v6.0 or higher)
- Git
- Docker (optional)
-
Clone the repository
git clone https://github.com/RajdeepKushwaha5/UPCODE.git cd UPCODE -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local
Configure the following in
.env.local:# Database MONGODB_URI=mongodb://localhost:27017/upcode # Authentication NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-secret-key-here # OAuth (Optional) GOOGLE_CLIENT_ID=your-google-client-id GOOGLE_CLIENT_SECRET=your-google-client-secret GITHUB_ID=your-github-client-id GITHUB_SECRET=your-github-secret # Email Service SENDGRID_API_KEY=your-sendgrid-api-key # Payment (Optional) RAZORPAY_KEY_ID=your-razorpay-key RAZORPAY_KEY_SECRET=your-razorpay-secret # AI Service GOOGLE_GENERATIVE_AI_API_KEY=your-gemini-api-key
-
Start MongoDB
# Using MongoDB service sudo systemctl start mongod # Or using Docker docker run -d -p 27017:27017 --name mongodb mongo:6.0
-
Run the development server
npm run dev
-
Access the application Open http://localhost:3000 in your browser
-
Using Docker Compose
git clone https://github.com/RajdeepKushwaha5/UPCODE.git cd UPCODE # Configure environment variables cp .env.example .env.local # Build and run docker-compose up -d
-
Manual Docker Build
# Build the image docker build -t upcode . # Run the container docker run -p 3000:3000 -d upcode
-
Create an Account
- Visit the registration page
- Use email/password or OAuth (Google/GitHub)
- Complete profile setup
-
Explore DSA Visualizer
Navigate to: /dsa-visualizer - Choose algorithm category (Arrays, Trees, Graphs) - Interactive step-by-step visualizations - Adjust animation speed and controls -
Solve Problems
Navigate to: /problems-new - Browse by difficulty and topics - Use built-in code editor - Test with custom inputs - Submit for evaluation -
Take Interviews
Navigate to: /interview - Schedule live interviews - AI-powered practice sessions - Peer code reviews - Performance analytics -
Join Contests
Navigate to: /contests - Live competitive programming - Team-based challenges - Real-time leaderboards - ELO rating system
// Create personalized learning path
POST /api/study-plans
{
"title": "Data Structures Mastery",
"difficulty": "intermediate",
"topics": ["arrays", "trees", "graphs"],
"duration": "30-days"
}// Start AI-powered interview
POST /api/ai-interview/start
{
"type": "technical",
"level": "senior",
"focus": ["algorithms", "system-design"]
}POST /api/register
Content-Type: application/json
{
"username": "johndoe",
"email": "john@example.com",
"password": "securePassword123",
"fullName": "John Doe"
}POST /api/auth/[...nextauth]
Content-Type: application/json
{
"email": "john@example.com",
"password": "securePassword123"
}GET /api/problems-new
Query Parameters:
- page: integer (default: 1)
- limit: integer (default: 20)
- difficulty: string (easy|medium|hard)
- topic: stringPOST /api/problems-new/submit
Content-Type: application/json
{
"problemId": "64a7c8e5f123456789abcdef",
"code": "def solution(nums): return sum(nums)",
"language": "python",
"testCases": [...]
}POST /api/contest
Content-Type: application/json
{
"title": "Weekly Contest #1",
"description": "Beginner-friendly contest",
"startTime": "2024-12-01T10:00:00Z",
"duration": 120,
"problems": ["64a7c8e5f123456789abcdef"]
}POST /api/contest/register
Content-Type: application/json
{
"contestId": "64a7c8e5f123456789abcdef",
"teamName": "CodeMasters"
}POST /api/interview/session
Content-Type: application/json
{
"type": "live",
"interviewer": "64a7c8e5f123456789abcdef",
"scheduledTime": "2024-12-01T15:00:00Z",
"topics": ["algorithms", "data-structures"]
}POST /api/ai-interview/evaluate
Content-Type: application/json
{
"question": "Implement binary search",
"answer": "def binary_search(arr, target): ...",
"language": "python"
}POST /api/code/execute
Content-Type: application/json
{
"code": "print('Hello, World!')",
"language": "python",
"input": ""
}Response:
{
"output": "Hello, World!\n",
"error": null,
"executionTime": 0.045,
"memoryUsed": 8.2
}{
_id: ObjectId,
username: String (unique),
email: String (unique),
password: String (hashed),
fullName: String,
profilePicture: String,
role: String (user|admin),
stats: {
problemsSolved: Number,
contestsParticipated: Number,
rating: Number,
streak: Number
},
preferences: {
theme: String,
language: String,
notifications: Boolean
},
createdAt: Date,
updatedAt: Date
}{
_id: ObjectId,
title: String,
slug: String (unique),
description: String,
difficulty: String (easy|medium|hard),
topics: [String],
constraints: String,
examples: [{
input: String,
output: String,
explanation: String
}],
testCases: [{
input: String,
expectedOutput: String,
isHidden: Boolean
}],
editorial: String,
hints: [String],
stats: {
submissions: Number,
accepted: Number,
likes: Number
},
createdBy: ObjectId,
createdAt: Date
}{
_id: ObjectId,
title: String,
description: String,
type: String (individual|team),
startTime: Date,
endTime: Date,
duration: Number (minutes),
problems: [ObjectId],
participants: [{
user: ObjectId,
team: String,
joinedAt: Date
}],
leaderboard: [{
user: ObjectId,
score: Number,
penalty: Number,
submissions: Number
}],
status: String (upcoming|live|completed),
createdBy: ObjectId
}{
_id: ObjectId,
user: ObjectId,
problem: ObjectId,
contest: ObjectId (optional),
code: String,
language: String,
status: String (pending|accepted|wrong_answer|time_limit|runtime_error),
executionTime: Number,
memoryUsed: Number,
testCaseResults: [{
passed: Boolean,
input: String,
output: String,
expected: String
}],
submittedAt: Date
}
Modern landing page with feature highlights and quick access
Interactive algorithm visualizations with step-by-step controls
Monaco Editor with real-time code execution and testing
Live contest management with real-time leaderboards
Live coding interviews with video conferencing integration
Comprehensive performance tracking and insights
- OAuth Configuration: Google/GitHub OAuth requires proper domain setup for production
- Code Execution: Limited to basic test cases; complex I/O might need optimization
- Video Calls: Jitsi integration may require HTTPS for full functionality
- Real-time Features: WebSocket connections might timeout on some hosting platforms
- Fully Supported: Chrome 90+, Firefox 88+, Safari 14+, Edge 90+
- Partial Support: Older browsers may have limited DSA visualization features
- Mobile: Responsive design optimized for tablets; phone experience is functional but not optimal
- Large Datasets: DSA visualizations with 100+ elements may experience slower animations
- Concurrent Users: Socket.io may need scaling for 500+ simultaneous contest participants
- Memory Usage: Monaco Editor instances should be properly disposed to prevent memory leaks
- Enhanced DSA Visualizer: Add Graph algorithms (Dijkstra, DFS, BFS)
- Mobile App: React Native version for iOS/Android
- Advanced Analytics: Machine learning-based performance insights
- Code Collaboration: Real-time collaborative editing
- Video Tutorials: Integrated learning videos for each topic
- Microservices Architecture: Split into independent services
- Advanced Contest Features: ICPC-style contests, virtual contests
- Plagiarism Detection: AI-powered code similarity analysis
- Enterprise Features: Company-specific contests and assessments
- API Rate Limiting: Advanced throttling and abuse prevention
- Multi-language Support: Platform localization
- Advanced AI Integration: GPT-powered code review and suggestions
- Blockchain Certificates: Verifiable achievement certificates
- Global Competitions: International programming contests
- Mentorship Platform: Connect learners with industry experts
- TypeScript Migration: Full TypeScript implementation
- Test Coverage: Comprehensive unit and integration tests
- Documentation: API documentation with OpenAPI/Swagger
- Monitoring: Application performance monitoring (APM)
- Security Audit: Third-party security assessment
We welcome contributions from the community! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run tests:
npm test - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
# Install dependencies
npm install
# Run development server
npm run dev
# Run tests
npm test
# Check linting
npm run lint
# Build for production
npm run build- ESLint: Follow the configured ESLint rules
- Prettier: Use Prettier for code formatting
- Naming: Use camelCase for variables, PascalCase for components
- Comments: Add JSDoc comments for functions and components
- Commits: Use conventional commit messages
- ๐ Bug Fixes: Help fix reported issues
- โจ New Features: Implement requested features
- ๐ Documentation: Improve README, API docs, code comments
- ๐จ UI/UX: Enhance user interface and experience
- โก Performance: Optimize code and reduce bundle size
- ๐งช Testing: Add test coverage for existing code
Use GitHub Issues to report:
- Bugs with reproduction steps
- Feature requests with detailed descriptions
- Performance issues with profiling data
- Security vulnerabilities (private disclosure)
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2024 Rajdeep Kushwaha
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
๐ Built with โค๏ธ by Rajdeep Kushwaha
Report Bug โข Request Feature โข Contribute
โญ Star this repository if you found it helpful!