Skip to content
doze
0.2

These are the docs for doze 0.2.

What changed in each release →

Your first stack

Open an example project in the app, bring it up, and watch each service wake.

On this page

Open an example project in the app, bring it up, and watch each service wake.

You need the app (Install the app) and git. doze fetches Postgres, Valkey, Kafka and the local AWS itself. Larder’s own services are code, so they need what any checkout of them would: Go, uv for the Python ones, and bun for the TypeScript ones.

Terminal window
git clone https://github.com/doze-dev/doze-examples

Larder is the larder folder. Everything it runs is in one file, larder/doze.hcl: four shared services, a mail catcher, nine apps and the tasks that prepare them.

Home with two stacks: larder up, with 13 awake and its switch on, and acme stopped
Home after step 3: larder is up, its switch on.
  1. Open doze. From Applications, or type doze in a terminal. It opens on Home.
  2. Drop the larder folder on the window, or press ⌘O and pick it. It appears stopped. Opening a folder never starts it.
  3. Flip its switch on. The ⋯ beside it offers Start everything, or Choose what starts… to tick only the apps you will work on; what they need comes too.
  4. Open the stack and press 3 for the Map. Each card shows a service, what it uses, and its memory as it wakes.
larder on the Map: storefront calls gateway, which calls identity, fulfilment, orders, catalog and recommendations; the shared services along the bottom
Step 4: larder on the Map. Lines are calls, read from references in doze.hcl.

The first up takes a while: doze downloads each engine once, and go run compiles each Go service the first time. Later starts are quick.

Two things Larder asks of you:

  • Its names. Larder turns on <service>.larder.doze names, which need the one-time setup from Install the app. On a machine without it, bring Larder up with doze up --var names=false; every service then listens on 127.0.0.1.
  • Its shelves. The catalog starts empty. Run doze task seed-catalog once, or open the seed-catalog task in the app and press Run again.

Then open the storefront’s address from its card, and shop.

After two minutes with nothing connected, a service goes to sleep. Its data stays on disk, and its next connection wakes it. To keep one up longer, set sleep on its block:

module postgres "postgres" {
version = 18
sleep = "10m" # or "never"
}

Larder already does this for the services that read from Kafka: no request would ever wake them, so they say sleep = "never". More in Sleep and wake.

When you are done for the day, flip the stack’s switch off, or run doze down.

Next: Bring your own repo.