Playground project covering real-time and async processing patterns using a distributed chat messaging application as a business domain.
- Persistent DM and Group rooms
- Cursor bidirectional pagination, infinity message threads
- Unread message trackers, notifications
- Async persistence message jobs
- Tokenized auth
- Load/performance tests with k6 and chat activity simulation
- Observability and containerization
- Next.js / React, TanStack Query, Tailwind, Radix / Shadcn
- NestJS, Socket.IO, BullMQ, Drizzle
- Redis, PostgreSQL
- Contracts via Zod
- Package builds with tsdown
- Vitest, k6
- Turborepo
- Traefik, Prometheus, Grafana, Loki, Alloy + Exporters, Ofelia for Scheduling
- Prepare
.envfile make infrawill spin up Redis and PostgreSQL containers
pnpm pushto apply SQL schemapnpm seedfor tests /pnpm seed:fullfor load simulationpnpm dev/pnpm build
pnpm simulatorto run a process with virtual pre seeded users posting intervaled messages from a message pool, configurable via.envvariables
pnpm test -F [packagename]covers integration tests of NestJS app packages
- Generate certs for traefik https in
docker/traefik/certs - Prepare
docker/.env.dockerfile - Run infrastructure
make initfor pushing/seeding oncemake upstarts all services behind Traefikmake obsfor observability stackmake perf SCENARIO=[scenario file path]for k6 testsmake simulatorfor chat activity simulation