Code Horse is an intelligent, AI-powered code review assistant designed to streamline your development workflow. By connecting directly with your GitHub repositories, Code Horse automatically analyzes pull requests, providing instant, context-aware feedback to help maintain code quality and catch issues early.
- 🤖 AI-Powered Code Reviews: Leverages advanced LLMs (via Vercel AI SDK) to provide deep, meaningful code analysis on every PR.
- 🧠 RAG Context Awareness: Utilizes Pinecone and Retrieval-Augmented Generation (RAG) to understand the full context of your codebase, not just the diff.
- 🔗 Seamless GitHub Integration: Connects easily with your GitHub account to import repositories and monitor pull requests automatically.
- 📊 Interactive Dashboard: A comprehensive overview of your repositories, review history, and coding activity.
- 💳 Subscription Management: Integrated with Polar.sh for seamless subscription handling and usage limits.
- ⚡ Real-time Updates: Powered by Inngest for reliable background job processing and event handling.
- Framework: Next.js 16 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS v4
- UI Components: Radix UI, Lucide React, Shadcn UI
- Database: PostgreSQL (via Prisma ORM)
- Authentication: Better Auth
- AI & Vector: Vercel AI SDK, Pinecone
- Background Jobs: Inngest
- Payments: Polar.sh
- State Management: TanStack Query
For a deeper dive into the system architecture and data flow, check out ARCHITECTURE.md.
Overview of your coding activity and review status.

Manage your connected GitHub repositories.

Detailed AI-generated feedback on your pull requests.

Configure your preferences and account details.

Manage your plan and usage limits.

- Node.js (v18+)
- pnpm, npm, or bun
- PostgreSQL database
- GitHub OAuth App credentials
- Pinecone API Key
- Google AI API Key (Gemini)
-
Clone the repository:
git clone https://github.com/amaan-ur-raheman/codehorse.git cd code-horse -
Install dependencies:
npm install # or pnpm install # or bun install
-
Set up Environment Variables: Create a
.envfile in the root directory and add the following variables:# Database DATABASE_URL="postgresql://user:password@localhost:5432/code_horse?schema=public" # Authentication (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 (Google Gemini) GOOGLE_GENERATIVE_AI_API_KEY="your_google_api_key" # Vector DB (Pinecone) PINECONE_API_KEY="your_pinecone_api_key" # Background Jobs (Inngest) INNGEST_EVENT_KEY="your_inngest_event_key" INNGEST_SIGNING_KEY="your_inngest_signing_key" # Payments (Polar.sh) POLAR_ACCESS_TOKEN="your_polar_access_token"
-
Database Setup: Run the Prisma migrations to set up your database schema.
npx prisma generate npx prisma migrate dev
-
Run the Development Server:
npm run dev # or pnpm dev # or bun dev
Open http://localhost:3000 with your browser to see the result.
-
Run Inngest Dev Server: In a separate terminal, run Inngest to handle background jobs.
npx inngest-cli@latest dev
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
