← projects

case study

BugSathi

Bug reports lack evidence and teams cannot audit how recordings become AI-written reports.

problem

Bug reports lose context: no recording, inconsistent steps, and SaaS tools that hide how media and AI processing actually work.

solution

BugSathi ingests a screen recording locally, stores media in MinIO, runs an ordered Kafka pipeline (ffmpeg frames → AI draft → report), and exposes shareable reports with JWT auth and observability.

requirements

Local-first Docker Compose; ordered processing per recording; idempotent consumers; refresh-token rotation; OTel + Prometheus + Grafana; Kubernetes path for production experiments.

Go modular monolith with separate API and worker binaries. PostgreSQL for metadata, MinIO for recordings and frames, Redis for rate limiting, Kafka/Redpanda for the ordered event pipeline, and OpenTelemetry/Prometheus/Grafana for observability. Docker Compose locally; Kubernetes manifests and Caddy for production.

event & data flow

Upload → presigned MinIO PUT → completion event → Kafka topics (per-recording ordering via partition key) → ffmpeg worker → AI analysis worker → report materialization in Postgres → shareable link.

reliability

Outbox pattern, DLQ reprocess path, and chaos drills in Makefile targets. Workers are separate binaries from the API.

security

JWT access + refresh rotation, project tenancy, rate limiting with Redis, audit logs. Production compose guards for AI and MinIO configuration.

testing

116 Go tests; CI runs test-race. 35 ADRs document major decisions.

performance

Media steps are isolated in workers; no synthetic throughput benchmarks are published on this site.

what i built

  • API. REST API for projects, recordings, reports, auth
  • Pipeline. Kafka/Redpanda ordered stages with ffmpeg and AI workers
  • Storage. MinIO for recordings/frames, Postgres for metadata
  • Observability. OpenTelemetry, Prometheus, Grafana dashboards

key decisions

  • Per-recording Kafka ordering. Partition keys keep all stages for one recording strictly ordered.
  • Separate worker binary. Media and AI work cannot block API request latency.

trade-offs

  • Kafka for ordering vs a simpler queue — pays off when stages replay or fail independently.
  • Go modular monolith (API + worker) vs single binary — clearer failure domains for media-heavy work.

lessons

  • Provider ports for AI keep vision tests deterministic offline.
  • ADRs paid off when debugging pipeline ordering under replay.

verified results

  • 116 Go tests under -race
  • 35 ADRs in docs/adr
  • 8-topic Kafka pipeline