RepoDoc is an advanced, AI-powered static analysis platform designed to inspect GitHub repositories. It evaluates code health, predicts bug-prone files using AI, generates dependency graphs, identifies semantic duplicates using CodeBERT, and detects security violations.
- Live Analysis Streaming: Watch the analysis progress in real-time.
- Security & Violation Detection: Scans for hardcoded secrets, missing licenses, and unsafe patterns.
- AI Bug Prediction: Predicts risk levels of files based on complexity, churn, and size.
- Semantic Clone Detection: Uses CodeBERT to find structurally distinct but functionally identical code blocks.
- Architecture Graphing: Generates an interactive Cytoscape dependency graph of the repository modules.
- Actionable Refactoring Suggestions: Provides specific advice on decoupling and simplifying code.
- Report Generation: Export comprehensive PDF, Markdown, and JSON reports.
The platform uses a modern decoupled architecture designed for ephemeral serverless and PaaS deployments.
- Backend: FastAPI (Python)
- Frontend: Next.js (React)
- Deployment Targets: Vercel (Frontend), Render (Backend)
- AI Engine: HuggingFace
transformers(CodeBERT)
- Navigate to the backend directory:
cd backend - Set up a virtual environment and install dependencies:
python -m venv venv source venv/bin/activate # On Windows: venv\\Scripts\\activate pip install -r requirements.txt
- Set up environment variables:
Edit
cp .env.example .env
.envif necessary. - Start the FastAPI server:
The backend runs on
uvicorn src.main:app --reload
http://localhost:8000.
- Navigate to the frontend directory:
cd frontend - Install dependencies:
npm install # or yarn install - Set up environment variables:
Ensure
cp .env.example .env.local
NEXT_PUBLIC_API_URLpoints to your backend. - Start the Next.js development server:
The frontend runs on
npm run dev
http://localhost:3000.
- Create a new Web Service on Render connected to your GitHub repository.
- Set the Root Directory to
backend. - Set the Environment to
Python. - Set the Build Command:
pip install -r requirements.txt
- Set the Start Command (Render provides dynamic ports via
$PORT):uvicorn src.main:app --host 0.0.0.0 --port $PORT - (Optional) Add
render.yamlconfigurations to auto-deploy your infrastructure.
- Create a new project on Vercel and import your repository.
- Set the Root Directory to
frontend. - Vercel will automatically detect Next.js and apply the correct build settings (
npm run build). - Critical: In the Environment Variables section, add:
- Key:
NEXT_PUBLIC_API_URL - Value:
https://your-render-backend-url.onrender.com
- Key:
- Deploy!
The analyzer utilizes ephemeral storage to clone GitHub repositories during analysis. On Render's free tier, the system automatically deletes the cloned directory after the report is sent to the client to immediately free up space for subsequent analyses and prevent hitting disk limits.
MIT License.
