cd ~/work
~$ cat ~/work/devpilot/README.md

Side project · open source

DevPilot

A browser-based IDE I built to learn microservices. Every workspace is its own Docker container, with a collaborative editor, a terminal and an AI assistant on top.

type
Learning project
shape
8 apps in one monorepo, one API gateway
real-time
WebSockets and Yjs
AI
Gemini 2.5 Flash

browserThe IDE itself: Monaco editor, file explorer, xterm.js terminal and AI chat.

Request flow. Select a part to see what it does.

Why I built it

I wanted to understand microservices by building something that has a reason to be split up. An IDE touches a lot of separate problems at once: sign-in, containers, terminals, real-time collaboration and AI.

How it fits together

Caddy sits in front. Page requests go to the Next.js app, and everything under /api goes to a Fastify gateway that checks the session and forwards the request to the right service.

Each service has one job: auth (Better Auth with Google sign-in), workspaces (container lifecycle through the Docker Engine API), collaboration (WebSockets and Yjs) and AI (Gemini 2.5 Flash).

Workspaces are real containers

Opening a workspace starts an isolated Docker container for it. The file explorer, the terminal and collaborative editing all work against that live container, not a simulated file system.

Shared code across services

It's a Turborepo monorepo. Typed HTTP and WebSocket clients, the Drizzle schema, shared types and event definitions live in packages, so every app builds against the same contracts.

Running it

The whole stack runs in Docker Compose locally. Production deploys to Oracle Cloud with one script, with Terraform for infrastructure, Prometheus, Grafana and Loki for metrics and logs, and Vitest for tests.

Stack

  • Next.js 15
  • Fastify
  • PostgreSQL
  • Drizzle
  • Docker Engine API
  • Yjs
  • Monaco
  • xterm.js
  • Better Auth
  • Turborepo
  • Prometheus
  • Grafana
  • Loki
  • Terraform