Repo Reader is an innovative tool that makes understanding complex codebases fun and engaging through gamified learning walkthroughs. It analyzes any GitHub repository and creates structured learning experiences with achievements, progress tracking, and interactive quizzes. Enhanced with TiDB vector search for intelligent code assistance:
šÆ Gamified Learning: Transform repositories into interactive learning quests with achievements, levels, and progress tracking
š¤ AI-Powered Analysis: Deep code understanding using advanced language models
š Learning Path Generation: Creates progressive, difficulty-appropriate walkthroughs tailored to your experience level
š Achievement System: Unlock badges and earn points as you master different aspects of the codebase
š® Interactive Quizzes: Test your understanding with dynamically generated questions
š¬ RAG Chat Interface: Ask questions about any codebase using TiDB vector search (NEW!)
ā” Smart Code Assistant: Get instant answers with relevant source code citations
⨠Features
šÆ Core Learning Experience
Repository Analysis: Clones and analyzes GitHub repositories automatically
Gamified Walkthroughs: Structured learning modules with difficulty progression
Achievement System: Unlock badges for completing learning milestones
Progress Tracking: Visual progress bars and completion statistics
Interactive Quizzes: Codebase-specific questions that test real understanding
Multi-Level Learning: Beginner, Intermediate, and Advanced learning paths
š¤ AI-Powered Intelligence
Code Structure Detection: Identifies frameworks, languages, and architectural patterns
# OpenAI API Key OPENAI_API_KEY=your_openai_api_key_here
# Optional: Local Model Support CHATGPT_OSS_MODEL_PATH=openai/gpt-oss-20b LOCAL_MODEL_PREFER=true
3. Start Development Servers
npm run dev
After you run npm run dev, it would take a couple of seconds to actually initialize as this project is using a local embedding model so there would be a first time initial download of this model (it is very lightweight) and after that it would be cached. Dont start using the frontend until you see this message
We welcome contributions! Here's how to get started:
Development Setup
Fork the repository
Create a feature branch: git checkout -b feature-name
Set up TiDB Serverless account
Configure environment variables
Make your changes
Add tests if applicable
Submit a pull request
Code Style
Use TypeScript for frontend code
Follow Python PEP 8 for backend code
Add JSDoc/docstring comments for public functions
Use descriptive commit messages
Testing
# Run frontend tests npm test
# Run backend tests cd api && python -m pytest
# Type checking npm run type-check
š Troubleshooting
Common Issues
TiDB connection fails:
Check TiDB Serverless credentials in .env
Ensure database exists and is accessible
Verify network connectivity
Chat widget not working:
Ensure repository is analyzed and indexed first
Check browser console for API errors
Verify OpenAI API key is working
Performance issues:
Check TiDB connection pool settings
Monitor embedding cache performance
Consider upgrading to TiDB Cloud Dedicated
Performance Tips
Use SSD storage for better I/O performance
Enable connection pooling (already configured)
Monitor TiDB query performance
Use embedding caching for repeated queries
š Monitoring
Check system status:
# TiDB vector search status curl http://localhost:5328/api/llm-status
# Agent workflow status curl http://localhost:5328/api/status
# Health check curl http://localhost:5328/api/health
š License
MIT License - see LICENSE file for details.
šÆ Project Focus
Primary Goal: Transform complex codebases into engaging, gamified learning experiences that help developers understand and master new technologies through interactive walkthroughs, achievements, and personalized learning paths.
Latest Enhancement: Added TiDB Serverless integration for intelligent code assistance, enabling users to ask questions and get contextual answers while exploring repositories.
š Acknowledgments
TiDB Cloud: For serverless vector database capabilities
LangChain & LangGraph: For the AI orchestration framework
OpenAI: For GPT models and embeddings API
HuggingFace: For open-source model hosting
Vercel: For hosting and deployment platform
Made with ā¤ļø for developers who want to understand code better