Documentation previewThese docs are actively being built. Some pages may change as the framework and examples are finalized.
Skip to content

Runnable Scenarios

Runnable scenarios show complete framework workflows inside a generated GoForj App.

Use these after the Quickstart when you want to build real application behavior instead of only reading individual feature pages.

If you are learning GoForj for the first time, treat this section as the main guided tutorial after Getting Started. Feature pages explain one surface at a time; scenarios show how those surfaces compose inside a generated App.

The Path

Seven scenarios, in order, each adding one boundary to the same App. Plan on a bit over two hours end to end, or one scenario per sitting. By the end you have a fully observable system: a tested API with caching, file storage, events, durable jobs, a schedule, and operator visibility over all of it.

  1. JSON API Route · about 15 minutes. A route, controller, service, Wire provider, and service test.
  2. Cached User Profile · about 15 minutes. A repository boundary and a named cache resource.
  3. File Upload To Storage · about 20 minutes. Uploads written to a named storage disk.
  4. Users Created Event · about 25 minutes. A typed event published and handled by a subscriber.
  5. Reports Generate Job · about 25 minutes. Durable work dispatched from the subscriber and processed by a worker.
  6. Reports Daily Schedule · about 15 minutes. The same job dispatched on a recurring cadence.
  7. Runtime Observability · about 15 minutes. The whole workflow followed through routes, metrics, inspects, Lighthouse, and logs.
flowchart LR
  route["JSON API Route"] --> cache["Cached Profile"]
  cache --> storage["File Upload Storage"]
  storage --> event["users.created Event"]
  event --> job["reports:generate Job"]
  job --> schedule["reports:daily Schedule"]
  schedule --> observe["Runtime Observability"]

Golden Path State

StepApp State BeforeApp State After
JSON API RouteGenerated App with HTTP enabledOne tested user lookup route is registered and visible in route:list.
Cached User ProfileUser route existsUser lookup has a repository boundary and named profiles cache.
File Upload To StorageApp has HTTP and generated storage supportUploads write to a named uploads storage disk.
Users Created EventUser service owns read/write behaviorCreating a user publishes a typed users.created event and a subscriber reacts to it.
Reports Generate JobEvent subscriber existsSubscriber dispatches durable reports:generate work and workers write report artifacts.
Reports Daily ScheduleReport job existsreports:daily schedule dispatches the same report job on a recurring cadence.
Runtime ObservabilityAPI, cache, storage, event, job, and schedule paths existThe whole workflow can be followed through routes, logs, metrics, inspects, and Lighthouse.

How To Read These

Each scenario uses the same small internal reporting app shape.

The examples are intentionally local-first. Production drivers, distributed backends, and operational deployment notes appear only after the local path works.

After The Path

Finishing all seven leaves you with the App this whole documentation set describes. From there: