Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ AlgoVision AI

AI-Powered DSA Learning Platform with Advanced Visualization Engine

AlgoVision AI is a premium, production-ready full-stack platform that revolutionizes Data Structures and Algorithms learning through AI-powered analysis, beautiful step-by-step visualizations, mock interviews, gamification, and personalized learning paths.

Version React Node MongoDB License


โœจ Key Features

๐Ÿค– AI-Powered Analysis

  • Deep Problem Analysis: Comprehensive breakdown of any LeetCode problem
  • Pattern Recognition: Automatically identifies algorithm patterns
  • Multiple Approaches: Brute force, optimized, and best solutions
  • Code Review: AI-powered bug detection and optimization suggestions
  • Interview Simulation: Practice with AI interviewer for FAANG prep

๐ŸŽจ Visualization Engine

  • Array Algorithms: Sliding window, two pointer, sorting
  • Tree Traversals: BFS, DFS with animated node highlighting
  • Graph Algorithms: Pathfinding, connectivity, cycles
  • Dynamic Programming: DP table visualization with state transitions
  • Linked Lists: Animated pointer movements and operations
  • Stack & Queue: Vertical stack and horizontal queue visualizations
  • Playback Controls: Play, pause, step-by-step, speed adjustment
  • Keyboard Shortcuts: Space (play/pause), arrows (navigate), R (reset)

๐Ÿ“Š Learning & Progress

  • Progress Analytics: Comprehensive dashboard with charts
  • Weak Topic Detection: AI identifies areas needing improvement
  • Interview Readiness Score: 0-100 rating based on your preparation
  • Streak Tracking: Daily challenge streaks with rewards
  • XP & Leveling System: Earn experience points and level up
  • Badge System: Unlock achievements (Array Master, DP Expert, etc.)
  • Leaderboard: Compete with other learners globally

๐ŸŽฏ Interactive Features

  • Daily Challenge: New problem every day with bonus XP
  • Contest Mode: Timed contests with rankings and prizes
  • Mock Interviews: AI-conducted technical interviews
  • Bug Detector: Submit code for AI review
  • Hint System: Progressive hints (Level 1-4)
  • Test Case Generator: Auto-generate edge cases
  • Dry Run Generator: Step-by-step code execution
  • Flashcards: Spaced repetition for revision
  • Notes System: Save personal notes and insights

๐Ÿข Additional Features

  • Company-wise Problems: Filter by Google, Amazon, Microsoft, Meta
  • Topic Roadmap: Structured learning path from basics to advanced
  • Code Playground: Multi-language code editor
  • Concept Explanations: Deep dives into DSA concepts
  • Approach Comparison: Side-by-side algorithm comparison
  • Related Problems: AI-recommended similar problems

๐Ÿ—๏ธ Tech Stack

Frontend

  • React 18 - Modern UI library with hooks
  • Vite - Lightning-fast build tool
  • Tailwind CSS - Utility-first CSS framework
  • Framer Motion - Smooth animations
  • React Router v6 - Client-side routing
  • Zustand - Lightweight state management
  • Axios - HTTP client
  • React Hot Toast - Beautiful notifications
  • Recharts - Analytics charts
  • React Syntax Highlighter - Code highlighting

Backend

  • Node.js + Express - RESTful API server
  • MongoDB + Mongoose - NoSQL database with ODM
  • OpenAI API (GPT-4) - AI-powered features
  • JWT - Secure authentication
  • Bcrypt - Password hashing
  • Helmet - Security headers
  • Rate Limiting - DDoS protection
  • Morgan - HTTP logging

DevOps & Tools

  • Docker - Containerization support
  • Git - Version control
  • ESLint - Code linting
  • Prettier - Code formatting

๐Ÿ“ Project Structure

