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.

Scenarios

Read them in order if you are learning the framework model. Each scenario builds on the same App shape and adds one new boundary.

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.