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/
- 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
- Session store module - services/server/app/modules/session/session.store.ts, basically https://www.npmjs.com/package/connect-pg-simple but the NestJS way
- Redis used for caching your latest 10 prompts and answers
- 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
gemini-2.0-flashgemini-2.5-pro-exp-03-25llama-3.3-70b-versatiledeepseek/deepseek-chat-v3-0324:free
services/common– Shared typesservices/server– NestJS backend (WebSockets + AI orchestration)services/web– Vite + React frontendservices/mobile– React Native placeholder (not yet implemented) branch for it hereservices/desktop– Electron placeholder (not yet implemented) branch for it here
- Node.js ≥ 22
- pnpm ≥ 10
- Docker + Docker Compose
- PostgreSQL (or use Docker)
- Git
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.- Start redis + DB with Docker
docker-compose up -d
# Run both frontend and backend in watch mode
pnpm devOr separately:
pnpm --filter server dev
pnpm --filter web devTo build and run the backend manually via Docker:
docker build -t derpai-server .
docker run -p 3033:3033 --env-file .env derpai-server