A powerful multi-agent AI system that analyzes codebases, maps dependencies, extracts business logic, and provides impact analysis. Built for hackathon excellence.
Codebase Archeologist is a comprehensive tool that helps developers understand complex codebases quickly. It uses a multi-agent AI system to analyze repositories, visualize dependencies, and predict the impact of code changes.
-
π€ Multi-Agent Analysis: 5 specialized AI agents working together
- Repo Analyzer: Extracts AST and code structure
- Dependency Mapper: Builds dependency graphs
- Business Logic Extractor: AI-powered code understanding
- Impact Analyzer: Predicts consequences of changes
- Orchestrator: Manages workflow and streams progress
-
π Interactive Visualization: React Flow-based dependency graphs
- Real-time graph updates
- Interactive node exploration
- Zoom, pan, and mini-map
- Color-coded risk indicators
-
π§ AI-Powered Insights:
- Natural language code descriptions
- Confidence scores for reliability
- Context-aware chat assistant
- Uses Google Gemini 1.5 Flash
-
β‘ Real-time Progress: WebSocket streaming of analysis progress
-
π Impact Analysis: See what breaks before you delete code
-
π¨ Modern UI: Beautiful, responsive interface built with Tailwind CSS
- React 18.2.0 - UI framework
- TypeScript 5.2.2 - Type-safe development
- Vite 5.0.8 - Build tool
- Tailwind CSS 3.3.6 - Styling
- React Flow 11.10.1 - Graph visualization
- Zustand 4.4.7 - State management
- Axios 1.6.2 - HTTP client
- FastAPI 0.104.1 - Web framework
- Python 3.11 - Programming language
- Uvicorn 0.24.0 - ASGI server
- NetworkX 3.2.1 - Graph algorithms
- Tree-sitter - AST parsing (Python, JS, TS)
- SQLAlchemy 2.0.23 - ORM
- WebSockets 12.0 - Real-time communication
- Google Gemini 1.5 Flash - AI model for code understanding
- Snyk Code API - Security analysis (optional)
- Vercel - Frontend hosting
- Railway - Backend hosting
- Python 3.11+
- Node.js 18+
- Git
# Navigate to backend
cd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# Mac/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# (Optional) Set up environment variables
cp env.example .env
# Edit .env and add your API keys
# Start the server
uvicorn main:app --reloadBackend will run at http://localhost:8000
# Navigate to frontend
cd frontend
# Install dependencies
npm install
# Start development server
npm run devFrontend will run at http://localhost:5173
- Open
http://localhost:5173in your browser - Enter a GitHub repository URL (e.g.,
https://github.com/facebook/react) - Click "Analyze Repository"
- Watch the magic happen! β¨
See LIVE_DEPLOYMENT_GUIDE.md for detailed deployment instructions.
Quick Steps:
- Deploy backend to Railway
- Deploy frontend to Vercel
- Configure environment variables
- Update CORS settings
DATABASE_URL=sqlite:///./codebase_archeologist.db
GEMINI_API_KEY=your_gemini_api_key_here
SNYK_API_KEY=your_snyk_key_here
CORS_ORIGINS=http://localhost:5173,https://your-frontend.vercel.app
LLM_MODEL=gemini-1.5-flashVITE_API_URL=http://localhost:8000
# For production: VITE_API_URL=https://your-backend.railway.app- Repo Analyzer: Clones repos and extracts AST
- Dependency Mapper: Builds dependency graphs using NetworkX
- Business Logic Extractor: AI-powered code understanding
- Impact Analyzer: Predicts consequences of changes
- Orchestrator: Manages agent workflows and streams progress
User Input β Frontend β FastAPI Backend β Agent System
β
Database (SQLite/PostgreSQL)
β
WebSocket β Real-time Updates
- Quick Start Guide - Get started in 5 minutes
- Deployment Guide - Deploy to production
- Features Overview - Detailed feature list
- Project Structure - Codebase organization
- API Keys Setup - Configure API keys
- Presentation - Project presentation
# Backend tests
cd backend
python -m pytest
# Frontend tests
cd frontend
npm testhackathon/
βββ backend/ # FastAPI backend
β βββ agents/ # Multi-agent system
β βββ api/ # API routes
β βββ config/ # Configuration
β βββ database/ # Database models
β βββ main.py # Entry point
βββ frontend/ # React frontend
β βββ src/
β β βββ components/ # React components
β β βββ services/ # API services
β β βββ store/ # State management
β βββ package.json
βββ README.md
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini API for AI capabilities
- React Flow for graph visualization
- FastAPI for the excellent web framework
- All the open-source libraries that made this possible
For questions or support, please open an issue on GitHub.
Built with β€οΈ for hackathon excellence