AlgoTutorAI is a comprehensive web-based platform that helps students learn data structures, algorithms, and technical interview topics through AI-generated problems and adaptive learning. Built with modern web technologies and powered by OpenAI's GPT models, it provides a personalized learning experience that adapts to each student's skill level and progress.
- Intelligent Problem Generation: AI creates unique coding problems based on topic, difficulty, and learning objectives
- Adaptive Difficulty: Problems automatically adjust to match your skill level
- Real-time Feedback: Get instant AI analysis of your code with suggestions for improvement
- Smart Hints: Progressive hints that guide you toward solutions without giving them away
- Personalized Recommendations: AI suggests problems based on your learning patterns and weak areas
- Data Structures: Arrays, Strings, Linked Lists, Stacks, Queues, Trees, Graphs, Heaps, Hash Tables
- Algorithms: Dynamic Programming, Greedy, Backtracking, Two Pointers, Sliding Window, Binary Search
- Advanced Topics: Sorting, Recursion, Bit Manipulation, Math, Geometry, Game Theory, System Design
- Interview Preparation: All topics commonly covered in technical coding interviews
- Progress Tracking: Monitor your improvement with detailed analytics
- Achievement System: Earn badges and rewards for milestones
- Streak Tracking: Maintain daily learning habits
- Performance Analytics: Detailed insights into your strengths and weaknesses
- Learning Paths: Structured progression through topics
- Multi-language Support: JavaScript, Python, Java, C++
- Code Editor: Monaco Editor with syntax highlighting and autocomplete
- Test Execution: Run your code against test cases
- Solution Comparison: Compare your approach with optimal solutions
- Modern UI/UX: Beautiful, responsive design with dark/light mode
- Mobile Responsive: Works seamlessly on all devices
- Real-time Updates: Live progress tracking and notifications
- Community Features: Leaderboards and user rankings
- Node.js with Express.js framework
- MongoDB with Mongoose ODM
- OpenRouter API for AI-powered features
- JWT for authentication
- bcryptjs for password hashing
- Rate limiting and security middleware
- React 18 with modern hooks
- Tailwind CSS for styling
- Framer Motion for animations
- React Query for data fetching
- Monaco Editor for code editing
- Lucide React for icons
- ESLint for code quality
- Prettier for code formatting
- Nodemon for backend development
- Concurrently for running both servers
- Node.js 16+ and npm
- MongoDB (local or cloud)
- OpenRouter API Key
git clone https://github.com/yourusername/algotutor-ai.git
cd algotutor-ai# Install backend dependencies
npm install
# Install frontend dependencies
cd client
npm install
cd ..Create a .env file in the root directory:
# Server Configuration
PORT=5000
NODE_ENV=development
# MongoDB Configuration
MONGODB_URI=mongodb://localhost:27017/algotutor-ai
# JWT Configuration
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
# OpenAI Configuration
OPENAI_API_KEY=your-openai-api-key-here
# Client Configuration
CLIENT_URL=http://localhost:3000# Development mode (runs both backend and frontend)
npm run dev
# Or run separately:
# Backend only
npm run server
# Frontend only
npm run clientThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
algotutor-ai/
โโโ server/ # Backend server
โ โโโ config/ # Database and configuration
โ โโโ middleware/ # Express middleware
โ โโโ models/ # MongoDB models
โ โโโ routes/ # API routes
โ โโโ index.js # Server entry point
โโโ client/ # React frontend
โ โโโ src/
โ โ โโโ components/ # Reusable components
โ โ โโโ contexts/ # React contexts
โ โ โโโ pages/ # Page components
โ โ โโโ services/ # API services
โ โ โโโ App.js # Main app component
โ โโโ public/ # Static assets
โ โโโ package.json # Frontend dependencies
โโโ package.json # Backend dependencies
โโโ README.md # This file
- Create an Account: Sign up with email and password
- Choose Topics: Select topics you want to learn
- Set Difficulty: Start with beginner level
- Practice Problems: Solve AI-generated problems
- Get Feedback: Review AI analysis of your solutions
- Track Progress: Monitor your improvement over time
- Review Problems: AI-generated problems are reviewed before publication
- Custom Problems: Create custom problems for specific learning objectives
- Student Analytics: Monitor class performance and progress
- Adaptive Learning: Let AI adjust difficulty based on student performance
- JWT Authentication: Secure token-based authentication
- Password Hashing: bcryptjs for secure password storage
- Rate Limiting: Prevent API abuse
- Input Validation: Sanitize and validate all inputs
- CORS Protection: Configured for production use
- Helmet.js: Security headers and protection
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/me- Get current userPUT /api/auth/profile- Update profile
GET /api/problems- List all problemsGET /api/problems/:id- Get problem detailsPOST /api/problems/:id/submit- Submit solutionGET /api/problems/topics/list- List all topics
POST /api/ai/generate-problem- Generate new problemPOST /api/ai/analyze-solution- Analyze user solutionPOST /api/ai/get-hint- Get problem hintPOST /api/ai/recommend-problems- Get recommendations
GET /api/users/progress- Get learning progressGET /api/users/submissions- Get submission historyGET /api/users/achievements- Get user achievementsGET /api/users/leaderboard- Get leaderboard
- Set environment variables for production
- Use PM2 or similar process manager
- Configure MongoDB connection
- Set up reverse proxy (Nginx)
- Build the React app:
npm run build - Serve static files with Nginx or similar
- Configure API proxy
NODE_ENV=production
MONGODB_URI=your-production-mongodb-uri
JWT_SECRET=your-production-jwt-secret
CLIENT_URL=https://yourdomain.com- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Add tests if applicable
- Commit your changes:
git commit -m 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Mobile App: React Native mobile application
- Video Tutorials: Integrated video learning content
- Collaborative Learning: Pair programming features
- Advanced Analytics: Machine learning insights
- Interview Simulator: Mock technical interviews
- Code Review System: Peer code review features
- Integration APIs: Connect with other learning platforms