An AI-powered code generation and review platform. Connect your GitHub repository, describe what you want to build, and let AI generate the code. Review changes like a pull request, comment on specific lines, and iterate until it's perfect.
- GitHub Integration: Connect any GitHub repository via OAuth
- AI Chat Planning: Discuss your requirements with Claude AI
- Code Generation: AI generates production-ready code changes
- Diff Review: View changes in a familiar PR-style diff viewer
- Inline Comments: Comment on specific lines and get AI responses
- Iterative Refinement: AI modifies code based on your feedback
- Apply Changes: Create branches and pull requests directly
- Frontend: Next.js 16, React 19, TypeScript, Tailwind CSS
- Backend: Next.js API Routes
- Database: SQLite with Knex.js
- AI: Anthropic Claude API
- GitHub: Octokit for GitHub integration
- State Management: Zustand
- Node.js 18+
- pnpm
- GitHub OAuth App
- Anthropic API Key
- Install dependencies
pnpm install-
Create a GitHub OAuth App
- Go to GitHub Settings > Developer settings > OAuth Apps > New OAuth App
- Application name:
AI Code Review(or any name) - Homepage URL:
http://localhost:3000 - Authorization callback URL:
http://localhost:3000/api/auth/github/callback - Copy the Client ID and generate a Client Secret
-
Configure environment variables
cp .env.example .envEdit .env with your credentials:
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
ANTHROPIC_API_KEY=your_anthropic_api_key
NEXT_PUBLIC_URL=http://localhost:3000- Run database migrations
pnpm migrate- Start the development server
pnpm dev- Open the app
Visit http://localhost:3000
- Sign in with GitHub - Click the sign in button to connect your GitHub account
- Create a Project - Select a repository to work with
- Start a Conversation - Describe what you want to build
- Select Context Files - Choose relevant files for the AI to understand
- Generate Code - Click "Generate Code" to create changes
- Review Diffs - See the changes in diff format
- Comment & Iterate - Add comments to request modifications
- Apply Changes - Create a branch and PR when satisfied
src/
├── app/ # Next.js app router
│ ├── api/ # API routes
│ │ ├── auth/ # GitHub OAuth
│ │ ├── projects/ # Project CRUD
│ │ ├── conversations/# Conversation management
│ │ ├── chunks/ # Code chunk management
│ │ └── github/ # GitHub API proxy
│ ├── dashboard/ # Main dashboard
│ └── page.tsx # Landing page
├── components/ # React components
│ ├── ChatInterface.tsx
│ ├── DiffViewer.tsx
│ ├── FileSelector.tsx
│ ├── ProjectModal.tsx
│ ├── Sidebar.tsx
│ └── ApplyChangesModal.tsx
├── lib/ # Utility libraries
│ ├── anthropic.ts # Claude AI integration
│ ├── auth.ts # Authentication helpers
│ ├── db.ts # Database connection
│ ├── diff.ts # Diff computation
│ ├── github.ts # GitHub API helpers
│ └── types.ts # TypeScript types
└── stores/ # Zustand stores
└── appStore.ts
- users: GitHub user information
- projects: Connected repositories
- conversations: Chat sessions with AI
- messages: Chat messages
- chunks: Generated code changes
- chunk_comments: User comments on code
- comment_responses: AI responses to comments
GET /api/auth/github- Start GitHub OAuthGET /api/auth/github/callback- OAuth callbackGET /api/auth/me- Get current userPOST /api/auth/logout- Logout
GET /api/projects- List projectsPOST /api/projects- Create projectGET /api/projects/:id- Get projectPATCH /api/projects/:id- Update projectDELETE /api/projects/:id- Delete project
GET /api/conversations- List conversationsPOST /api/conversations- Create conversationGET /api/conversations/:id- Get conversation with messages and chunksPOST /api/conversations/:id/messages- Send message (streaming)POST /api/conversations/:id/generate- Generate code changes
GET /api/chunks/:id- Get chunk with commentsPATCH /api/chunks/:id- Update chunk statusPOST /api/chunks/:id/comments- Add comment
GET /api/github/repos- List user reposGET /api/github/tree- Get repo file tree
POST /api/apply- Create branch and commit changes
MIT