Transform your GitHub repositories into interactive, intelligent documentation
- Intelligent Chat Interface: Ask questions about your codebase in natural language
- Semantic Code Search: Find code by meaning, not just keywords
- Context-Aware Responses: Get answers with file references and code snippets
- Auto-Generated Docs: Create comprehensive documentation from your code
- Interactive Wiki: Browse and search through your codebase structure
- README Enhancement: Improve your README with AI suggestions
- Language Statistics: Visualize your tech stack
- Code Metrics: Track repository size, stars, forks, and activity
- Dependency Insights: Understand your project dependencies
- Rate Limiting: Protect your API with built-in rate limiting
- Error Tracking: Integrated monitoring and error reporting
- Secure Authentication: OAuth integration with Clerk
- Performance Monitoring: Track and optimize application performance
┌─────────────────────────────────────────────────────────────────┐
│ Frontend (Next.js) │
│ ┌──────────────┐ ┌──────────────┐ ┌────────────────────┐ │
│ │ Chat UI │ │ Dashboard │ │ Documentation │ │
│ │ │ │ │ │ Generation │ │
│ └──────────────┘ └──────────────┘ └────────────────────┘ │
└────────────────────────────┬────────────────────────────────────┘
│
│ REST API
│
┌────────────────────────────▼────────────────────────────────────┐
│ API Routes (Next.js) │
│ ┌──────────────┐ ┌──────────────┐ ┌────────────────────┐ │
│ │ /api/query │ │ /api/docs │ │ /api/github │ │
│ │ │ │ │ │ │ │
│ └──────────────┘ └──────────────┘ └────────────────────┘ │
└────────────────────────────┬────────────────────────────────────┘
│
┌──────────────────┼──────────────────┐
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌──────────────┐ ┌──────────────┐
│ Vector DB │ │ PostgreSQL │ │ GitHub API │
│ (Embeddings) │ │ (Metadata) │ │ │
└─────────────────┘ └──────────────┘ └──────────────┘
│ │
│ │
▼ ▼
┌──────────────────────────────────────────────┐
│ AI/ML Services │
│ ┌──────────────┐ ┌────────────────────┐ │
│ │ Google │ │ OpenRouter │ │
│ │ Gemini │ │ (Multi-Model) │ │
│ └──────────────┘ └────────────────────┘ │
└──────────────────────────────────────────────┘
- Framework: Next.js 15.5 (App Router)
- Language: TypeScript 5.0
- Styling: Tailwind CSS 4.1
- UI Components: Radix UI
- State Management: Redux Toolkit
- Forms: React Hook Form + Zod
- Runtime: Node.js 20
- Database: PostgreSQL (Prisma ORM)
- Vector Storage: Custom implementation with embeddings
- Authentication: Clerk
- API: Next.js API Routes
- LLM: Google Gemini + OpenRouter
- Embeddings: LangChain
- Vector Search: Custom RAG implementation
- Deployment: Vercel
- Monitoring: Sentry (configured)
- Testing: Jest + React Testing Library
- Node.js 18+ and npm/yarn
- PostgreSQL database
- GitHub account
- Clerk account (for authentication)
- Google AI API key or OpenRouter API key
- Clone the repository
git clone https://github.com/yourusername/repodoc.git
cd repodoc- Install dependencies
npm install- Set up environment variables
cp .env.example .envEdit .env with your credentials:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/repodoc"
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_xxxxx
CLERK_SECRET_KEY=sk_test_xxxxx
CLERK_WEBHOOK_SECRET=whsec_xxxxx
# AI APIs
GOOGLE_API_KEY=your_google_api_key
OPENROUTER_API_KEY=your_openrouter_key
# GitHub
GITHUB_TOKEN=ghp_xxxxx
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000- Set up the database
npm run db:generate
npm run db:migrate- Run the development server
npm run dev- Open your browser
http://localhost:3000
- Sign in with your GitHub account
- Click "Create Project" in the dashboard
- Enter your repository URL
- Wait for the initial processing
- Navigate to the Chat page
- Ask questions like:
- "How does authentication work?"
- "Explain the database schema"
- "Where is error handling implemented?"
- Get instant answers with code references
- Go to the Docs page
- Click "Generate Documentation"
- Review and customize the generated docs
- Export or share your documentation
- Visit the Dashboard
- View repository statistics
- Analyze language distribution
- Track activity trends
npm testnpm run test:cinpm test -- --coveragenpm run type-checkrepodoc/
├── __tests__/ # Test files
│ ├── components/
│ ├── lib/
│ └── api/
├── prisma/
│ ├── schema.prisma # Database schema
│ └── migrations/ # Database migrations
├── public/ # Static assets
├── src/
│ ├── app/ # Next.js app directory
│ │ ├── (app)/ # Public pages
│ │ ├── (auth)/ # Auth pages
│ │ ├── (protected)/ # Protected pages
│ │ └── api/ # API routes
│ ├── components/ # React components
│ │ ├── ui/ # UI primitives
│ │ └── landing/ # Landing page components
│ ├── context/ # React contexts
│ ├── hooks/ # Custom hooks
│ ├── lib/ # Utility libraries
│ │ ├── actions.ts # Server actions
│ │ ├── github.ts # GitHub integration
│ │ ├── rag.ts # RAG implementation
│ │ ├── monitoring.ts # Error tracking
│ │ └── rate-limiter.ts # Rate limiting
│ └── provider/ # Context providers
├── .env.example # Environment variables template
├── jest.config.js # Jest configuration
├── next.config.ts # Next.js configuration
└── package.json # Dependencies
- ✅ Rate limiting on all API endpoints
- ✅ Input validation with Zod
- ✅ SQL injection protection (Prisma)
- ✅ XSS protection (Next.js built-in)
- ✅ CSRF protection
- ✅ Secure authentication (Clerk)
- ✅ Environment variable validation
If you discover a security vulnerability, please email security@repodoc.dev. Do not create public GitHub issues for security vulnerabilities.
- ✅ Server-side rendering (SSR)
- ✅ Static site generation (SSG)
- ✅ Image optimization (Next.js Image)
- ✅ Code splitting
- ✅ Tree shaking
- ✅ Compression (gzip/brotli)
- ✅ CDN caching
- ✅ Database query optimization
- ✅ Redis caching (planned)
- Lighthouse Score: 95+
- First Contentful Paint: < 1.5s
- Time to Interactive: < 3.0s
- Total Blocking Time: < 200ms
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style
- Run
npm run lintbefore committing - Write tests for new features
- Update documentation as needed
- Next.js - The React Framework
- Vercel - Hosting Platform
- Clerk - Authentication
- Google AI - AI/ML Services
- Radix UI - UI Components
- Tailwind CSS - Styling
- 📧 Email: parbhat@parbhat.dev
Made by Parbhat Kapila
