Skip to content
Ocean-Atlasv0.1.0Canonical Knowledge

Understand the First Bundle

Ten small files, read in the right order, tell a complete story. This page tells it using the same three facets every Ocean example uses — Horizon, Voyage, and Implementation — so the shape becomes familiar before you meet it again in other examples.

Task Manager models a task manager built around one persistent record: a TodoItem, with a title, a due date, a priority, and a lifecycle status. An API creates, finds, updates, and deletes tasks; a database persists them; expressions apply the lifecycle rule that turns an overdue task expired; a UI presents all of it.

flowchart LR
User((User)) --> UI[Todo UI]
UI -->|HTTP| API[Todo API]
API --> Expr[Expressions]
Expr --> DB[("Todo DB<br/>PostgreSQL")]
API --> DB
  • Actors: one human user, interacting through the UI or directly through the API.
  • Services: TodoService (API, expressions, persistence) and TodoUi (presentation), deployed separately.
  • API: TodoApi — REST, one base path.
  • Database: TodoDB — one entity, TodoItem.
  • Brokers: none. This example doesn’t touch messaging.
  • Model boundary: the Bundle describes the application structure shown above; generators and imported reusable definitions participate in producing the concrete implementation.

That’s the whole system. Everything past this point is the same picture, in more detail.

Read the files in this order — it’s the order each piece starts depending on the one before it.

2.1 Project Information — 00-todo-info.ocn

Section titled “2.1 Project Information — 00-todo-info.ocn”
Describes The Bundle’s identity: name, version, description.
Why it’s needed Every Bundle is identified by its @info section — see Ocean Bundle.
Referenced by Nothing inside the Bundle; it identifies the Bundle as a whole.
Reference Info DSL Reference
Describes TodoItem and its two enums, Priority and TaskLifecycle.
Why it’s needed Every other section — API, database, expressions, UI — shares this one definition of what a task is, instead of each redefining its own shape.
Referenced by The API (operation parameters and returns), the database entity, the expressions, and the UI’s dashboard fields.
Reference Datatype DSL Reference
Describes TodoServiceConfig and TodoUiConfig, composed from imported, reusable DatabaseConfig and LogConfig definitions.
Why it’s needed The service and the UI both need typed, environment-specific settings — a port, a database connection — without hardcoding them into behavior.
Referenced by The service (use config TodoServiceConfig) and the UI (configType: TodoUiConfig).
Reference Config DSL Reference
Describes Database TodoDB, one Entity TodoItem, and its queries and commands — find by ID, find by title, list, create, update, delete.
Why it’s needed Tasks need to persist across requests, not just live in memory.
Referenced by The expressions, which call TodoItem.createTodoItem, .findById, and similar directly; and the service, which uses the database.
Reference Database DSL Reference
Describes TodoApi: the public REST operations — get, list, find, create, update, delete.
Why it’s needed This is the system’s public contract — what a caller (the UI, or you, with curl) can actually do.
Referenced by The service, which implements it; the UI, which connects widget actions to its operations.
Reference API DSL Reference

2.6 Expressions — app-todo-expression.ocn

Section titled “2.6 Expressions — app-todo-expression.ocn”
Describes The logic between API and database: CreateItem, GetItem, GetAll, AdjustItem, DeleteItem, and the lifecycle rule IsOverdue / CheckItem that marks a task expired.
Why it’s needed Not every API call is a plain database pass-through — a created or fetched task needs its overdue status checked first. This is where that rule lives, in one place.
Referenced by The service, which connects API operations to these expressions instead of straight to the database where a rule applies.
Reference Expression DSL Reference
Describes TodoService: the orchestration unit that wires configuration, the API implementation, the database, and the expressions together with connect.
Why it’s needed Something has to decide, for each API operation, whether it’s a direct database call or one that runs through an expression first. This is that something.
Referenced by Deployment, which materializes it as a running unit.
Reference Service DSL Reference

2.8 Dashboards and UI — app-todo-dashborad.ocn, app-todo-ui.ocn

Section titled “2.8 Dashboards and UI — app-todo-dashborad.ocn, app-todo-ui.ocn”
Describes Six dashboards (view, search, create, edit, delete, about) made of typed widgets, composed by TodoUi into one navigable application connected to TodoApi.
Why it’s needed A generated API is not, by itself, something most people want to use directly.
Referenced by Deployment, as a separately deployed service from the API.
Reference Dashboard DSL Reference, UI DSL Reference
Describes How TodoService and TodoUi become running units: replica counts, exported ports (9091 and 8081), and TodoService’s dependency on a Dockerized PostgreSQL instance.
Why it’s needed A validated model isn’t a running system yet — this is what turns it into one.
Referenced by Nothing further; this is where the model becomes runtime topology.
Reference Deploy DSL Reference

3. Implementation: What’s Actually There

Section titled “3. Implementation: What’s Actually There”
  • Authored Ocean DSL: the ten .ocn files above — this is what you, or anyone extending this example, would edit.
  • Supporting the example, not part of the model: example.md (the Atlas descriptor) and example-info/example-info.html (the Horizon and Voyage explanation you’re reading a guided version of right now).
  • What the generator produces: a Go/Gin API, PostgreSQL persistence, and an HTMX/Bootstrap/Go-template UI, per the example’s own documentation.
  • Where custom logic belongs, and how regeneration behaves: this is general to every Ocean project, not specific to Task Manager — see The Everyday Workflow for the full answer and the ownership table behind it.

This page reads the model; it doesn’t reproduce the example itself. For the complete, canonical version — including the parts not walked through above — see Task Manager directly.

You’ve read the whole Bundle. Make the First Change is where you edit one small piece of it and watch the effect ripple through.