AI-powered API documentation generator that automatically scans repositories, discovers endpoints, and creates beautiful, interactive documentation.
This platform follows a microservices architecture organized as a monorepo, enabling independent scaling, technology-specific optimizations, and improved maintainability.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FRONTEND β
β (Next.js 14 / React 18) β
β http://localhost:3000 β
ββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β API GATEWAY β
β (Node.js / Express / TypeScript) β
β http://localhost:8000 β
β β’ Authentication & JWT β
β β’ Rate Limiting & Security β
β β’ Request Routing β
ββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββ
β β
βΌ βΌ
ββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββ
β SCANNER SERVICE β β AI SERVICE β
β (Go / Gin Framework) β β (Python / FastAPI) β
β http://localhost:3001 β β http://localhost:3002 β
β β β β
β β’ Git Repository Cloning β β β’ Gemini AI Integration β
β β’ Identifier-First Scan β β β’ Doc Generation β
β β’ Multi-Framework Support β β β’ Endpoint Analysis β
β β’ Pattern Detection β β β
ββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββ
- π Automatic API Discovery - Scans GitHub repositories to find API endpoints
- β‘ Identifier-First Scanning - Optimized two-stage scanning (5-20% files processed)
- π― Multi-Framework Support - Python, JavaScript, TypeScript, Go, Java, C#
- π€ AI-Powered Documentation - Uses Gemini AI to generate comprehensive docs
- π¨ Beautiful UI - Glass-morphism design with dark mode
- π GitHub OAuth - Secure authentication with GitHub
- π Health Monitoring - Track API health and uptime
- π§ͺ API Playground - Test endpoints directly in the browser
- π₯ Team Collaboration - Invite team members and manage access
- π³ Billing & Plans - Stripe-ready subscription management
| Service | Technology | Port | Description |
|---|---|---|---|
| Frontend | Next.js 14, React 18, TypeScript, TailwindCSS | 3000 | User interface |
| Gateway | Node.js, Express, TypeScript | 8000 | API Gateway, Auth, Routing |
| Scanner | Go, Gin Framework | 3001 | Repository scanning, endpoint detection |
| AI | Python, FastAPI, Gemini API | 3002 | AI documentation generation |
| Component | Technology |
|---|---|
| Database | PostgreSQL 16 |
| Cache | Redis |
| Auth | GitHub OAuth, JWT |
| Deployment | Docker, Docker Compose, Vercel, Render |
api-auto-doc/
βββ frontend/ # Next.js 14 Frontend
β βββ src/
β β βββ app/ # App router pages
β β βββ components/ # React components
β β βββ lib/ # Utilities & API clients
β β βββ hooks/ # Custom React hooks
β βββ package.json
β
βββ services/ # Microservices
β βββ gateway/ # API Gateway (Node.js/Express)
β β βββ src/
β β β βββ routes/ # API route handlers
β β β βββ middleware/ # Auth, rate limiting, logging
β β βββ package.json
β β
β βββ scanner/ # Scanner Service (Go)
β β βββ cmd/server/ # Entry point
β β βββ internal/
β β β βββ scanner/ # Core scanning logic
β β β βββ handlers/ # HTTP handlers
β β βββ go.mod
β β
β βββ ai/ # AI Service (Python/FastAPI)
β βββ app/
β β βββ routes/ # API endpoints
β β βββ services/ # Gemini AI integration
β βββ requirements.txt
β
βββ docs/ # Documentation
β βββ architecture/ # Architecture docs
β βββ api/ # API reference
β
βββ docker-compose.yml # Local development orchestration
βββ .env.example # Environment template
βββ start.ps1 # Windows quick start script
- Node.js >= 20.x
- Go >= 1.21
- Python >= 3.11
- Docker & Docker Compose (optional)
- GitHub OAuth App credentials
- Google Gemini API key
# Clone repository
git clone https://github.com/palash32/api-auto-doc.git
cd api-auto-doc
# Copy environment file
cp .env.example .env
# Edit .env with your credentials (GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, GEMINI_API_KEY)
# Terminal 1 - Scanner Service (Go)
cd services/scanner
go build -o scanner.exe ./cmd/server
./scanner.exe
# Running on http://localhost:3001
# Terminal 2 - Gateway Service (Node.js)
cd services/gateway
npm install
npm run dev
# Running on http://localhost:8000
# Terminal 3 - AI Service (Python) [Optional]
cd services/ai
pip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 3002
# Running on http://localhost:3002
# Terminal 4 - Frontend (Next.js)
cd frontend
npm install
npm run dev
# Running on http://localhost:3000# Clone and start all services
git clone https://github.com/palash32/api-auto-doc.git
cd api-auto-doc
# Configure environment
cp .env.example .env
# Edit .env with your credentials
# Start all services
docker-compose up -d
# Access the platform
open http://localhost:3000The Go-based scanner implements an efficient two-stage scanning approach:
- Quickly scans files for API framework indicators
- Filters out ~80-95% of non-API files
- Supports patterns for multiple frameworks
- Only processes files that passed Stage 1
- Extracts endpoint details: method, path, line number
- Multi-framework regex patterns
| Language | Frameworks |
|---|---|
| Python | FastAPI, Flask, Django |
| JavaScript/TypeScript | Express, NestJS, Fastify |
| Go | Gin, Echo, Fiber, net/http |
| Java | Spring Boot (@GetMapping, @PostMapping) |
| C# | ASP.NET ([HttpGet], [Route]) |
- Typical scan: Only 5-20% of files processed
- Real-time progress logging
- Git repository cloning with authentication
# Scanner Service Tests (Go)
cd services/scanner
go test -v ./internal/scanner/...
# Gateway Service Tests (Node.js)
cd services/gateway
npm test
# Frontend Tests (React)
cd frontend
npm test- Go to https://github.com/settings/developers
- Create a new OAuth App:
- Homepage URL:
http://localhost:3000 - Callback URL:
http://localhost:8000/api/auth/github/callback
- Homepage URL:
- Copy Client ID and Client Secret to your
.envfile
See GITHUB_OAUTH_SETUP.md for detailed instructions.
βββββββββββββββββββ
β Cloudflare β
β (CDN/SSL) β
ββββββββββ¬βββββββββ
β
ββββββββββββββββ΄βββββββββββββββ
β β
βββββββββββΌββββββββββ βββββββββββββΌβββββββββββ
β Vercel β β Render β
β (Frontend) β β (Services) β
βββββββββββββββββββββ β βββββββββββββββββ β
β β Gateway β β
β βββββββββββββββββ€ β
β β Scanner β β
β βββββββββββββββββ€ β
β β AI β β
β βββββββββββββββββ β
βββββββββββ¬βββββββββββββ
β
βββββββββββΌββββββββββ
β Neon/Supabase β
β (PostgreSQL) β
βββββββββββββββββββββ
# Frontend to Vercel
cd frontend
vercel deploy --prod
# Services to Render
# Use render.yaml for Blueprint deployment- Architecture Overview
- Scanner Service Guide
- Gateway Service Guide
- AI Service Guide
- GitHub OAuth Setup
We welcome contributions! See CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License - see LICENSE file.
Built with β€οΈ - Microservices Architecture v2.0