A modern, interactive Data Structures and Algorithms learning platform powered by Google Gemini AI. Built with React, Vite, Node.js, and Tailwind CSS.
- AI-Powered Q&A: Ask any DSA-related question and get detailed explanations
- Interactive Practice: Generate custom questions by topic and difficulty
- Multiple Question Types: Multiple choice, coding problems, and open-ended questions
- Real-time Evaluation: Get instant feedback on your answers
- Modern UI: Beautiful, responsive design with smooth animations
- Topic Coverage: Arrays, Trees, Graphs, Algorithms, and more
- React 18 - Modern React with hooks
- Vite - Fast build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Smooth animations
- Lucide React - Beautiful icons
- Axios - HTTP client
- React Hot Toast - Notifications
- Node.js - JavaScript runtime
- Express.js - Web framework
- Google Gemini AI - AI-powered question generation and evaluation
- CORS - Cross-origin resource sharing
- Helmet - Security middleware
- Rate Limiting - API protection
- Node.js (v16 or higher)
- npm or yarn
- Google Gemini API key
-
Clone the repository
git clone <repository-url> cd dsa_instructor
-
Install dependencies
npm run install-all
-
Set up environment variables
cp .env.example .env
Edit
.envand add your Google Gemini API key:GEMINI_API_KEY=your_gemini_api_key_here PORT=5000 NODE_ENV=development
-
Get Google Gemini API Key
- Go to Google AI Studio
- Create a new API key
- Copy the key to your
.envfile
npm run devThis starts both the frontend (port 3000) and backend (port 5000) concurrently.
# Frontend only
npm run client
# Backend only
npm run servernpm run build
npm start- Ask Questions: Use the chat interface to ask any DSA-related question
- Practice: Generate custom questions by selecting topics and difficulty levels
- Learn: Get detailed explanations of DSA concepts
- Evaluate: Submit answers and get instant AI-powered feedback
- Arrays & Strings
- Linked Lists
- Stacks & Queues
- Trees & Binary Search Trees
- Heaps & Priority Queues
- Hash Tables & Maps
- Graphs & Graph Algorithms
- Sorting Algorithms
- Searching Algorithms
- Dynamic Programming
- Greedy Algorithms
- Backtracking
- Recursion
- Bit Manipulation
- Mathematical Algorithms
- Rate limiting on API endpoints
- CORS protection
- Helmet security headers
- Input validation and sanitization
- Environment variable protection
GET /api/health- Health checkGET /api/topics- Get available DSA topicsPOST /api/generate-question- Generate a new questionPOST /api/evaluate-answer- Evaluate user's answerPOST /api/explain-concept- Get concept explanation
- Responsive Design: Works on desktop, tablet, and mobile
- Dark/Light Theme: Automatic theme detection
- Smooth Animations: Framer Motion powered transitions
- Glass Morphism: Modern glassmorphism design elements
- Syntax Highlighting: Code syntax highlighting for programming questions
- Toast Notifications: Real-time feedback messages
GEMINI_API_KEY=your_api_key_here
PORT=5000
NODE_ENV=development
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100- Modify
tailwind.config.jsfor theme customization - Update
server/services/geminiService.jsfor AI prompt tuning - Adjust rate limiting in
server/index.js
-
Gemini API Key Error
- Ensure your API key is correctly set in
.env - Check if the API key has proper permissions
- Ensure your API key is correctly set in
-
CORS Issues
- Verify frontend is running on port 3000
- Check CORS configuration in
server/index.js
-
Build Errors
- Clear node_modules and reinstall dependencies
- Check Node.js version compatibility
- Frontend: Vite for fast development and optimized builds
- Backend: Express.js with efficient middleware stack
- AI: Optimized prompts for faster Gemini API responses
- Caching: Browser caching for static assets
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini AI for powerful language model capabilities
- React team for the excellent framework
- Tailwind CSS for the utility-first approach
- All open-source contributors
For support, please open an issue on GitHub or contact the development team.
Happy Learning! 🎓