Inventory Platform: Go API with monitoring
Nov 27, 2026
·
1 min read
What it is
A small product and stock tracker that I built to show a complete, observable backend in one repository. The code is public on GitHub, and docker compose up starts the whole stack.
flowchart LR
user([Browser]) --> nginx["nginx
Vue 3 + TypeScript app"] nginx -->|"/api/*"| api["Go API
net/http + pgx"] api --> db[("PostgreSQL 16")] migrate["migrate (runs once)"] --> db prom["Prometheus"] -->|"scrapes /metrics"| api grafana["Grafana"] --> prom
Vue 3 + TypeScript app"] nginx -->|"/api/*"| api["Go API
net/http + pgx"] api --> db[("PostgreSQL 16")] migrate["migrate (runs once)"] --> db prom["Prometheus"] -->|"scrapes /metrics"| api grafana["Grafana"] --> prom
Details worth a look
- Stock can never go below zero. Every stock change runs in one transaction that also writes a row to
stock_movements, and a database constraint rejects overselling. The API answers with HTTP 409 instead. - Metrics per route: request count, latency histogram and stock changes, labelled by route pattern so each product id does not create its own series.
- A/B test: each browser gets a table or a card layout through a cookie, and every request carries its variant, so Grafana can compare the two.
- Tests and migrations:
go testfor the API, SQL migrations with golang-migrate.
Stack
Go, pgx, PostgreSQL 16, Vue 3, TypeScript, Vite, nginx, Docker Compose, Prometheus, Grafana.

Authors
Senior Full-Stack Software Engineer
Senior full-stack software engineer with 16+ years of experience building business software end to end, from database design and REST APIs to the web interfaces people use every day. My main stack is PHP/Laravel, Angular and TypeScript on MySQL and PostgreSQL, deployed with Docker, nginx and GitHub Actions. From 2018 to 2025 I developed the platform behind Scrapbook Expo’s 15+ U.S. trade shows a year: staff and exhibitor portals, waitlists, automated deadline emails and SQL tuning for peak registration. Since January 2026 I have been building the internal ERP at Aqua Dreams from schema to UI. Before that I led a web team at an Australian media group, built a retail kiosk for Nedap that was shown at EuroCIS, and delivered 130+ freelance projects with a 4.9 rating. I use AI coding tools such as Claude Code every day and work in English (C1) and German (B2).