ALGOPro is an intelligent learning platform that transforms how students master Data Structures and Algorithms through AI-generated personalized content, adaptive quizzes, and real-time assistance.
Students face critical challenges in self-directed learning:
- Complex concepts are difficult to grasp without personalized explanations
- Online searches yield irrelevant or overly advanced results
- Teachers are unavailable 24/7 for immediate doubt resolution
- Static quiz banks lead to memorization rather than understanding
- Fragmented tools waste time switching between platforms
ALGOPro addresses these challenges through:
| Feature | Description |
|---|---|
| 🤖 AI Tutor | Explains concepts in Beginner/Intermediate/Advanced terms |
| 📝 Dynamic Quizzes | Unlimited AI-generated questions prevent memorization |
| 💻 Code Analysis | Instant debugging help and optimization suggestions |
| 📊 Progress Tracking | Visual analytics identify strengths and weaknesses |
| 🎥 Video Integration | Curated content with AI-powered explanations |
Deployed Application: https://algopro.onrender.com
- Python 3.8+ - Core language
- Flask - Web framework
- OpenRouter API - LLM integration (GPT-OSS-120B)
- Markdown - Content rendering
- HTML5 + Jinja2 - Templating
- Bootstrap 5 - Responsive UI
- Chart.js - Data visualization
- Highlight.js - Code syntax highlighting
- Multi-pattern regex parser - Handles diverse LLM outputs
- Dynamic prompt engineering - Context-aware quiz generation
- Response sanitization - XSS protection
ALGOPro/
├── app.py # Main Flask application
├── requirements.txt # Python dependencies
├── .env # Environment variables (not in repo)
├── .env.example # Environment template
├── .gitignore # Git ignore rules
├── data/
│ ├── dsa_content.json # Topic structure & metadata
│ └── quiz_templates.json # Quiz generation templates
├── templates/ # Jinja2 HTML templates
│ ├── base.html
│ ├── index.html
│ ├── topic.html
│ ├── quiz.html
│ ├── practice.html
│ └── generate_quiz.html
└── static/
├── css/style.css # Custom styles
└── js/main.js # Client-side logic
- Python 3.8 or higher
- Git
- OpenRouter API key (Get one free)
-
Clone the repository
git clone https://github.com/YOUR_USERNAME/ALGOPro.git cd ALGOPro -
Create virtual environment python -m venv venv
Windows- venv\Scripts\activate
Mac/Linux- source venv/bin/activate
-
Install dependencies pip install -r requirements.txt
-
Configure environment variables cp .env.example .env Edit .env file: OPENROUTER_API_KEY=sk-or-v1-your-actual-key-here FLASK_SECRET_KEY=your-random-secret-key-here
-
Run the application python app.py
-
Open in browser http://localhost:5000
🧠 Core Algorithm: LLM Response Parser The platform's robustness comes from a multi-layer parsing strategy: # 1. Multi-pattern question segmentation patterns = [
r'Question \d+:', # "Question 1:"
r'Q\d+:', # "Q1:"
r'#{1,3} Question', # "### Question 1"
r'\*\*Question', # "**Question 1**"
r'\d+\.' # "1. What..."
]
-
Code block preservation Extract
code→ placeholders → parse → restore -
Component extraction Question text → Options → Correct answer → Explanation
-
Validation & auto-repair Ensures 4 options, infers missing answers, fills placeholders
Success Rate: Handles 95% of LLM output variations. 📊 Features in Detail
AI-Generated Quizzes
- Unlimited unique questions per topic
- Adaptive difficulty (Easy/Medium/Hard/Mixed)
- Instant feedback with detailed explanations
- Progress tracking across attempts
AI Learning Assistant
- Real-time concept explanations
- Three difficulty levels
- Code snippet examples
- Table and list formatting
Code Analysis Tool
- Paste code for instant review
- Bug detection and fixes
- Optimization suggestions
- Syntax highlighting
Practice Problems
- 50+ curated LeetCode problems
- Filter by category and difficulty
- Direct links to solve
- Local progress tracking
#.🔒 Security Measures
✅ API keys stored in environment variables
✅ .env excluded from Git (.gitignore)
✅ HTML escaping for XSS prevention
✅ Session-based user state management
✅ No sensitive data in client-side code
