Automated codebase analysis and documentation platform powered by AI
CodeExp AI is a comprehensive platform that automatically analyzes codebases, generates documentation, creates dependency diagrams, and provides intelligent Q&A capabilities for software repositories.
- Automatic Code Analysis: Parse and understand codebases using tree-sitter
- AI-Powered Summaries: Generate function/class summaries and documentation
- Intelligent Q&A: Ask questions about your codebase and get grounded answers
- Visual Diagrams: Create dependency graphs and call diagrams
- Multi-Language Support: Python, JavaScript/TypeScript, Go, C++, and more
- Real-time Processing: Track analysis progress with live updates
- Export Capabilities: Generate documentation in multiple formats
- Frontend: React 18 + TypeScript + Tailwind CSS + shadcn/ui
- Backend API: Go (Gin framework) with JWT authentication
- AI Service: Python (FastAPI) + Hugging Face Transformers
- Database: PostgreSQL with pgvector extension
- Cache & Jobs: Redis for job queues and caching
- Infrastructure: Docker + Docker Compose
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Frontend βββββΆβ Go API βββββΆβ Python AI β
β (React) β β (Gateway) β β (Analysis) β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β β
βΌ βΌ
βββββββββββββββ βββββββββββββββ
β PostgreSQL β β Redis β
β + pgvector β β (Jobs/Cache)β
βββββββββββββββ βββββββββββββββ
- Docker & Docker Compose
- Node.js 18+ with pnpm
- Git
-
Clone the repository
git clone https://github.com/Tukesh1/codexp-ai.git cd codexp-ai
-
Run setup script
make setup
-
Start development environment
make dev
-
Access the application
- Frontend: http://localhost:3000
- API: http://localhost:8080
- AI Service: http://localhost:8000
If you prefer manual setup:
# Install dependencies
pnpm install
# Create environment file
cp .env.example .env
# Start services
docker-compose up -d
codexp-ai/
βββ apps/ # Frontend applications
β βββ web/ # Main web application
β βββ admin/ # Admin dashboard
β βββ landing/ # Landing page
β βββ mobile/ # Mobile app (React Native)
βββ backend/ # Backend services
β βββ api/ # Go API service
β βββ ai-service/ # Python AI service
βββ packages/ # Shared packages
β βββ ui/ # UI component library
β βββ typescript-config/ # TypeScript configurations
β βββ eslint-config/ # ESLint configurations
βββ docker-compose.yml # Development environment
# Development
make dev # Start development environment
make logs # View all service logs
make ps # Check service status
# Building
make build # Build all Docker images
make clean # Clean up containers and volumes
# Testing
make test # Run all tests
make lint # Run linters
# Database
make db-shell # Connect to PostgreSQL
make db-reset # Reset database
- Phase 1 (Week 1-2): Core infrastructure and repository parsing
- Phase 2 (Week 3-4): AI-powered analysis and frontend
- Phase 3 (Week 5-6): Advanced features and monetization
- Phase 4 (Week 7-8): Production readiness and launch
Copy .env.example
to .env
and configure:
# Database
DATABASE_URL=postgresql://codeexp:secure_password@localhost:5432/codeexp
# Authentication (Clerk)
CLERK_SECRET_KEY=your_clerk_secret
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
# GitHub Integration
GITHUB_APP_ID=your_app_id
GITHUB_APP_PRIVATE_KEY=your_private_key
# AI Service
HUGGINGFACE_API_KEY=your_hf_token
# Payments (Stripe)
STRIPE_SECRET_KEY=your_stripe_secret
- postgres: PostgreSQL 16 with pgvector extension
- redis: Redis 7 for job queues and caching
- api: Go API service (port 8080)
- ai-service: Python AI service (port 8000)
- frontend: React application (port 3000)
POST /auth/webhook
- Clerk webhook handlerGET /auth/me
- Get current user
GET /projects
- List user projectsPOST /projects
- Create new projectGET /projects/{id}
- Get project detailsDELETE /projects/{id}
- Delete project
POST /projects/{id}/analyze
- Start repository analysisGET /projects/{id}/status
- Get analysis statusGET /projects/{id}/summary
- Get project summaryPOST /projects/{id}/ask
- Ask questions about code
GET /projects/{id}/diagram
- Get dependency diagramGET /projects/{id}/docs
- Get generated documentation
# Run all tests
make test
# Run specific service tests
docker-compose exec api go test ./...
docker-compose exec ai-service python -m pytest
# Run frontend tests
cd apps/web && npm test
# Build production images
docker-compose -f docker-compose.prod.yml build
# Deploy to production
docker-compose -f docker-compose.prod.yml up -d
- Database: PostgreSQL with pgvector on Railway/Supabase
- Cache: Redis Cloud/Upstash
- API: Deploy Go service to Fly.io/Render
- AI Service: Deploy Python service to Render/Railway
- Frontend: Deploy to Vercel
- Storage: S3/Cloudflare R2 for artifacts
- Health Checks:
/health
endpoints on all services - Logging: Structured JSON logs
- Metrics: Application performance monitoring
- Alerts: Error tracking with Sentry
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE.md file for details.