An intelligent AI-powered platform that helps developers understand codebases and analyze meetings through advanced RAG (Retrieval Augmented Generation) and audio transcription.
๐ Live Demo: diagnose-ai.vercel.app
Diagnose AI is a full-stack SaaS application that bridges the gap between developers and their codebases. Onboard onto any GitHub repository in minutes by asking natural language questions about the code, get AI-generated commit summaries, and analyze team meetings through intelligent transcription and issue extraction.
- GitHub Repository Indexing โ Index any public GitHub repo with file-level summaries
- Vector Embeddings โ Store code embeddings using pgvector for semantic search
- Q&A System โ Ask natural language questions and get AI-generated answers with file references
- Saved Questions โ Save important Q&A sessions for future reference
- Auto Commit Summarization โ AI analyzes commit diffs and generates human-readable summaries
- Author Tracking โ See who made each commit with timestamps
- GitHub Integration โ Direct links to original commits
- Audio Upload โ Upload meeting recordings (MP3, WAV, M4A) up to 50MB
- Whisper Transcription โ Powered by Groq Whisper for fast, accurate transcription
- Issue Extraction โ LLM extracts key topics, action items, and decisions with timestamps
- Project-Linked โ Meetings are exclusive to projects, keeping discussions contextual to specific codebases
- Invite Members โ Generate shareable invite links for team projects
- Multi-User Projects โ Multiple users can collaborate on the same project
- Pay-Per-Use โ 1 credit = 1 file indexed
- Razorpay Integration โ Secure Indian payment gateway with UPI/Card support
- Credit Tracking โ Monitor credit usage and balance in real-time
The application follows a modern serverless architecture with type-safe communication between layers.
Frontend Layer (Next.js 15 App Router)
- Dashboard, Q&A, Meetings, Billing pages
- Server and Client components for optimal performance
- Real-time updates via TanStack Query
API Layer (tRPC)
- Type-safe procedures for all queries and mutations
- End-to-end type safety from server to client
- Protected procedures with Clerk authentication
Data Layer
- PostgreSQL (Neon) with pgvector extension for vector similarity search
- Prisma ORM for type-safe database access
- 384-dimensional embeddings for semantic search
External Services
- Groq for LLM inference and audio transcription
- HuggingFace for embedding generation
- Uploadthing for file storage
- Razorpay for payment processing
Repository Indexing: GitHub URL โ Load Files โ Filter Code Files โ Summarize each file (Groq Llama) โ Generate embedding (HF BGE) โ Store in pgvector
Q&A System: User Question โ Generate query embedding โ Vector similarity search (pgvector) โ Top 10 relevant files โ Build context โ Generate answer (Groq Llama) โ Display with file references
Meeting Processing: Audio Upload (Uploadthing) โ Save to DB โ Transcribe (Groq Whisper) โ Extract issues (Groq Llama) โ Save issues to DB โ Display on meeting detail page
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS + shadcn/ui
- State Management: TanStack Query
- Forms: React Hook Form
- Markdown: react-md-editor
- API Layer: tRPC
- ORM: Prisma
- Database: PostgreSQL (Neon) with pgvector
- Authentication: Clerk
- LLM: Groq Cloud (Llama 3.1 8B Instant)
- Audio Transcription: Groq Whisper Large V3
- Embeddings: HuggingFace BGE Small EN v1.5 (384 dimensions)
- File Storage: Uploadthing
- Hosting: Vercel
- Payments: Razorpay
The application uses a relational schema with the following key models:
- User โ Authenticated users with credit balance
- Project โ GitHub repositories linked to users
- UserToProject โ Many-to-many relationship for team collaboration
- SourceCodeEmbedding โ Vector embeddings (384 dim) of code files
- Commit โ AI-summarized git commits
- Question โ Saved Q&A sessions with file references
- Meeting โ Audio meetings linked to a specific project
- Issue โ Extracted topics from meetings with timestamps
Relationships:
- A User can have multiple Projects (via UserToProject)
- A Project has many Commits, SourceCodeEmbeddings, Questions, and Meetings
- A Meeting has many Issues
- Each Question belongs to a User and a Project
- Node.js 18+
- PostgreSQL with pgvector extension (or Neon account)
- API keys for: Clerk, Groq, HuggingFace, Uploadthing, Razorpay, GitHub
# Clone the repository
git clone https://github.com/yash600/diagnose_ai.git
cd diagnose_ai
# Install dependencies
npm install --legacy-peer-deps
# Setup environment variables
cp .env.example .env
# Run database migrations
npx prisma migrate dev
# Start development server
npm run dev# Database
DATABASE_URL="postgresql://..."
DIRECT_URL="postgresql://..."
# Authentication (Clerk)
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL=/sync-user
# AI APIs
GROQ_API_KEY=
HUGGINGFACE_API_KEY=
GITHUB_TOKEN=
# File Storage
UPLOADTHING_TOKEN=
# Payments
RAZORPAY_KEY_ID=
RAZORPAY_KEY_SECRET=
NEXT_PUBLIC_RAZORPAY_KEY_ID=
# Application
NEXT_PUBLIC_APP_URL=http://localhost:3000Users sign up via Clerk authentication. On first sign-in, a database record is automatically created via the sync-user route, and 150 free credits are allocated to get started.
- Enter a GitHub URL and project name
- The system checks how many files the repo has
- User is prompted to confirm credit deduction
- Repository is indexed in the background with a real-time progress bar
- Commits are also fetched and summarized
- Type a natural language question about the codebase
- Vector similarity search retrieves the top 10 most relevant files
- AI generates a contextual answer with file references
- Important Q&A sessions can be saved for future reference
Important: Meetings are exclusive to a specific project. This design choice ensures that meeting context is always relevant to the codebase being discussed.
The flow is:
- Select an active project
- Upload an audio file (MP3, WAV, M4A)
- File is uploaded to Uploadthing storage
- Background job transcribes audio with Groq Whisper
- LLM extracts key topics and action items
- Issues are saved with timestamps and shown on the meeting detail page
- Use the slider to select credit amount
- Click buy to open Razorpay checkout
- Pay via UPI, Card, or Netbanking
- Credits are added instantly after payment verification
- Speed: 10x faster inference times
- Cost: Generous free tier sufficient for development
- Whisper Support: Built-in audio transcription with the same API
- Free: No cost for inference API on free tier
- BGE Models: Industry-leading embedding quality
- 384 dimensions: Smaller storage footprint compared to OpenAI's 1536 dimensions
- Next.js Native: Built specifically for Next.js applications
- Simpler Setup: No AWS configuration needed
- Generous Free Tier: 2GB storage included
Meetings are tied to specific projects because:
- Different projects have different contexts and codebases
- Team members often work across multiple repositories
- Issues from meetings frequently reference specific code in that project
- Keeps Q&A context relevant to the project being discussed
- Prevents information overload from unrelated meetings
- Type Safety: End-to-end type safety from database to UI
- Developer Experience: Auto-completion for all API calls
- No Code Generation: Types are inferred automatically
- Smaller Bundle: No need for OpenAPI schemas or generated clients
- Real-time collaborative Q&A sessions
- Slack integration for direct meeting uploads
- Custom domain support for production Clerk instance
- Multi-language support for transcription
- Advanced commit analytics dashboard
- Meeting search across all projects
- Export meetings to PDF or Markdown
- Webhook integrations with Linear and Jira
- Larger repository support with chunked indexing
- Code change suggestions powered by AI
- File Limit: 30 files per repository on free tier
- Audio Size: 50MB maximum per meeting upload
- Rate Limits: Groq has 6000 tokens-per-minute limit on free tier
- Payment Region: Razorpay test mode supports Indian payments only
- Clerk Production: Requires custom domain for production instance
MIT License โ Feel free to use this project for learning and portfolio purposes.
Yash Vardhan Malik
- Email: yash60066@gmail.com
- GitHub: @yash600
- Vercel โ Hosting platform
- Neon โ Serverless PostgreSQL
- Groq โ Fast LLM inference
- Clerk โ Authentication
- shadcn/ui โ UI components
- Uploadthing โ File storage
- HuggingFace โ Embedding models
โญ If you found this project helpful, please give it a star on GitHub!