Skip to content

Intelligent, real-time AI chat application leveraging multiple LLMs with secure authentication and a modern full-stack architecture (NestJS, React, Vite, PostgreSQL).

License

Notifications You must be signed in to change notification settings

petarzarkov/derp.ai

Repository files navigation

Derp AI — AI Model Comparison Chat App

logo build license

Derp AI is a real-time chat platform that streams responses from multiple AI models at once, enabling side-by-side model comparison. It runs on a full-stack TypeScript monorepo using NestJS for the backend and Vite + React for the frontend and pnpm for repo and package management.

🌐 Deployed here: https://derp.ai.petarzarkov.com/

🔑 Key Features

  • Simultaneous AI Responses – Sends each prompt to 4 AI models in parallel and streams all responses back in real-time.
  • Deployed on Google Cloud Run – Scalable, serverless backend powered by NestJS - websockets, passport session, express session store + cookies, helmet (cqrs), cors
  • Fast Frontend – Built with Vite, React, and Chakra UI.
  • Secure Auth – OAuth logins via Google, LinkedIn, and more.
  • Extendable AI Support – Easily plug in more models.
  • CI/CD - versioning, docker, slack notifications, cloud logs

🧠 Current Models (can be extended)

  • gemini-2.0-flash
  • gemini-2.5-pro-exp-03-25
  • llama-3.3-70b-versatile
  • deepseek/deepseek-chat-v3-0324:free

📦 Monorepo Structure

  • services/common – Shared types
  • services/server – NestJS backend (WebSockets + AI orchestration)
  • services/web – Vite + React frontend
  • services/mobile – React Native placeholder (not yet implemented) branch for it here
  • services/desktop – Electron placeholder (not yet implemented) branch for it here

🚀 Getting Started

Prerequisites

  • Node.js ≥ 22
  • pnpm ≥ 10
  • Docker + Docker Compose
  • PostgreSQL (or use Docker)
  • Git

Setup

git clone https://github.com/petarzarkov/derp.ai.git
cd derp.ai
pnpm install
cp .env .env.dev  # Then fill in keys for Gemini, Groq, OpenRouter, etc.

Development

  • Start redis + DB with Docker
docker-compose up -d

# Run both frontend and backend in watch mode
pnpm dev

Or separately:

pnpm --filter server dev
pnpm --filter web dev

🐳 Docker Deployment

To build and run the backend manually via Docker:

docker build -t derpai-server .
docker run -p 3033:3033 --env-file .env derpai-server

About

Intelligent, real-time AI chat application leveraging multiple LLMs with secure authentication and a modern full-stack architecture (NestJS, React, Vite, PostgreSQL).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages