Globetrotter docsversion 0.3.0 · 2026-12-04

Your first project

On this page
  1. 1. Get the bundle
  2. 2. Make the project
  3. 3. Start it
  4. 4. The studio
  5. 5. Make a page
  6. 6. A project is one app
  7. 7. Build a real page
  8. 8. Before you call it done
  9. 9. Claude Code in the project
  10. Part 2: a backend, later
  11. Rough, or not proven
  12. Next

From an empty folder to a real page with data, presses and states, in the order to do it. Each step says what to run or click and what you should see. Part 1 is the pages alone (no backend, nothing but Node 20 or newer). Part 2, at the end, adds a server later.

A new project's studio: open the design, press New page, name it Tasks, pick List-detail, Create; the page is already in the app.

1. Get the bundle

Globetrotter is not on npm yet (the globetrotter package there is someone else's). You were given a folder globetrotter-<version>/ or its .zip: unpack it anywhere. Nothing else is needed from the owner; Install Globetrotter has what it needs on your computer (Node 20 or newer). (People changing Globetrotter itself clone the repository and run init from the clone: node packages/cli/bin/globetrotter.mjs init --cwd ~/my-project --as frontend, then npm install in the project.)

2. Make the project

node globetrotter-<version>/install.mjs new ~/my-project --as frontend
cd ~/my-project
  • The installer copies the seven packages into ~/my-project/vendor/globetrotter/ (commit that folder: a clone of your project then installs with a plain npm install), runs init, writes package.json so it names them there, and runs npm install and globetrotter doctor. All seven are needed even for pages alone: they are the CLI's dependencies. The folder ~/my-project must be empty or not exist yet.
  • The first npm install takes about half a minute and warns about two deprecated packages: fine. If it ever fetches a globetrotter you did not pack, it is someone else's package on npm: use the tarballs in vendor/globetrotter/.
  • init takes a few seconds. You see a + line for each file it writes, the design linted (designs/my-project.design.json (2 pages)), the generated pages, and a few lines starting with !. It does not start anything; npm install is the one it asks for (it says "10 high severity": transitive, nothing to do).
  • --as is frontend, backend, both or static; left out, init asks. This page is frontend. With both the pages live in frontend/, and it prints a second install, (cd frontend && npm install): run it too, or the pages build unstyled.
  • To update to a newer bundle: node globetrotter-<version>/install.mjs upgrade . in the project (Upgrade a project). A plain npm install would keep the old files.

3. Start it

npx globetrotter dev --port 3415 --app-port 3445

Use any two free ports. Left out they are 3100 for the studio and 3000 for the app. It prints:

studio → http://localhost:3415/studio   (editing /…/my-app)
app    → http://localhost:3445/g

and, when the app's port is not the one in the config, a line starting ! saying globetrotter.config.json still says appUrl http://localhost:3000. The checks that open your app (look_at_page, presses, a11y, shots) read that value, so keep it equal to the port you start it on. To keep both ports, put them in globetrotter.config.json and run a plain npx globetrotter dev:

"studioPort": 3415,
"appUrl": "http://localhost:3445"
  • If a port is taken, dev prints nothing started: … and the command that works (npx globetrotter dev --port N --app-port M). Run that.
  • It is ready in under twenty seconds. The first studio page takes a few seconds to load, and each page of the app compiles the first time it is asked for.
  • Leave it running. Ctrl-C stops both.

4. The studio

Open the studio link. The first screen has three cards (Open a design, Press P, Ask the agent) and your design, my-app, with 2 pages. Click its name. A five-step tour opens over the canvas: Skip (or Next).

The studio editing a page
The studio editing a page
  • Left: Layers, Add, Words, Backend. At the top of Layers, the pages (Home /, Items /items) with + and a page menu.
  • Middle: the page, drawn by the real widgets at the width chosen in the bar (Phone to Wide).
  • Right: one design panel (what the selection does, Style, States, Content, More) with Ask Claude under it. With nothing selected it is the page: its name, its route, its states, and under More how it arrives, pull to refresh and its shell regions. Above the canvas: Map (the app as boxes and arrows) and Code & handoff.

5. Make a page

Press New page. The dialog has the name (it starts as "New page", selected), the route under it (it follows the name), and the templates as small pictures: Like this project, Blank, Article, Dashboard, List-detail, Detail, Settings, Form.

  1. Type Tasks.
  2. Pick List-detail.
  3. Press Create.

The page is at /tasks, in the layers and in the app at http://localhost:3445/g/tasks within a second or two. Make another: New task, Form: /new-task.

New page as it opens: the name selected, the route under it, and the templates, each a small picture of the page it makes in this design's shell
New page as it opens: the name selected, the route under it, and the templates, each a small picture of the page it makes in this design's shell

The words a template brings are placeholders (Label, Description goes here.): write them on the canvas. npx globetrotter words --check finds those that remain.

6. A project is one app

A second design is not a second app. Press the back arrow (All designs), New design, type blog, Create.

A second design made in the same project: its first page lands at /blog, and the studio says why.

  • The new design's only page is at /blog, not /, because / belongs to my-app. A notice says: "Home is at /blog: this project's / belongs to my-app. A project is one app: its designs add pages to it, and a route belongs to one page across all of them."
  • Its navigation lists only its own pages. The app serves the pages of every design together, as one site.
  • A page named Tasks while my-app has /tasks: the dialog reads Route: /tasks-2 (/tasks is Tasks in the design my-app; a project is one app, so a route belongs to one page), and the page is made at the free route.
  • Typing a taken route into a page's Route field turns it red: "Tasks in the design my-app lives at /tasks: designs in one project share one app, so a route belongs to one page. Free: /tasks-2." and Enter does not take it.
  • If a file was edited so that two pages share a route, the chip at the top says 1 error (duplicate-route), its Fix moves one to /tasks-2 and the links follow, and npx globetrotter sync --check prints the error.

Use a second design only for a separate group of pages you want in its own file (a blog). For more pages of the same app, add pages to the same design.

7. Build a real page

The next page, Build a page, does it on a real app: a page with a button that asks first, says what happened and goes on, a list bound to data, the page's loading, empty and failed states, and the checks.

8. Before you call it done

npx globetrotter sync --check     # every design: current and valid. Lint errors exit 1; notes print and exit 0
npx globetrotter status           # each page: ready to hand off, or what is left
npx globetrotter words --check    # no placeholder copy left

If sync --check says a file is out of date, run npx globetrotter sync.

Handoff: what is left on a page
Handoff: what is left on a page

9. Claude Code in the project

Work with an agent has the three steps: the plugin (or a .mcp.json), /mcp, and what to ask first.

Part 2: a backend, later

Everything above works with no server. To add one, run npx globetrotter add backend in the project (or start a project with init --as both, which puts the pages in frontend/ and the server in backend/). You need uv for the Python server. The rest of this page is the backend's own path, in the order to do it.

With both sides init prints two installs, npm install and (cd frontend && npm install): run both (the stylesheet reads the widgets from frontend/node_modules, so a root install alone builds with the pages unstyled). npx globetrotter dev then also prints backend → http://localhost:8000, installs, migrates and serves it on its first start (--no-backend and --no-app leave one out), and the ports of the studio and backend are in globetrotter.config.json ("studioPort", backend.targets.python.port). On the first start it says run npx globetrotter sync once in another terminal: do. If you only built a backend (--as backend), the studio opens on the Backend view.

Design an entity and its operations

Open the Backend view, Entities. + Entity takes a name; then + Field on its card, once per field (a type, whether every row must have it; pick the field afterwards for a rule and the words that refuse it). An entity gets operations from Services: + Service (a name, Tasks, and a route, /tasks: type it, it does not follow the name), then a Query reads and a Command changes. Both are generated whole, with nothing to write, once you say what they touch:

  • a list: a Query whose What it answers with is your entity's rows, A list of them on;
  • an add: a Command named add, create or new in a service about one entity is read as a create of that entity, in the studio's + Command and in an agent's add_operation alike. It is generated whole once it has a + Param for every field a row must have; give it one for every input of the form, done too, since an input with no param goes nowhere. A param made from an optional field, or for a link that may point at none (projectId for a relation that is not Always), is optional, so a form may leave it blank. A param named for a field of the entity (quantity, due, done) takes that field's type, a whole number, a day, a yes/no, not text (one for a field with a set of values, priority, shows in its card as “one of Low, Normal, High”; the contract carries the field's values, and the Fix that offers the form's radio group reads them from the field); one named for a key (id, taskId) takes the key's, a uuid or a whole number; lint's param-key-type is an error when one is typed otherwise, and its Fix gives it the key's. After a create the stub binding of the form goes to the list's page by itself, once the service says yes, and the list says "Task added." (next dev too); with no page to go to, the form itself says "Task added." (a save says "Task saved.", a removal "Task removed."). Do not also set the Submit button's Link to: the page would leave before the answer and a refusal would never show (lint says it, action-link-leaves-early; its Fix takes the link off only where the stub goes on to another page by itself, and a form that posts to its own page's service stays there, so the finding says the link is the only way on). A form field the command has no param for is said once, by contract-drift: the input that goes nowhere and the required param nothing sends, each by name. Until every required field has one, the command's card says Its code: yours to write, under Why the field it lacks, and under To have it generated the one change to make; the operation answers 501 with the same words.
The Backend view's Entities tab
The Backend view's Entities tab

Or ask what the pages need and let it write them: propose_operations (an agent's tool, step 10) names every page whose data nothing answers, each with the call that adds the operation.

  • If an operation answers 501, it is does: custom: its body is yours, in backend/packages/<app>_impl/. Your code.

Bind a list and a form

The page's data contract is in the page panel's More with nothing selected (click the empty canvas): bind a prop to a path, repeat a row over a collection and bind item.<field> inside it, and name an action on a button. A page reads the service whose route is its own (a page at /tasks reads the service at /tasks; its rows are tasks) through the Query named list: a Query of another name is not read by a page (rename it, or the panel says there is none). A form's page at that route is left out of it, but a page with no list of the entity's fields in its data at a service's route makes the list yours to write: lint's page-data-not-list says so, with the way out, and an action named like a command calls it (add on that page runs Tasks.add; the button's Runs picks another). Each save writes the types, the contract and a binding module frontend/src/bindings/<slug>.ts that is yours.

The page's data contract in the page panel
The page's data contract in the page panel

A page named for an entity whose service has a list Query (Tasks, from the Dashboard, List-detail or Like this project template) is bound for you, once it is at the service's route (the dialog offers /tasks): its list repeats over tasks, and the template's sample stat tiles and table are not drawn. Each row's headline is the first of: a field called name, title, label or subject; any text or choice field; the name of the first thing it links to ("Tent #65", for a loan of an item); a date, in words; else the first eight characters of the row's id. Its supporting text is the next text, the next link's name, or a date. A binding starts with no rows and loading, so the running app shows only what the service holds (never a made-up row, even on a slow API). The page also gets a loading state and an empty state ("No tasks yet."), its hero says "Tasks" (no made-up subtitle), and its New button (a plain List page's; a List–detail page has none) opens the create form for the same entity (never the edit page; left out while there is none; with several forms of the entity, the one that has the picker for its relation, else the newest). Like this project keeps your shell (app bar, navigation, sign out) and conventions but, for an entity, is always the list: a hero in the entity's words and one section of rows, whatever the other pages hold; the template's hero greeting, subtitle and its two buttons are left out. Forms, record pages and the sign-in have no navigation of their own, so they are not counted when it asks which of your pages have one. An entity no list Query answers gets no sample content either: the hero in its words, and no tiles, rows or placeholder pane. A page with another name keeps the template's samples, and binding them is yours.

A list whose Query declares sortable fields gets a Sort by choice above its rows, and a Query param named for a choice field (category) gets one choice of its values with All; each is a field of the page named as the param (sort, category), so picking one asks the list again. A param named for one of the entity's relations (member on Loans, which a Detail's list of what belongs to it adds) gets a choice among that entity's rows, All first, with a Find bar above it when that list can be searched; the address /loans?member=<id> has it chosen, and All takes the param off again. It is a radio group, so a long list of items is a long group (the bar finds one; there is no drop-down in the library yet). A list made before this has the notes list-lacks-sort and list-lacks-filter (which covers a relation too), a Fix each. A picker over another entity's rows (the item of a New loan) has a Find bar when that list takes a q, query or search; without one the note picker-lacks-search has the service's Fix (the q param and searchIn), and then the page's. What you type is sent under the name that list takes (?query= for init's Items), and a row you chose stays among the rows after a search narrows them.

  • A Detail made before the relation or the param gets the note detail-lacks-related, with a Fix for each thing missing: the parent's name, the list of what belongs to the record, the param that list needs (that one writes the service). Its New loan button carries the record (/new-loan?member=[id]) when the form already had the picker; made the other way round, the note detail-new-lacks-link has the Fix that gives the button the address.
  • Any list page given ?client=<id> in its address (/projects?client=<id>) keeps that client's rows.
  • A date shows as a date in the reader's language ("Nov 10, 2026"); a task's due date is the row's trailing text, and says "Overdue ·" in the error colour once it is past and the row is not finished (the record's own page says it the same way, for the field the list's row box ticks). What finishes a row is the box on it: a list made for an entity with a boolean named done, completed, complete, returned, closed, finished, resolved, paid, shipped or delivered puts that box on each row (ticking it saves the row), and the box's field is the one that stops Overdue. That name list is only the guess the page is made with: add the box for another field name, or take it off and the dates are marked whatever the flag says.

A list page from the templates says what is past its rows and can be searched. Under the rows: "20 of 63" with Show more while rows remain, then "All 63" (a list the service only cuts says "Showing the first 50."); Show more reads the next page or cursor the list's own answer named (X-Total-Count, X-Next-Cursor, X-Truncated). A Detail's list of what belongs to it does the same. Above the rows, a search bar when the list's Query takes a q param (with searchIn, the fields it reads): typing asks again with ?q=, together with what the list is kept by, and a search that finds nothing says "No tasks match “zzz”." (a list with nothing in it says "No tasks yet."; a page made before has the note search-lacks-no-match, with the Fix that adds the words). A list made before this has two notes with a Fix each: list-lacks-more, and list-lacks-search, whose first Fix adds the q param and searchIn to the service and whose next, once it is saved, adds the bar to the page; a service that pages (page and size) with a page that has no Show more is list-unpaged, with the same Fix. A form's Cancel goes where the person came from: the record named in the address (?client=…), else the list. A form that chooses two records (a loan's item and member) starts with the one the address names (?member=… or ?item=…), and a save lands back on that record's page, else on the list.

Save, wait, sync, migrate

A studio save of the service (a new field, a new entity) changes the generated code and writes no migration. Until the database has the column, the app is ahead of it. It answers 503 and says why, not a 500:

  1. Save in the studio. Before it saves, the field's review shows the SQL the next migration will write, worked out from the last migration written (not from the save before); what it says this save throws away is this save's own, and a drop an earlier save left waiting for the sync is listed apart as waiting. The backend then answers 503 naming the column (or the new entity) and both commands; the dev log says the same.
  2. In the project folder, run npx globetrotter sync. It writes the migration; read it.
  3. Apply it, from backend/:
cd backend && GLOBETROTTER_ENV=local uv run python -m <app>_core.migrate

<app> is the design's name with - as _; the 503, the dev log, init and the studio's Migrations note print the line with yours in it. The GLOBETROTTER_ENV=local is said out loud on purpose: an unset environment is production, and the runner stops. Reads of entities the save did not touch keep answering 200 meanwhile.

Data and migrations has the rest. If you run the Rust target, the same 503 appears after a rebuild and before sync, with cargo run -p <app> -- migrate as the runner.

See it in the app

Open :3000. The list shows rows from the backend, a form saves one, and a refusal comes back in the design's words under the field. It names every field refused at once, not one per press: a blank title, a blank required date (a date input left empty is not sent, and a create names what it was not given) and a date that is not a day are all marked on the first press, and the focus goes to the first. Cancel on a form goes back to the record the address names (?item=…), else the entity's list; after a save the form's history entry is replaced, so the phone's Back skips it. A list that is long says so under its rows: with Numbered pages "20 of 63" and Show more (until "All 63"), without them "Showing the first 50." (the list is cut there, and says it); a record's related list does the same.

A rejected form: the field the API named, in its error state with the focus and the message under it
A rejected form: the field the API named, in its error state with the focus and the message under it

To try an operation without the page, Try it in the Backend view runs the real operation and shows the status, the body and the audit rows it left.

  • If the list is empty after a save, you probably have not run the migration; look for the 503.
  • If a press does nothing and says nothing, npx globetrotter presses finds it; the cure is a notice in the binding.

Lists that answer a question; a number on a page; a rule that says no

A page lists the service's list at its route. To list only some of the rows, give the page a Query to read: in the studio the page panel's Reads (under More) (every Query that lists rows, with its where); for an agent set_page_reads(design, page, "Loans.overdue"), or add_page(..., template: "project", reads: "Loans.overdue") for a page made like the project's for that entity. contract-drift then holds the page's fields against that Query's rows, and sync has the page fetch /loans/overdue. A Query's where can reach across a relation (item.category=camping) and say today (returned=false, due<today).

A number the service already counts (a Shape with a count Part, answered by a Query such as Reports.out) goes on a StatTile in one call, show_count(design, page, nodeId, "Reports.out"), or one press: lint's tile-sample-number offers it on a tile that still shows the template's number. The page then reads that Query, with the loading and failed states of any list.

A unique that holds only for some rows (an Index with unique and when: returned=false, "Only while" in the Entities view) refuses a second loan of the same item with a 409; the form says its message, "That item is already out.", under the input it is about, as a wrong value is said.

Rough, or not proven

  • Globetrotter is not published: the packs come in the bundle you were given. The plugin installs from the repository, which is private for now (Work with an agent).
  • globetrotter deploy has not yet been run against a real Cloudflare account, only against a stand-in for wrangler.
  • Python on sqlite is the path walked from an empty folder. The Rust target is generated and tested in this repository on fieldops; on your own design it is untested.
  • The installed studio's /docs carries these words, their still pictures and the screen videos (mp4 and poster); the moving pictures that are GIFs and the three diagrams in Connect data are left out there (they are in the repository's docs/img/).

Next