Skip to content
Ákos Kappel
Language: en
Theme
Light
Dark

Ambulance Devices

Register of hospital medical devices: a Stencil micro-frontend and a Go API, first deployed to Kubernetes through GitOps.

Homepage of Ambulance Devices with device count, total value and value by department

About the project

A university team project from the Web Applications in the Cloud course at FIIT STU in 2024. Each device in a hospital department has a registration number, a price, a warranty date and its own operations log. The frontend is a Stencil web component loaded into the course's shared portal, the backend a Go API with MongoDB generated from an OpenAPI specification, and Flux CD deployed both to Kubernetes on Azure.

Today it runs as a live demo on my home server. It has a homepage with an overview, an About page, English next to Slovak, dark mode, a safer API and CI that builds the images.

What you can try

  • An overview of device count, total value and warranties ending soon, with value per department
  • Search, filters by department and warranty state, sorting, and the filters kept in the URL
  • Warranty state at a glance: valid, ending within 90 days or expired
  • A device form and an operations log, validated in the browser and in the API
  • CSV export, Slovak and English, dark mode, and the API documentation in Swagger UI

Under the hood

  • One OpenAPI specification generates both the Go server stubs and the TypeScript client; CI fails when the generated code is out of date
  • Device and log changes are single atomic MongoDB updates, and the API validates input and keeps internal errors out of responses
  • GitHub Actions runs the Go tests against a MongoDB service container, the frontend spec and end-to-end tests, govulncheck and npm audit, and pushes the images to GHCR
  • Docker Compose with nginx (Content-Security-Policy, rate limits), a non-root API, structured JSON logs and a nightly demo reset

Architecture

  1. 1BrowserStencil web components with Material Web
  2. 2Tailscale FunnelPublic HTTPS from a sidecar container
  3. 3nginxServes the built frontend and proxies /api
  4. 4Go APIGin handlers on stubs generated from the OpenAPI specification
  5. 5MongoDBDevices with their logs; a reset container restores the demo every night

Changelog

  • Kubernetes and Flux replaced by Docker Compose on a home server
  • Gin 1.9 to 1.12 and MongoDB 7 to 8
  • Stencil 4.12 to 4.45 and Material Web 1 to 2
  • The axios client became a generated fetch client
When
2024 – 2026
Type
Team
Versions
  • Stencil 4.45
  • Go 1.27
  • Gin 1.12
  • MongoDB 8
Stack
  • Stencil.js
  • TypeScript
  • Go
  • Gin
  • MongoDB
  • OpenAPI
  • Docker
  • Kubernetes
  • Flux
  • Tailscale
  • GitHub Actions
Device list filtered to warranties ending within 90 days, sorted by warranty end
The device list filtered to warranties ending soon; the filters stay in the URL.
Device page of an MRI scanner in the dark theme with its form and operations log
A device page in the dark theme, with the form and the operations log.

1 of 2

Device list filtered to warranties ending within 90 days, sorted by warranty end

The device list filtered to warranties ending soon; the filters stay in the URL.