An AI-powered educational platform that transforms coding problems into visual learning experiences. Code2Concept analyzes programming problems, provides multiple solution approaches, and generates animated explanations using Manim to help developers understand algorithms and data structures conceptually.
- π€ AI-Powered Analysis: Uses Google's Gemini AI to analyze coding problems and generate comprehensive explanations
- π Multiple Approaches: Compare different solution approaches with time/space complexity analysis
- π¬ Animated Explanations: Generate visual animations using Manim to illustrate algorithm execution
- π‘ Concept Learning: Break down complex algorithms into understandable concepts
- π― Interactive Interface: Modern React-based UI for seamless learning experience
- React with Vite for fast development
- Tailwind CSS for styling
- JavaScript/JSX for component logic
- Node.js with Express.js
- Google Generative AI (Gemini) for problem analysis
- Manim for animation generation
- FFmpeg for video processing
- Node.js (Latest LTS version recommended)
- npm (comes with Node.js)
- Python 3.7 or higher
- Manim (for animation generation)
- Google Gemini API Key
- MathTeX (optional, for mathematical notation rendering)
- Download Python from the official website
- During installation, make sure to check "Add Python to PATH"
- Verify installation by opening a terminal and running:
python --version- Install Manim using pip:
pip install manim-
Install additional dependencies:
- For Windows:
# Install MiKTeX (LaTeX distribution) # Download from: https://miktex.org/download # Install FFmpeg # Download from: https://ffmpeg.org/download.html # Add FFmpeg to your system PATH
- For macOS:
brew install py3cairo ffmpeg
- For Linux:
sudo apt update sudo apt install libcairo2-dev libpango1.0-dev ffmpeg
- For Windows:
-
Verify Manim installation:
manim --version- Clone the repository:
git clone https://github.com/A-R-P-I-T-JAIN/Code2Concept.git
cd Code2Concept- Install frontend dependencies:
npm install- Install backend dependencies:
cd backend
npm install
- Set up environment variables:
Create a
.envfile in thebackenddirectory:
cd backendGEMINI_API_KEY=your_google_gemini_api_key_here
PORT=5000- Start the backend server:
cd backend
npm run devThe backend will run on http://localhost:5000
- Start the frontend development server:
npm run devThe frontend will run on http://localhost:5173 (or another available port)
- Build the frontend:
npm run build- Start the backend in production:
cd backend
npm start- Preview the production build:
npm run previewnpm run dev- Start development server with HMRnpm run build- Create production buildnpm run preview- Preview production build locallynpm run lint- Run ESLint for code quality checks
npm run dev- Start backend with nodemon (auto-reload)npm start- Start backend in production mode
Code2Concept/
βββ src/
β βββ components/ # React components
β βββ data/ # Static data (approaches.js)
β βββ services/ # API services
β βββ ...
βββ backend/
β βββ server.js # Express server
β βββ videos/ # Generated video files
β βββ renders/ # Manim render outputs
β βββ audio/ # Audio files
βββ public/ # Static assets
βββ ...
- Problem Input: Users input coding problems or questions
- AI Analysis: Gemini AI analyzes the problem and generates solution approaches
- Approach Comparison: Multiple solutions are presented with complexity analysis
- Animation Generation: Manim creates visual animations explaining the algorithms
- Interactive Learning: Users can explore different approaches and watch explanations
POST /api/analyze- Analyze a coding problem and return solution approachesGET /videos/:filename- Serve generated video files
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Make sure to set up your environment variables properly:
# Backend/.env
GEMINI_API_KEY=your_api_key_here
PORT=5000- Manim Installation Issues: Ensure all system dependencies are installed
- FFmpeg Not Found: Make sure FFmpeg is added to your system PATH
- API Key Issues: Verify your Gemini API key is correctly set in the environment variables
- Port Conflicts: Change the port in the backend if 5000 is already in use
- Ensure Python and Manim are properly installed
- Check that the
rendersandvideosdirectories have write permissions - Verify FFmpeg is accessible from the command line
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Generative AI for problem analysis
- Manim Community for animation framework
- React and Vite teams for the frontend framework
- All contributors and the open-source community
If you encounter any issues or have questions, please:
- Check the troubleshooting section above
- Search existing issues on GitHub
- Create a new issue with detailed information about your problem
Happy Learning! π