algovision-ai/
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ analytics/        # Charts and stats
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ common/            # Reusable components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ interview/         # Mock interview UI
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ layout/            # Layout components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ problem/           # Problem solver UI
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ui/                # UI primitives
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ visualization/     # Visualization engine
โ”‚   โ”‚   โ”œโ”€โ”€ pages/                 # Route pages (18 pages)
โ”‚   โ”‚   โ”œโ”€โ”€ services/              # API services
โ”‚   โ”‚   โ”œโ”€โ”€ store/                 # Zustand stores
โ”‚   โ”‚   โ”œโ”€โ”€ styles/                # Global CSS
โ”‚   โ”‚   โ””โ”€โ”€ utils/                 # Helper functions
โ”‚   โ”œโ”€โ”€ public/                    # Static assets
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ config/                    # Configuration files
โ”‚   โ”œโ”€โ”€ controllers/               # Route controllers (8)
โ”‚   โ”œโ”€โ”€ middleware/                # Custom middleware
โ”‚   โ”œโ”€โ”€ models/                    # Database models (15)
โ”‚   โ”œโ”€โ”€ routes/                    # API routes
โ”‚   โ”œโ”€โ”€ services/                  # Business logic
โ”‚   โ”‚   โ”œโ”€โ”€ aiService.js          # 12 AI features
โ”‚   โ”‚   โ””โ”€โ”€ scraperService.js     # LeetCode scraper
โ”‚   โ”œโ”€โ”€ utils/                     # Helper utilities
โ”‚   โ””โ”€โ”€ server.js                  # Entry point
โ”‚
โ”œโ”€โ”€ SETUP_GUIDE.md                 # Detailed setup instructions
โ”œโ”€โ”€ DEPLOYMENT.md                  # Deployment guide
โ””โ”€โ”€ README.md                      # This file

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+ and npm
  • MongoDB 8.0+
  • OpenAI API key (optional, for AI features)

Installation

  1. Clone the repository
git clone <repository-url>
cd algovision-ai
  1. Install dependencies
# Backend
cd backend
npm install

# Frontend
cd ../frontend
npm install
  1. Configure environment variables

Backend .env:

NODE_ENV=development
PORT=5000
MONGODB_URI=mongodb://localhost:27017/algovision-ai
JWT_SECRET=your_super_secret_jwt_key
OPENAI_API_KEY=your_openai_api_key_here

Frontend .env:

VITE_API_URL=http://localhost:5000/api
  1. Start MongoDB
# Windows
net start MongoDB

# macOS/Linux
sudo systemctl start mongod
  1. Start the servers

Terminal 1 (Backend):

cd backend
npm run dev

Terminal 2 (Frontend):

cd frontend
npm run dev
  1. Access the application

๐Ÿ“– API Documentation

Authentication

POST   /api/auth/register          Register new user
POST   /api/auth/login             Login user
GET    /api/auth/profile           Get user profile
PUT    /api/auth/profile           Update profile
POST   /api/auth/logout            Logout user

Problems

POST   /api/problems/scrape        Scrape LeetCode problem
POST   /api/problems/analyze       Analyze problem with AI
GET    /api/problems/:id           Get problem details
GET    /api/problems/user          Get user's problems
GET    /api/problems/:id/visualization   Get visualization data
GET    /api/problems/:id/solutions       Get code solutions
POST   /api/problems/:id/hints           Get progressive hints

AI Features

POST   /api/ai/hints               Generate hints
POST   /api/ai/detect-bugs         Detect bugs in code
POST   /api/ai/test-cases          Generate test cases
POST   /api/ai/dry-run             Execute dry run
POST   /api/ai/explain-concept     Explain DSA concept
POST   /api/ai/chat                Chat with AI tutor
POST   /api/ai/compare-approaches  Compare algorithms

Gamification

GET    /api/gamification/badges           Get user badges
GET    /api/gamification/leaderboard      Get leaderboard
GET    /api/gamification/daily-challenge  Get today's challenge
POST   /api/gamification/daily-challenge/complete  Complete challenge

Interview

POST   /api/interview/start        Start interview session
POST   /api/interview/:id/answer   Submit answer
GET    /api/interview/history      Get interview history
POST   /api/interview/:id/end      End interview

For complete API documentation, see API.md


๐ŸŽจ UI Design

