Skip to content

miChat

A messaging app I built with a microservice architecture inside a Turborepo monorepo.

GitHub (opens in a new tab)
  • Next.js
  • Bun
  • Elysia
  • RabbitMQ
  • Redis
  • PostgreSQL
  • Drizzle
  • Better Auth
  • Turborepo
Role
Design and development, solo
Type
Personal project
Technologies
Next.js, Bun, Elysia, Drizzle
Infrastructure
Turborepo · Docker Compose
Architecture
apps/webNext.js client
api-gatewaySingle entry point for the client
userAccounts and profiles
chatRooms and messages
mailEmail delivery
packages/authShared authentication
packages/cacheShared cache client
packages/databaseDrizzle schema
infra · docker-compose · PostgreSQL · Redis · RabbitMQ

01 · Goal

I wanted to build the backend and infrastructure layers end to end myself: the services, the data and how they talk to each other.

A messaging app is a good test for that: it needs accounts, messages and email, and each of them can run in its own service.

02 · Structure

Everything lives in one Turborepo monorepo, so the web app and the services share the same types and tooling.

  • The web client only talks to the API gateway.
  • User, chat and mail run as separate services under apps/server.
  • Auth, cache and database code live in shared packages, so no service copies them.
  • Docker Compose starts PostgreSQL, Redis and RabbitMQ locally with one command.

Next project

Sunflow

(opens in a new tab)