Skip to content

Keshavkumar04/code_council

Repository files navigation

Code Council

🏛️ One question. Multiple frontier AI models. One verdict.

Next.js TypeScript Prisma PostgreSQL Inngest Tailwind CSS


🧭 Overview

Code Council is an AI code-review app built on a simple idea: don't trust a single model — convene a council. Submit a coding question or snippet and it is sent to multiple frontier AI models at once — Anthropic Claude, Google Gemini, and OpenAI GPT. Each model analyzes the problem independently, and the results are gathered into a single, easy-to-read verdict page.

The heavy lifting runs as background jobs, so you get a shareable result page that stays available even after the analysis finishes.

✨ Features

  • 🏛️ Multi-model "council" — Claude, Gemini, and GPT review the same question
  • 📝 Simple submission — paste a question or code snippet and submit
  • Background orchestration — analysis runs as durable Inngest jobs
  • 📄 Persistent result pages — every analysis gets its own shareable URL
  • 🎨 Syntax-highlighted code viewer — readable, language-aware output
  • 💾 Saved history — questions and results are stored in PostgreSQL

⚙️ How It Works

  1. You submit a coding question via the question form.
  2. A record is created in PostgreSQL and an Inngest job is triggered.
  3. The job fans out the prompt to Claude, Gemini, and GPT in parallel.
  4. Each model's analysis is collected and saved.
  5. You're taken to /result/[id], which streams in the combined verdict.

🛠️ Tech Stack

Layer Technologies
Framework Next.js (App Router), React, TypeScript
AI Vercel AI SDK — Anthropic, Google, OpenAI
Jobs Inngest
Database PostgreSQL, Prisma ORM
UI Tailwind CSS, Radix UI, shadcn/ui, Lucide

🚀 Getting Started

Prerequisites

  • Node.js 18+ and npm
  • A PostgreSQL database
  • API keys for: Anthropic, Google AI, OpenAI, Inngest

Installation

# 1. Clone the repository
git clone https://github.com/Keshavkumar04/code_council.git
cd code_council

# 2. Install dependencies
npm install

# 3. Set up environment variables (see below)
cp .env.example .env

# 4. Apply the database schema
npx prisma migrate dev

# 5. Start the dev server
npm run dev

Open http://localhost:3000 in your browser.

Environment Variables

Create a .env file in the project root (confirm exact key names against the source):

DATABASE_URL="postgresql://..."

# AI providers
ANTHROPIC_API_KEY=""
GOOGLE_GENERATIVE_AI_API_KEY=""
OPENAI_API_KEY=""

# Inngest
INNGEST_EVENT_KEY=""
INNGEST_SIGNING_KEY=""

📜 Scripts

Command Description
npm run dev Start the development server
npm run build Build for production
npm run start Run the production build
npm run lint Lint the codebase

📁 Project Structure

code_council/
├── app/
│   ├── result/[id]/   # Per-analysis result pages
│   └── api/inngest/   # Inngest endpoint
├── actions/           # Server actions (submit-question)
├── components/        # Question form, code viewer, UI
├── inngest/           # Inngest client & functions
├── lib/               # Prisma & utilities
└── prisma/            # Database schema & migrations

Built with 💙 by Keshav Kumar

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors