Shoppingcart
A walkthrough of an API on humus: a cart service for shopping carts on openapi/v3, behind JWT bearer tokens, that prices each item from a catalog service of its own over mTLS, both on PostgreSQL. These pages build it step by step.
A walkthrough is an example application that is production-ready, with pages
that build it step by step. Its code is a module of its own, at
example/<type>/<name> in the repository, under the folder of its service
type, and every sample on its pages is quoted from that code.
Database, writes the role’s credentials to a
Secret, and drops both on delete, as the Database says.Each walkthrough’s pages close with this checklist, and the application meets every item.
FS,
never environment variables, and none reaches a log or a span.terminationGracePeriodSeconds against humus’s defaults.synctest where they take time.humustest.Start: on humustest’s
Host where its dependencies can run there, and on humus.OSHost()
against containers, behind the testcontainers tag, where they can’t.functional tag.The second and third levels run the same black-box cases, written once.
A walkthrough of an API on humus: a cart service for shopping carts on openapi/v3, behind JWT bearer tokens, that prices each item from a catalog service of its own over mTLS, both on PostgreSQL. These pages build it step by step.
A walkthrough of gRPC on humus: a wallet service that keeps each caller’s account, behind JWT bearer tokens, on a ledger service of its own that it calls over mTLS, on PostgreSQL. These pages build it step by step.
A walkthrough of a job on humus that bills a month of subscriptions: it issues invoices in PostgreSQL and charges each one through a payments API, once, however often it runs. These pages build it step by step.
A walkthrough of a Kafka processor on humus that projects orders’ events into their statuses in PostgreSQL, produces each change of status, retries what fails for now through a retry topic, and dead-letters what never will. These pages build it step by step.
A walkthrough of a RabbitMQ worker on humus that sends the emails other services ask for through a provider’s API, retries what fails for now after a delay, and dead-letters what never will. These pages build it step by step.
A walkthrough of a Kubernetes controller on humus that provisions a database and the role that owns it in PostgreSQL for each Database resource, writes the role’s credentials to a Secret, and drops both on delete as the Database’s deletionPolicy says. These pages build it step by step.