A production-shaped Proof-of-Concept for a healthtech ingest pipeline: device captures arrive through an ingest service, are queued, processed through a deterministic inference stub, persisted, exposed through a read API, and tied to a live cost calculator.
This repository demonstrates the parts of backend architecture that matter for a high-volume healthtech data path: async durability, idempotency, mTLS/JWT-shaped trust boundaries, S3/SQS/Postgres data separation, observability, Terraform-shaped infrastructure, and unit economics against a $6/user/month constraint. The model is intentionally synthetic; the architecture and cost controls are the artifact.
make build
make demo
make run-cost-api
cd web/cost && npm install && npm run devThen open:
- Cost API: http://localhost:9000/v1/pricing/fargate?region=us-east-1
- Calculator UI: http://localhost:5173
- Grafana (optional):
docker compose up -d grafana prometheus tempothen http://localhost:3001
api/proto/throne/v1/*.proto— service contracts.internal/ingest,internal/processor,internal/inference,internal/api— service implementations and tests.infra/modules/**andinfra/envs/dev— AWS/Terraform shape.web/cost/src/model/cost-model.ts— standalone FinOps math.docs/slo.md,docs/runbooks/**,docs/cost-runbook.md,docs/adr/**— ops and architecture decision trail.
- No real PHI or biological image classifier is included.
- Local mode uses file-backed S3/SQS/Postgres-shaped adapters so reviewers can run the pipeline without cloud credentials.
- The protobuf surface is canonical:
make protorunsbuf generatefor Go, gRPC, grpc-gateway, and OpenAPI artifacts. Local demo HTTP endpoints remain for clone-and-run compatibility. - Pricing API endpoints use a bundled May 2026 snapshot when live AWS Pricing credentials are unavailable.
make help # list targets
make proto # regenerate committed Go/gRPC/gateway/OpenAPI artifacts
make test # Go unit/integration-shaped tests
make build # all Go commands
make lint # gofmt + tests + terraform fmt when available
make docker-config # validate docker-compose syntax
docker build -f docker/service.Dockerfile --build-arg SERVICE=throne-ingest .- How do I run it?
make demofor local data generation; individualmake run-*targets for services. - Where is state?
.data/for local file-backed object storage, queue messages, and JSON DB. - How is production different? Terraform modules replace local adapters with S3, SQS, RDS, ECS/Fargate, CloudWatch/Grafana.
- What should a reviewer focus on? Service boundaries, failure/idempotency paths, observability/runbooks, and cost-model levers.
Device -> throne-ingest -> S3(raw) + SQS -> throne-processor -> throne-inference
| |
v v
Postgres S3(derived)
Mobile/Web -> throne-api -> Postgres + signed S3 URL
FinOps UI -> throne-cost-api -> AWS Pricing snapshot/live cache