AI-Powered Code Review & Repository Intelligence Platform
Features β’ Tech Stack β’ Architecture β’ Getting Started β’ Documentation
Inspectra is an intelligent, AI-powered code review assistant and repository management platform designed to streamline your development workflow. By leveraging advanced LLMs (Google Gemini) and RAG (Retrieval-Augmented Generation) technology with Pinecone vector database, Inspectra provides deep, context-aware insights into your code, automates reviews, and offers comprehensive analytics for your GitHub repositories.
- π€ Context-Aware AI Reviews: Unlike generic code reviewers, Inspectra indexes your entire codebase to understand project patterns and conventions
- π Deep GitHub Integration: Seamless webhook-based automation for real-time PR reviews
- π¬ Automated PR Comments: AI-generated reviews posted directly to your Pull Requests
- π Rich Analytics: Comprehensive dashboards with contribution graphs and activity metrics
- β‘ Background Processing: Inngest-powered async jobs for reliable, scalable operations
- Automated review generation for Pull Requests using Google Gemini AI
- RAG-based context retrieval from your indexed codebase via Pinecone
- Rich feedback including walkthroughs, summaries, issue identification, and suggestions
- OAuth-based authentication via GitHub
- Multi-repository management with connect/disconnect workflow
- Webhook automation for real-time PR handling
- Direct comments and reviews posted to GitHub PRs
- Automatic codebase indexing using vector embeddings
- Semantic search across your entire project
- Context-aware code understanding for accurate reviews
- Real-time statistics on repositories, commits, and PRs
- Interactive contribution graphs (GitHub-style activity calendar)
- Monthly activity breakdowns and trend analysis
- Secure GitHub OAuth via Better Auth
- Profile management and customization
- Session handling with automatic token refresh
- Inngest-powered async job processing
- Repository indexing workflows
- Reliable webhook event handling
| Technology | Purpose |
|---|---|
| Next.js 16 | React framework with App Router |
| React 19 | UI library with latest features |
| TypeScript | Type-safe development |
| Tailwind CSS 4 | Utility-first styling |
| shadcn/ui | Pre-built accessible components |
| Radix UI | Headless UI primitives |
| TanStack Query | Server state management |
| Recharts | Data visualization |
| Framer Motion | Animations |
| Technology | Purpose |
|---|---|
| Next.js API Routes | RESTful API endpoints |
| Server Actions | Type-safe server mutations |
| Prisma ORM | Database access layer |
| PostgreSQL | Primary database |
| Pinecone | Vector database for RAG |
| Inngest | Background job processing |
| Better Auth | Authentication system |
| Technology | Purpose |
|---|---|
| OpenRouter | AI model gateway |
| Qwen3 Coder | LLM for code analysis |
| Google Gemini | Embedding generation |
| Vercel AI SDK | AI integration framework |
| Pinecone | Vector similarity search |
| Technology | Purpose |
|---|---|
| Octokit | GitHub API client |
| GitHub Webhooks | Real-time event handling |
| Zod | Schema validation |
| React Hook Form | Form handling |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β USER BROWSER β
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ βββββββββββββββ β
β β Landing β β Dashboard β β Repository β β Settings β β
β β Page β β Page β β Page β β Page β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β NEXT.JS APP ROUTER β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β API ROUTES β β
β β βββββββββββββββ βββββββββββββββ βββββββββββββββ β β
β β β /api/auth β β/api/webhooksβ β /api/inngestβ β β
β β β (Better Authβ β (GitHub) β β (Jobs) β β β
β β βββββββββββββββ βββββββββββββββ βββββββββββββββ β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β SERVER ACTIONS β β
β β βββββββββββββββ βββββββββββββββ βββββββββββββββ β β
β β β Repository β β Settings β β Dashboard β β β
β β β Actions β β Actions β β Actions β β β
β β βββββββββββββββ βββββββββββββββ βββββββββββββββ β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββββ βββββββββββββββ βββββββββββββββββββ
β PostgreSQL β β Pinecone β β Inngest β
β (Prisma) β β (Vectors) β β(Background Jobs)β
ββββββββββββββββ βββββββββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Google Gemini β
β (AI/LLM) β
βββββββββββββββββββ
ββββββββββββ ββββββββββββββ βββββββββββββββ ββββββββββββββββ
β User βββββΆβ Connect βββββΆβ Create βββββΆβ Trigger β
β Clicks β β Repository β β Webhook β β Inngest β
β "Connect"β β Action β β on GitHub β β Event β
ββββββββββββ ββββββββββββββ βββββββββββββββ ββββββββββββββββ
β
βΌ
ββββββββββββ ββββββββββββββ βββββββββββββββ ββββββββββββββββ
β Stored βββββ Upsert βββββ Generate βββββ Fetch All β
β in β β to Pineconeβ β Embeddings β β Repo Files β
β Pinecone β β (Batched) β β (Google AI) β β (Octokit) β
ββββββββββββ ββββββββββββββ βββββββββββββββ ββββββββββββββββ
ββββββββββββ ββββββββββββββ βββββββββββββββ ββββββββββββββββ
β GitHub βββββΆβ Webhook βββββΆβ reviewPull- βββββΆβ Inngest β
β PR β β Handler β β Request() β β Event β
β Event β β β β Action β β pr.review.* β
ββββββββββββ ββββββββββββββ βββββββββββββββ ββββββββββββββββ
β
βΌ
ββββββββββββ ββββββββββββββ βββββββββββββββ ββββββββββββββββ
β fetch- βββββΆβ retrieve- βββββΆβ generate- βββββΆβ post-comment β
β pr-data β β context β β ai-review β β & save-reviewβ
β (Octokit)β β (Pinecone) β β (OpenRouter)β β (GitHub/DB) β
ββββββββββββ ββββββββββββββ βββββββββββββββ ββββββββββββββββ
inspectra/
βββ app/ # Next.js App Router
β βββ (auth)/ # Authentication routes
β β βββ login/ # Login page
β βββ (dashboard)/ # Protected dashboard routes
β β βββ dashboard/ # Main dashboard
β β βββ repository/ # Repository management
β β βββ settings/ # User settings
β βββ api/ # API routes
β β βββ auth/ # Better Auth endpoints
β β βββ inngest/ # Inngest webhook handler
β β βββ webhooks/github/ # GitHub webhook receiver
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ page.tsx # Landing page
β
βββ components/ # React components
β βββ ui/ # shadcn/ui components
β βββ landing/ # Landing page components
β
βββ inngest/ # Background job definitions
β βββ client.ts # Inngest client
β βββ functions/ # Job functions
β βββ index.ts # Repository indexing jobs
β βββ review.ts # AI code review job
β
βββ lib/ # Shared utilities
β βββ auth.ts # Better Auth configuration
β βββ db.ts # Prisma client
β βββ pinecone.ts # Pinecone client
β βββ generated/prisma/ # Generated Prisma client
β
βββ module/ # Feature modules
β βββ ai/ # AI module
β β βββ actions/ # Server actions
β β β βββ index.ts # reviewPullRequest action
β β βββ lib/
β β β βββ openrouter.ts # OpenRouter provider
β β β βββ rag.ts # RAG implementation
β β βββ prompt.ts # AI prompt generator
β βββ auth/ # Auth components & hooks
β βββ dashboard/ # Dashboard components
β βββ github/ # GitHub integration
β β βββ lib/
β β βββ github.ts # Octokit utilities
β βββ repository/ # Repository management
β βββ settings/ # Settings management
β
βββ prisma/ # Database schema
β βββ schema.prisma # Prisma schema definition
β
βββ providers/ # React context providers
βββ public/ # Static assets
βββ docs/ # Documentation
- Node.js (v18 or later, LTS recommended)
- Bun (recommended) or npm/pnpm
- PostgreSQL database
- GitHub Account with OAuth App credentials
- Google AI (Gemini) API Key
- Pinecone API Key and Index
Create a .env file in the root directory:
# Database
DATABASE_URL="postgresql://user:password@host:5432/database?sslmode=require"
# Better Auth
BETTER_AUTH_SECRET="your-secret-key"
BETTER_AUTH_URL="http://localhost:3000"
# GitHub OAuth
GITHUB_CLIENT_ID="your-github-client-id"
GITHUB_CLIENT_SECRET="your-github-client-secret"
# AI & Vector Database
GOOGLE_API_KEY="your-google-ai-api-key"
OPENROUTER_API_KEY="your-openrouter-api-key"
PINECONE_DB_API_KEY="your-pinecone-api-key"
# Application
NEXT_PUBLIC_APP_BASE_URL="http://localhost:3000"-
Clone the repository
git clone https://github.com/krishna9358/inspectra.git cd inspectra -
Install dependencies
bun install # or npm install -
Set up the database
npx prisma generate npx prisma db push
-
Start the development server
bun run dev
-
Start Inngest Dev Server (in a separate terminal)
npx --ignore-scripts=false inngest-cli@latest dev
-
Open http://localhost:3000 to view the application.
Detailed documentation is available in the /docs directory:
- Architecture Overview - System design and data flow
- API Reference - API endpoints and server actions
- GitHub Integration - Webhooks and OAuth setup
- RAG Implementation - Vector embeddings and retrieval
- Inngest Jobs - Background job processing
- Database Schema - Prisma models and relationships
| Script | Description |
|---|---|
bun run dev |
Start development server |
bun run build |
Build for production |
bun run start |
Start production server |
bun run lint |
Run ESLint |
bun run test |
Run tests |
bun run prettier |
Format code |
bun run testContributions are welcome! Please read our contributing guidelines before submitting a PR.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ by Krishna Mohan