CodeCatalyst is a production-grade, multi-agent AI system that automatically analyzes GitHub repositories, detects security vulnerabilities, and migrates legacy code (JavaScript β TypeScript, Python 2 β 3) using a LangGraph orchestration with real-time streaming.
Built with a zero-cost architecture using open-source tools and Groq's free LLM tier, it demonstrates advanced AI engineering patterns including agentic workflows, RAG (Retrieval-Augmented Generation), and asynchronous microservices.
π₯ Live Demo: https://code-catalyst-loqv.onrender.com
| Problem | Solution |
|---|---|
| Developers spend hours manually migrating legacy codebases | Automates the entire migration pipeline |
| Security vulnerabilities are hard to detect at scale | AI-powered security auditing with RAG |
| Migration often introduces new bugs | Critic agent validates and loops back until code passes |
| No transparency into AI decision-making | Real-time WebSocket streaming shows every agent's reasoning |
graph TD
UI[React Frontend] -->|Paste GitHub URL| API[Node.js Express API]
API -->|Submit Job| QUEUE[RabbitMQ]
QUEUE -->|Consume Task| WORKER[Python Worker]
WORKER -->|LangGraph StateGraph| SUP[Supervisor Agent]
SUP -->|Route| PL[Planner Agent]
PL -->|File Tree & Dependencies| SEC[Security Agent]
SEC -->|RAG Query| CHROMA[ChromaDB / Mock RAG]
SEC -->|Send Code| REF[Refactor Agent]
REF -->|Rewrite using Groq/AST| CRIT[Critic Agent]
CRIT -->|Linter Failed?| REF
CRIT -->|Passed| DONE[Output Refactored Code]
WORKER -->|Socket.IO Events| API
API -->|Live Logs| UI
| Agent | Role | Technology |
|---|---|---|
| Supervisor | Routes tasks and orchestrates the pipeline | Groq/Llama-3.1-70B |
| Planner | Maps dependencies and analyzes file structure | Python AST, package.json parser |
| Security | Detects vulnerabilities via RAG + pattern matching | ChromaDB, CVE database |
| Refactor | Rewrites code to modern standards | Groq + AST fallback |
| Critic | Validates code quality with correction loops | Pylint/ESLint + AST validation |
- 5 specialized LangGraph agents with a Critic-led correction loop
- Dynamic routing based on code analysis progress
- Up to 3 retry loops for code quality assurance
- Automatically indexes codebases at function/class granularity
- Semantic search for 10,000+ CVE vulnerability patterns
- Fallback mechanisms if ChromaDB or Groq API is unavailable
- WebSocket (Socket.IO) streaming of agent reasoning
- Live terminal-style logs in the browser
- Transparency into every step of the AI decision-making
- RabbitMQ decouples the Node.js API from Python workers
- Non-blocking, scalable job processing
- Graceful fallback for API rate limits
- ChromaDB (local vector database)
- Groq Llama-3.1-70B (free API tier)
- All open-source tools β no hidden cloud costs
| Layer | Technology |
|---|---|
| Frontend | React, Tailwind CSS, Socket.IO Client |
| Backend API | Node.js, Express, Socket.IO |
| Message Broker | RabbitMQ (CloudAMQP) |
| AI Orchestration | LangGraph (Python) |
| LLM | Groq (Llama-3.1-70B) |
| Vector DB | ChromaDB / Mock RAG |
| Code Parsing | Python AST, Regex |
| Containerization | Docker |
| Deployment | Render |
- Python 3.10+
- Node.js 18+ & npm
- RabbitMQ (or CloudAMQP free tier)
- Groq API Key β Get it free here
git clone https://github.com/samrasdra-cmyk/code-catalyst.git
cd code-catalystBackend (Node.js):
cd backend
npm installFrontend (React):
cd ../frontend
npm installWorker (Python):
cd ../worker
pip install -r requirements.txtCreate a .env file in the worker/ folder:
GROQ_API_KEY=your_groq_api_key_here
RABBITMQ_URL=amqps://user:pass@your-rabbitmq-host/instanceWith Docker (recommended):
docker compose up -dWithout Docker (Windows native):
# Start RabbitMQ (Admin PowerShell)
net start RabbitMQOpen 3 separate terminals:
| Terminal | Command |
|---|---|
| Backend | cd backend && node src/app.js |
| Worker | cd worker && python main.py |
| Frontend | cd frontend && npm start |
Visit http://localhost:3000 β paste a GitHub repo URL and watch the agents work! π¬
# Build the image
docker build -t codecatalyst .
# Run the container
docker run -d -p 5000:5000 -e GROQ_API_KEY="your_key" --name codecatalyst-app codecatalyst
# View logs
docker logs -f codecatalyst-app- Push your code to GitHub.
- Go to render.com and sign up.
- Click "New +" β "Blueprint".
- Connect your GitHub repository.
- Render will detect
render.yaml. - Add environment variables:
GROQ_API_KEYRABBITMQ_URL(from CloudAMQP)
- Click "Apply".
- Frontend sends the URL to the backend via Socket.IO
- Analyzes the user's request
- Decides which agent to call next
- Clones the repository
- Maps dependencies and file structure
- Returns file list to the Supervisor
- Uses ChromaDB RAG to detect vulnerabilities
- Queries CVE patterns via semantic search
- Returns vulnerability report
- Uses Groq/Llama-3.1-70B to rewrite code
- Falls back to AST transformations if Groq is unavailable
- Runs linters (Pylint/ESLint) on the refactored code
- If it fails, loops back to Refactor (up to 3 times)
- If it passes, the pipeline ends
job_completeevent stops the spinner- Refactored code and logs displayed
code-catalyst/
βββ backend/
β βββ src/
β β βββ app.js # Express server + Socket.IO
β β βββ socket.js # WebSocket configuration
β β βββ queue/ # RabbitMQ producer
β β βββ routes/ # API endpoints
β βββ package.json
βββ frontend/
β βββ src/
β β βββ App.js
β β βββ components/ # RepoInput, LogStream
β β βββ socket.js
β βββ package.json
βββ worker/
β βββ main.py # RabbitMQ consumer
β βββ agents/ # 5 specialized LangGraph agents
β βββ core/ # StateGraph & state management
β βββ rag/ # ChromaDB client & indexer
β βββ parsers/ # AST analyzers (Python/JS)
β βββ requirements.txt
βββ Dockerfile
βββ render.yaml
βββ README.md
| Issue | Solution |
|---|---|
ECONNREFUSED RabbitMQ |
Start RabbitMQ with net start RabbitMQ (Admin) or use CloudAMQP |
| Frontend shows "Could not reach backend gateway" | Update frontend/src/socket.js to use window.location.origin in production |
| Worker fails with syntax error | Ensure all try: blocks have matching except or finally |
| Pipeline completes but spinner keeps spinning | Move job_complete emit before index_repo() in main.py |
| ChromaDB OOM / slow indexing | Add MAX_FILES_TO_INDEX = 40 in indexer.py |
| Groq API key exposed | Revoke at console.groq.com and generate a new key |
| Variable | Where | Purpose |
|---|---|---|
GROQ_API_KEY |
Worker | LLM API key for Supervisor, Refactor, Critic agents |
RABBITMQ_URL |
Backend + Worker | RabbitMQ connection string |
NODE_ENV |
Backend | production or development |
FRONTEND_ORIGIN |
Backend | CORS allowed origin |
REACT_APP_SOCKET_URL |
Frontend | Socket.IO URL (optional) |
curl https://code-catalyst-loqv.onrender.com/health
# Expected: {"status":"ok"}- Open
http://localhost:3000 - Paste
https://github.com/facebook/react - Select "Convert JavaScript to TypeScript"
- Click "Launch Multi-Agent Pipeline"
- Watch the agents work in real-time!
Pull requests are welcome! If you'd like to add support for a new language (Rust, Go, etc.) or improve the security RAG pipeline, feel free to open an issue first.
# Fork and clone the repo
git clone https://github.com/your-username/code-catalyst.git
cd code-catalyst
# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r worker/requirements.txt
cd backend && npm install
cd ../frontend && npm install
# Run the full stack
# (Open 3 terminals as shown in Quick Start)This project is licensed under the MIT License. See LICENSE for details.
- LangGraph β Agent orchestration framework
- Groq β Free, fast LLM inference
- RabbitMQ β Reliable message queuing
- ChromaDB β Local vector database
- Render β Easy cloud deployment
Samra Safdar
- π§ samrasdra@email.com
- π LinkedIn
- π GitHub
Made with β€οΈ by Samra Safdar β If this project helped you, please give it a β on GitHub!
| Feature | Why It's Impressive |
|---|---|
| Multi-Agent Orchestration | 5 specialized agents working together with correction loops |
| RAG Pipeline | Self-populating vector DB for security auditing |
| Zero-Cost Architecture | All open-source, no cloud costs |
| Real-Time Streaming | Full transparency into AI decision-making |
| Async Microservices | RabbitMQ decoupling for scalability |
| Graceful Fallbacks | Works even when APIs fail |
| Production Deployment | Live on Render with Docker |
Star β this repo if you found it useful!