Color Palette

  • Background: #0B1120 - Deep dark blue
  • Cards: #111827 - Dark gray
  • Borders: #1F2937 - Medium gray
  • Primary: Orange-Red Gradient (#FF6B35 โ†’ #F7931E)
  • Success: Green (#22c55e)
  • Warning: Yellow (#f59e0b)
  • Error: Red (#ef4444)

Design Principles

  • Premium Dark Theme: Sleek, modern interface
  • Glassmorphism: Subtle blur and transparency effects
  • Smooth Animations: Framer Motion for fluid transitions
  • Responsive Layout: Mobile-first design
  • Accessibility: WCAG 2.1 AA compliant
  • Typography: Inter font for UI, Fira Code for code

๐Ÿ”ง Configuration

Backend Configuration

MongoDB Indexes:

  • User email (unique)
  • Problem difficulty, tags, companies
  • Progress userId, date
  • Submissions userId, problemId

Rate Limiting:

  • 100 requests per 15 minutes per IP
  • Configurable via environment variables

Security:

  • Helmet for HTTP headers
  • CORS configured for frontend domain
  • JWT token expiration: 30 days
  • Password hashing with bcrypt (12 rounds)

Frontend Configuration

Build Optimization:

  • Code splitting by route
  • Lazy loading for images
  • Tree shaking for unused code
  • Minification and compression

๐Ÿงช Testing

Manual Testing Checklist

โœ… Authentication Flow

  • User registration
  • Login with credentials
  • Profile update
  • Logout

โœ… Problem Solver

  • Paste LeetCode URL
  • Manual problem input
  • AI analysis generation
  • Visualization playback
  • Code solutions display

โœ… Visualization

  • Array sorting animation
  • Tree traversal visualization
  • Graph algorithm display
  • DP table updates
  • Playback controls work

โœ… AI Features

  • Progressive hints
  • Bug detection
  • Test case generation
  • Dry run execution
  • Concept explanation

โœ… Gamification

  • Daily challenge completion
  • Badge unlocking
  • XP earning
  • Level progression
  • Leaderboard updates

โœ… Contest Mode

  • Enter ongoing contest
  • Submit solutions
  • Timer countdown
  • Score calculation

๐Ÿ“Š Performance

Metrics

  • Page Load Time: < 2s
  • Time to Interactive: < 3s
  • First Contentful Paint: < 1.5s
  • API Response Time: < 500ms (avg)
  • Visualization FPS: 60fps

Optimization Techniques

  • React.memo for expensive components
  • useCallback/useMemo for optimization
  • Virtual scrolling for large lists
  • Debouncing for search inputs
  • Image lazy loading
  • Code splitting

๐Ÿ› Troubleshooting

Common Issues

Backend won't start

# Check if port 5000 is in use
netstat -ano | findstr :5000
# Kill the process or change PORT in .env

Frontend build fails

# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install

MongoDB connection error

# Start MongoDB
net start MongoDB  # Windows
sudo systemctl start mongod  # Linux

AI features not working

For detailed troubleshooting, see SETUP_GUIDE.md


๐Ÿšข Deployment

Production Checklist

  • Set NODE_ENV=production
  • Use strong JWT_SECRET
  • Configure MongoDB Atlas
  • Add OpenAI API key
  • Set up SSL/HTTPS
  • Configure CORS for production domain
  • Enable rate limiting
  • Set up monitoring (PM2, New Relic)
  • Configure backups
  • Set up CI/CD pipeline

For detailed deployment instructions, see DEPLOYMENT.md


๐Ÿค Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Code Style

  • Use ESLint configuration
  • Follow Airbnb style guide
  • Write meaningful commit messages
  • Add JSDoc comments for functions
  • Update documentation for new features

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ‘ฅ Authors

AlgoVision AI Team

  • Lead Developer: [Your Name]
  • UI/UX Designer: [Designer Name]
  • AI Engineer: [AI Engineer Name]

๐Ÿ™ Acknowledgments

  • OpenAI for GPT-4 API
  • LeetCode for problem inspiration
  • React community for excellent libraries
  • All contributors and testers

๐Ÿ“ฎ Contact & Support


๐Ÿ—บ๏ธ Roadmap

Version 1.1 (Q2 2026)

  • Code execution sandbox
  • Real-time collaboration
  • Video explanations
  • Mobile app (React Native)

Version 1.2 (Q3 2026)

  • Premium subscription tier
  • Personalized learning paths
  • Live coding sessions
  • Company-specific prep tracks

Version 2.0 (Q4 2026)

  • System design module
  • ML algorithm visualizations
  • Peer code review
  • Certification program

๐Ÿ“ˆ Project Stats

  • Total Lines of Code: ~15,000
  • Components: 50+
  • API Endpoints: 40+
  • Database Models: 15
  • AI Features: 12
  • Visualization Types: 8
  • Pages: 18

Built with โค๏ธ for the DSA learning community


Quick Links


โญ If you find this project helpful, please star it on GitHub!

About

Fun

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages