Tutorial 1: your first hour
On this page
- 0. Before you start (2 minutes)
- 1. Install (1 minute)
- 2. Start it (30 seconds)
- 3. Meet the starter (3 minutes)
- 4. Make the backend yours (10 minutes)
- 5. Make the page yours (15 minutes)
- 6. Apply the database change and look (5 minutes)
- 7. The checks, and a production build (5 minutes)
- What you did, mapped to the idea
You will build "Things to bring", a list for a game night. By the end you will have touched every idea once: a list bound to data, an empty state, a form with two fields and one validation, a backend (entity, list, create, a "packed" toggle), one dialog, a second page, a production build, and the checks that say it all agrees.
How each step is written: Studio says what to click, Agent says the same thing as one tool call for people who work with Claude Code, File says what changed on disk, See says where to look. Pick one of Studio or Agent per step. You do not need both.
What was run, to be honest about it: every Agent call below was run and its answer read. The Studio steps for renaming an entity, adding a field, the state bar and opening the Backend view were driven with a browser script; dragging a widget from the Add tab onto the canvas was not (a script cannot drag like a person), so for adding widgets the Studio line says what to look for and the Agent line is the tested path.
Time: the install took 45 seconds, the first start 30 seconds, the production build 7 seconds; a script that ran every command of this page, start to build, took about 4 minutes. Reading and typing is yours: plan 60 to 90 minutes (an estimate; the author has not timed a cold reader).
0. Before you start (2 minutes)
You have a folder with globetrotter-0.3.0.zip in it. Unpack it, then check your tools.
unzip globetrotter-0.3.0.zip
node -v # v20 or newer
uv --version # any recent uvIf unzip is not there, use your file manager. You now have globetrotter-0.3.0/ beside the zip. Nothing is installed globally.
Ports: the studio wants 3100, the app 3000, the backend 8000. See what is using them:
lsof -iTCP:3100 -iTCP:3000 -iTCP:8000 -sTCP:LISTEN -n -PNo output means all three are free. If something is listed, pick other ports now and carry them through step 1 and 2 (this page writes 3411 for the app, 8411 for the backend and 3410 for the studio where it matters).
1. Install (1 minute)
Run this in the folder that holds globetrotter-0.3.0/. It makes a new folder, my-first-app.
node globetrotter-0.3.0/install.mjs new my-first-app --as bothIf 3000 or 8000 are taken, say so here, once, so the config is right from the start:
node globetrotter-0.3.0/install.mjs new my-first-app --as both --app-port 3411 --backend-port 8411It checks the bundle, copies the seven tarballs into my-first-app/vendor/globetrotter/, runs npm install (in the project and in frontend/), init, uv sync for Python, and ends with globetrotter doctor. Expected last lines:
✓ project version = vendored tarballs = this CLI: Globetrotter 0.3.0 (commit 850fdc9)
everything that can be checked is in sync
clean (6 s)
Done in 0.7 min. Next:It then prints cd … and npx globetrotter dev --port 3102 (3102 only when 3100 was taken). It ends with what is true about the agent setup (the plugin needs the repository to be public; a .mcp.json works today: page 6) and a line saying where the docs are. If 3000 or 8000 was taken it also says which ports it chose.
File: a whole project exists. The parts you will meet: designs/ (two JSON files), frontend/ (Next.js; src/generated/ is written for you, src/bindings/ is yours), backend/ (Python; packages/my_first_app_impl/ is yours), vendor/globetrotter/ (the tooling, as tarballs: commit it).
Make a git repository now; it makes every later step easy to see:
cd my-first-app
git init -q && git add -A && git commit -qm "baseline"2. Start it (30 seconds)
In my-first-app/:
npx globetrotter devWith your own ports: npx globetrotter dev --port 3410 --app-port 3411 (the backend port is the one you gave the installer; it lives in globetrotter.config.json).
Leave this terminal running. Open a second terminal in my-first-app/ for everything else. After about 25 seconds you see:
studio → http://localhost:3100/studio (editing …/my-first-app; listens on 127.0.0.1, this computer only)
backend → http://localhost:8000 (ready; from backend/; your code goes in packages/my_first_app_impl/; …)
watching → designs/ (a save regenerates the pages and, from my-first-app.service.json, backend/), …
app → http://localhost:3000/g (from frontend/)Check each:
curl -s localhost:8000/ready # {"status":"ready"}
curl -s localhost:3000/g/items | head -c 100(Use your ports.) The app is served under /g. http://localhost:3000/ redirects there.
3. Meet the starter (3 minutes)
The project began with a placeholder: an entity item with a title and a done flag, a service Items (list, get, create, complete) and two pages, Home and Items. It already works.
See: open http://localhost:3000/g/items in a browser (make the window narrow, like a phone). Type Folding chairs in "New item", press Add. The row appears. Press Add with the box empty: "An item needs a title." appears under the box. That sentence came from the backend, and the page put it under the right field. Remember that: it is the idea this whole tool is built on.
Now open the studio, http://localhost:3100/studio. It opens on the list of designs. Click my-first-app. A five-step tour opens: press Skip. A grey bar says "This project uses Globetrotter 0.3.0 …": press Dismiss (older builds of the studio advised upgrading with a script only the repository has; it now names the bundle's install.mjs upgrade, and page 5 explains the old wording).

Left: Layers (the pages and the widgets on the chosen page), Add (widgets to place), Words (every text on the page), Backend (the service). Middle: the page, drawn by the real widgets. Right: the panel for what is selected; with nothing selected, it is the page itself. Above the canvas, Loaded is the state bar: you can look at the page loading, empty or failed without breaking anything.

Click Backend, then Overview. This is the service as a picture: one store (db, sqlite), one service, one entity.

The first time the Backend view opens it can take several seconds. Wait; do not reload.
4. Make the backend yours (10 minutes)
Rename item to thing, done to packed, add a who field, and write your own validation sentence.
Studio: Backend → Entities. Click the name item. In the panel on the right, Name: type thing. Press Review the change. The panel lists everything that follows by itself ("The entity item: renamed to thing; The field item.title: when it is wrong “An item needs a title.” → “A thing needs a title.” …") and says "The next sync's migration for db (sqlite) gains:". Press Save. For done: click the row done, Name packed, Review the change, Save. For a new field press + Field on the entity's card, type who in New field, leave Every row must have it unticked, Review the change ("Will add the field thing.who"), Save. For the validation words click the row title: At most 80, When it is wrong Say what to bring., Review the change, Save.
Agent: these five calls do the same (read the node names with service_session first; item, item-done, item-title, items, items-create, items-complete and items-create-title are what the starter names its nodes).
set_service_props({ design: "my-first-app", node: "item", props: { name: "thing" } })
set_service_props({ design: "my-first-app", node: "item-done", props: { name: "packed" } })
add_service_node({ design: "my-first-app", type: "Field", target: { parent: "item", slot: "fields" },
props: { name: "who", type: "string", required: false, max: 60 } })
add_service_node({ design: "my-first-app", type: "Param", target: { parent: "items-create", slot: "params" },
props: { name: "who", type: "string", required: false } })
set_service_props({ design: "my-first-app", node: "item-title", props: { max: 80, message: "Say what to bring." } })
set_service_props({ design: "my-first-app", node: "items-create-title", props: { max: 80, message: "Say what to bring." } })
set_service_props({ design: "my-first-app", node: "items-complete", props: { name: "pack", description: "Marks the thing packed." } })
set_service_props({ design: "my-first-app", node: "items-create", props: { description: "Adds a thing with its title and who brings it, not packed; answers the list again." } })Two things to notice in the answers. A rename says what it carried ("renamed … carried: …") and what it could not (couldNotCarry: words that still say done, which you can change or leave). And the validation sentence lives in two places: on the field (item-title, what a row may hold) and on the create operation's param (items-create-title, what the form is told). They are separate on purpose; change both.
The service route and name are still Items and /items. Rename them, so the page and the service agree on what they are about.
Studio: there is no click for this one that was found in the run. Open designs/my-first-app.service.json, find the service ("id": "items") and change "name": "Items" to "Things" and "route": "/items" to "/things"; save. The watching dev regenerates at once.
Agent:
set_service_props({ design: "my-first-app", node: "items", props: { name: "Things", route: "/things" } })File: designs/my-first-app.service.json changed. dev is watching: it rewrote backend/packages/my_first_app_core/…, …/my_first_app_contract/…, the page types and (because the starter's binding is still an untouched stub) the stub binding too. Look:
git status --short | head -20Do not run sync yet; the pages need two fixes first.
5. Make the page yours (15 minutes)
The page Items is frontend/src/generated/my-first-app--items.tsx. Rename it, fix the one thing the rename could not carry, and put your own words and widgets on it.
First, rename the page and its route to match the service:
Studio: Layers, click the page Items. In the panel on the right: Name Things, Route /things. (The studio refuses a route another page owns, in red.)
Agent:
rename_page({ design: "my-first-app", page: "Items", name: "Things", route: "/things" })Now run the first sync of the hour.
npx globetrotter syncIt writes the migration for the backend changes and prints, among other lines, one error and one warning:
warning · contract-drift: /items/actions/create: Things.create was Items.create, and the pages' action create still calls /items/actions/create: …
error · contract (Things): loading rows stand for "items", but nothing on this page repeats over it
! 1 lint error above: the files were written anyway, and operations the errors touch may refuse, do nothing or not run as designed. `sync --check` fails on them; …Read them. They are the tool doing its job: a rename of the backend reached the page's data (things) but not two places it could not know about. Fix both.
The error is about the "loading rows" widget (the grey shimmering rows shown while the list loads): it still says it stands for items. Get its id from the outline (get_page prints every widget with #id):
get_page({ design: "my-first-app", page: "Things", format: "outline" })Copy the id after LoadingRows. Ids look like npxk4r86; yours differ.
Studio: click Loading rows in the layers. Under Content, Of says which list it stands for: pick things.
Agent:
set_props({ design: "my-first-app", page: "Things", nodeId: "<the LoadingRows id>", props: { of: "things", label: "Loading things" } })The warning is about the action create, which still calls the old path.
Agent:
describe_action({ design: "my-first-app", name: "create", calls: "/things/actions/create",
description: "Adds the thing the form names; the list comes back with it." })Studio: the pill above the canvas (it says "1 problem" or "No problems") lists the findings of the page; Show jumps to the widget and Fix applies the offered change where there is one. For an action, select the button: the panel's What it does says Run an action, and Action name, Runs show where it posts.
Now the words. The page still says "item" in places. Replace them in one call (the phrase first, then the word: a blind replace makes "Select an thing" otherwise):
replace_text({ design: "my-first-app", find: "an item", replace: "a thing" })
replace_text({ design: "my-first-app", find: "item", replace: "thing" })Expect replaced: 2 then replaced: 6. Studio: the Words tab lists every text on the page; click one to edit it, or Copy sheet and Paste sheet to edit them all in a spreadsheet.
Set the page title and the empty state's headline (ids from the outline: the AppBar and the first EmptyState):
set_props({ design: "my-first-app", page: "Things", nodeId: "<AppBar id>", props: { title: "Things to bring" } })
set_props({ design: "my-first-app", page: "Things", nodeId: "<EmptyState id>", props: { headline: "Nothing to bring yet" } })The second field and the row
Add a text field "Who brings it" beside the first. Its field is where its value is kept in the page's data: draft.who. The new input should sit before the Add button, so add it and then move it.
Studio: Add tab, find Text field, drag it into the row that holds "New thing" and Add, then in the right panel set Label to Who brings it; open For developers: the field's name and set it to draft.who.
Agent: (the Stack id is the one holding the TextField and the Button in the outline)
add_node({ design: "my-first-app", page: "Things", target: { kind: "slot", parentId: "<the Stack id>", slot: "children" },
type: "TextField", props: { label: "Who brings it", field: "draft.who" } })
move_node({ design: "my-first-app", page: "Things", nodeId: "<the new id>", target: { kind: "slot", parentId: "<the Stack id>", slot: "children" }, index: 1 })Show who brings each thing under its title. A row's text is bound to the row's data with $bind; item.title means "this row's title". The ListItem has repeat: things: it draws once per thing.
set_props({ design: "my-first-app", page: "Things", nodeId: "<the ListItem id>",
props: { text: { "$bind": "item.title", "sample": "Folding chairs" },
supportingText: { "$bind": "item.who", "sample": "Priya" } } })sample is what the canvas draws; the app shows the real value.
Now the toggle. A round check button in each row calls an action pack, and a word "Packed" takes its place once the thing is packed. Showing and hiding by data is hideWhen and showWhen on any widget, bound to a value of the row.
add_node({ design: "my-first-app", page: "Things", target: { kind: "slot", parentId: "<the ListItem id>", slot: "trailing" },
type: "IconButton", props: { icon: { "$icon": "check_circle" }, label: "Mark packed", action: "pack",
hideWhen: { "$bind": "item.packed", "sample": false } } })
add_node({ design: "my-first-app", page: "Things", target: { kind: "slot", parentId: "<the ListItem id>", slot: "trailing" },
type: "Text", props: { text: "Packed", variant: "labelLarge", showWhen: { "$bind": "item.packed", "sample": true } } })
describe_action({ design: "my-first-app", name: "pack", calls: "Things.pack", description: "Marks the thing packed." })calls: "Things.pack" is the backend operation the action runs. Studio: select the check button; in the panel, What it does: Run an action, Action name pack; under it Runs shows the path it posts to.
One dialog
A dialog opens from a button that names it. Add the dialog first (so it has an id), put words and a button in it, then add the button that opens it.
add_node({ design: "my-first-app", page: "Things", target: { kind: "content" }, type: "Dialog",
props: { title: "Packing tip", layer: "Packing tip dialog" } })
add_node({ design: "my-first-app", page: "Things", target: { kind: "slot", parentId: "<the Dialog id>", slot: "children" },
type: "Text", props: { text: "Put the heavy things in first. Cards and snacks go on top." } })
add_node({ design: "my-first-app", page: "Things", target: { kind: "slot", parentId: "<the Dialog id>", slot: "actions" },
type: "Button", props: { text: "Got it", variant: "text" } })
add_node({ design: "my-first-app", page: "Things", target: { kind: "content" }, index: 2,
type: "Button", props: { text: "Packing tip", variant: "text", opens: "<the Dialog id>" } })The last answer says "Button came in a row of its own (only widgets and layout go there)". That is fine.
A second page, linked from the first
Remove the placeholder Home page (nobody needs fake statistics), and add a page of words. The new page joins the navigation by itself.
remove_page({ design: "my-first-app", page: "Home" })
add_page({ design: "my-first-app", name: "House rules", route: "/house-rules", template: "blank", navigation: true })
add_words({ design: "my-first-app", page: "House rules", target: { kind: "content" },
text: "# House rules\n\nEach person brings what they said they would. Mark it packed when it is in the bag.\n\n- Say who brings what\n- Mark things packed\n- Nobody brings the same thing twice\n\n## Forgot something?\n\nTell the host. There is always a spare pack of cards." })add_words turns Markdown into widgets in one call: "2 headings, 2 paragraphs and a list of 3". Studio: + beside "Pages", New page, name House rules, template Blank (or Article), Save; then paste your words with the Add tab's text widgets.
Both pages now list each other in the rail and the bottom bar. That is the link.
6. Apply the database change and look (5 minutes)
npx globetrotter syncThe error and the warning are gone. The sync wrote backend/migrations/db/sqlite/0002_changes.sql (and the Python one beside it). Read it; it is short, and it is the only way the database ever changes:
cat backend/migrations/db/sqlite/0002_changes.sqlYou will see ALTER TABLE "item" RENAME TO "thing", RENAME COLUMN "done" TO "packed", ADD COLUMN "who" TEXT. Existing rows survive. Nothing has applied it yet:
npx globetrotter doctor✗ migrations written = applied (local): The backend is behind its migrations: 0002 is waiting …
run: cd backend && GLOBETROTTER_ENV=local uv run python -m my_first_app_core.migrateRun what it says:
cd backend && GLOBETROTTER_ENV=local uv run python -m my_first_app_core.migrate && cd ..db: applied 0002(dev applies waiting migrations when it starts, never while it is running.) Now doctor ends with everything that can be checked is in sync.
See: open http://localhost:3000/g/things on a phone-sized window.
- Press Add with "New thing" empty: "Say what to bring." under the box.
- Add
Card tableandSamas who. The row appears with "Sam" under it. AddFolding chairs. - Press the round check on one row: the button turns into the word "Packed".
- Press Packing tip: the dialog. Got it closes it.
- Press House rules in the bottom bar: the second page; Things brings you back.
- Reload the page: the list is still there, in the database.

You can see the same operations in the studio: Backend → Services, click POSTpack. The card says what it does, who may run it, where its code is (ThingsBase.pack, overridable in my_first_app_impl/things.py) and has Try it with a Press button that calls the real running backend.
7. The checks, and a production build (5 minutes)
npx globetrotter sync --checkIt writes nothing. A clean run ends with no ✗. It always carries one warning on a new project (pyright did not run: pyright is not in backend/.venv); that is information, not a failure.
npx globetrotter doctor✓ design = generated pages: every page is what the design writes
✓ generated types = bindings: the bindings type-check against the generated types
✓ service = generated backend = your code: the backend is what the service writes, and your code has what it needs
✓ service = pages: the pages and the service agree on every path
✓ migrations written = applied (local): the local database has every migration the code needs
✓ project version = vendored tarballs = this CLI: Globetrotter 0.3.0 (commit 850fdc9)
everything that can be checked is in syncThe backend's tests (they were written from the contract; they press every operation with generated inputs):
cd backend && uv run pytest -q && cd ................ [100%]
14 passed in 2.06sThe production build. Stop dev first (Ctrl-C in its terminal): both use the same .next folder.
cd frontend && npm run build && cd ..├ /g/[[...path]]
│ ├ ● /g/things
│ └ ● /g/house-rules(About 7 seconds.) The pages are real Next.js pages; npm run start --prefix frontend would serve them. A last look at what the tool thinks is left:
npx globetrotter statusIt lists each page as ready or what is left ("1 action without a description: reload"), and says what has not been checked in the app yet (a11y, presses, monkey). Run npx globetrotter a11y with dev running to read the pages with the accessibility engine; on a new project it reports a few moderate findings and one serious ("A control reached by Tab is hidden under a fixed bar") on the Things page at laptop width. It is a real finding for you to fix, not a fault of the tutorial.
Commit:
git add -A && git commit -m "Things to bring"What you did, mapped to the idea
| You did | Idea |
|---|---|
| renamed an entity and saw what followed | one design, many generated places; a rename is carried by name |
| typed a validation sentence once | the backend says it; the page puts it under the right field |
$bind, repeat, showWhen |
data in a page is a contract, not a copy |
sync wrote a migration you read and applied |
the tool never changes your database by itself |
doctor named a missing migration |
every way the parts can disagree has a check |
Next: Tutorial 2: where your own code goes, and what happens when you break things on purpose.