https://github.com/amaan-ur-raheman/codehorse
Code Horse is an intelligent AI-powered code review assistant that automates the analysis of pull requests. By integrating with GitHub and utilizing Retrieval-Augmented Generation (RAG) with Pinecone and Gemini, it provides context-aware, deep architectural feedback to maintain high code quality and streamline developer workflows.
https://github.com/amaan-ur-raheman/codehorse
ai automation code-review full-stack nextjs pinecone prisma rag typescript
Last synced: about 1 month ago
JSON representation
Code Horse is an intelligent AI-powered code review assistant that automates the analysis of pull requests. By integrating with GitHub and utilizing Retrieval-Augmented Generation (RAG) with Pinecone and Gemini, it provides context-aware, deep architectural feedback to maintain high code quality and streamline developer workflows.
- Host: GitHub
- URL: https://github.com/amaan-ur-raheman/codehorse
- Owner: amaan-ur-raheman
- Created: 2025-12-17T14:32:55.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-01-24T05:09:04.000Z (5 months ago)
- Last Synced: 2026-01-24T08:57:57.395Z (5 months ago)
- Topics: ai, automation, code-review, full-stack, nextjs, pinecone, prisma, rag, typescript
- Language: TypeScript
- Homepage: https://codehorse.vercel.app
- Size: 4.12 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Code Horse 🐴
[](https://codehorse.vercel.app)

**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.
## 🚀 Key Features
* **🤖 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.
## 🛠️ Tech Stack
* **Framework:** [Next.js 16](https://nextjs.org/) (App Router)
* **Language:** [TypeScript](https://www.typescriptlang.org/)
* **Styling:** [Tailwind CSS v4](https://tailwindcss.com/)
* **UI Components:** [Radix UI](https://www.radix-ui.com/), [Lucide React](https://lucide.dev/), [Shadcn UI](https://ui.shadcn.com/)
* **Database:** [PostgreSQL](https://www.postgresql.org/) (via [Prisma ORM](https://www.prisma.io/))
* **Authentication:** [Better Auth](https://better-auth.com/)
* **AI & Vector:** [Vercel AI SDK](https://sdk.vercel.ai/), [Pinecone](https://www.pinecone.io/)
* **Background Jobs:** [Inngest](https://www.inngest.com/)
* **Payments:** [Polar.sh](https://polar.sh/)
* **State Management:** [TanStack Query](https://tanstack.com/query/latest)
> For a deeper dive into the system architecture and data flow, check out [ARCHITECTURE.md](./ARCHITECTURE.md).
## 📸 Screenshots
### Dashboard
Overview of your coding activity and review status.

### Repositories
Manage your connected GitHub repositories.

### Reviews
Detailed AI-generated feedback on your pull requests.

### Settings
Configure your preferences and account details.

### Subscriptions
Manage your plan and usage limits.

## 🏁 Getting Started
### Prerequisites
* Node.js (v18+)
* pnpm, npm, or bun
* PostgreSQL database
* GitHub OAuth App credentials
* Pinecone API Key
* Google AI API Key (Gemini)
### Installation
1. **Clone the repository:**
```bash
git clone https://github.com/amaan-ur-raheman/codehorse.git
cd code-horse
```
2. **Install dependencies:**
```bash
npm install
# or
pnpm install
# or
bun install
```
3. **Set up Environment Variables:**
Create a `.env` file in the root directory and add the following variables:
```env
# 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"
```
4. **Database Setup:**
Run the Prisma migrations to set up your database schema.
```bash
npx prisma generate
npx prisma migrate dev
```
5. **Run the Development Server:**
```bash
npm run dev
# or
pnpm dev
# or
bun dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
6. **Run Inngest Dev Server:**
In a separate terminal, run Inngest to handle background jobs.
```bash
npx inngest-cli@latest dev
```
## 🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the project
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.