Start here
On this page
Globetrotter is a design studio for Material Core that writes Next.js code into your project as you design, and lets a Claude Code agent work on the same design beside you. No export step, no second copy of anything.
Never seen Globetrotter, with a zip and a project to work on? Learn Globetrotter: a path of tutorials from the zip to a change in a real app.
Installing on another computer? Install Globetrotter: one command from the shared folder, new project or existing.
Starting a project of your own? Follow Your first project: the steps in order, with what you should see. Then Build a page: one real page, with a press, data, states and the checks.

The model in four sentences
- One file per app is the truth:
designs/<name>.design.json. The studio, an agent and your editor all write it; every write is validated. - A generated page holds nothing that is not in the design. It is a real
client component under
src/generated/, never edited by hand. - Data is a contract, not a copy. Bind a prop, repeat a row, name an
action, and the generator writes TypeScript types, an OpenAPI document and,
once, a binding module in
src/bindings/that is yours. - Drift is caught by tools. Stale code fails
sync --check, a binding that no longer fits failstsc, and contract or accessibility problems are lint findings on a node.
Install into a project
Node 20 or newer. Globetrotter is not on npm yet, and the globetrotter package there is
someone else's. You install from the bundle you were given, globetrotter-<version>/ (or its .zip; Install Globetrotter):
node globetrotter-<version>/install.mjs new my-project --as frontendIt copies the packages into vendor/globetrotter/ in the project, runs init, installs and checks. (Cloning this repository and running node packages/cli/bin/globetrotter.mjs init --as frontend --cwd ~/my-project from the clone does the same, and is for people changing Globetrotter itself.) init writes into an empty folder, or an existing Next.js app router project, and points package.json at the packages. The installer has already run npm install; had you used init alone you would run it now. Then, in the project:
npx globetrotter dev --port 3415 --app-port 3445init does not start anything: dev starts the studio and the app. The ports are yours to choose (left out: 3100 and 3000); to keep them, put "studioPort" and "appUrl" in globetrotter.config.json. With a backend that has sign-in (organisations or not), one more step before anyone can sign in locally: after the migrations, GLOBETROTTER_ENV=local uv run python -m <app>_core.devseed (Rust: GLOBETROTTER_ENV=local cargo run -p <app> -- devseed), from backend/, makes the development people (<role>@example.com, password dev-<role>; members of an organisation when there are organisations); without it the app says "You are not in a workspace yet" (Quickstart). Your first project walks every step with what you should see.
The packs sit inside the project, so a clone of it installs too (file:./vendor/globetrotter/…, with a README): commit that folder.
init asks what you are making (pages, a backend, both, or a static site;
--as answers in a script; the app is on 3000 and the backend on 8000 unless something holds them: init says so and writes the next free pair, or name them with --app-port 3183 --backend-port 8140, which stops and names the free ones when yours is held) and writes the config, a first design, the generated pages and the routes
that serve them, the stylesheet with the token layer, a Globetrotter section
in CLAUDE.md, and two scripts for CI: design:check (the pages are current)
and design:words (no copy is still a placeholder). It keeps any file you
already have. dev runs the studio at http://localhost:3100 (another port: "studioPort" in globetrotter.config.json, or --port; when it is taken, dev prints the command that works) and your app at
http://localhost:3000, and beside a backend the service the app calls (it
installs, migrates and serves it; Backends). With both sides,
frontend/ is a codebase of its own: run npm install at the root and then (cd frontend && npm install), as init prints. A root install alone builds without an error but leaves the pages unstyled (the stylesheet reads the widgets from frontend/node_modules). A static site builds with npm run build to out/: plain files, each page a folder's index.html, for any host.
Put it on the internet
Not yet run against a real Cloudflare account: everything below describes what deploy does and has been checked only against a stand-in for wrangler, so read the first real deploy's output with care.
npx globetrotter deploy puts the pages on Cloudflare Pages (free): it checks you are signed in and that the name is free, syncs, builds plain static files in a copy (your running dev app is not touched; the copy is removed afterwards, --keep leaves it) and uploads them with wrangler, Cloudflare's own tool. If the project has no wrangler, deploy runs it through npx, which downloads it the first time (a minute, no question asked); npm install --save-dev wrangler keeps a copy instead. Sign in once with npx wrangler login (it opens your browser; the same download applies), or put CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID in .env. --dry-run builds and says what it would send, asks Cloudflare nothing unless a token is set, and changes no file of the project (it does not remember a --backend-url; a real deploy does). A site of that name that this folder did not deploy is never replaced by accident, so a copied project does not publish over the original: --replace publishes over it, --name picks another. The address is the one Cloudflare lists for the project (an address like <name>.pages.dev); it is remembered in globetrotter.config.json. Your pages live under /g/… (the front door / passes a visitor on to the first page).
A project with a backend, before you press Publish:
- Host the backend on a public
https://address (itsbackend/Dockerfile), withGLOBETROTTER_ENVset to something other thanlocal. Give deploy that address:--backend-url https://…(remembered after the first real deploy). - Real people sign in there: the development people (the roles'
dev-…keys and seeded accounts) exist only locally. Create the first real account on that backend. - Run the migrations on that backend's database,
python -m <app>_core.migrate, before the pages go live. - A SQLite file on a free host's disk is lost when the host restarts or redeploys; use a hosted Postgres there.
- Whenever the service changes, deploy the backend first, then the pages.
- Addresses of the pages are under
/g/, for examplehttps://<name>.pages.dev/g/items/.
Deploy forwards /api through a Pages Function that carries the organisation header like the app's own forward and sends the visitor's address in X-Forwarded-For. Otherwise the backend sees Cloudflare's address as the connection's, and its sign-in limits count every visitor as one. The generated backend's python -m <app>_fastapi starts uvicorn from code and passes no trusted addresses; uvicorn reads its default from the environment variable FORWARDED_ALLOW_IPS (* trusts any sender), so set that where the backend runs, and only when it can be reached through Cloudflare alone (anyone who can reach it directly could then claim any address). Deploy also takes one look at the backend's /ready before uploading and warns, without stopping, when it does not answer or says 503. What a static site has no server for (src/proxy.ts, middleware.ts, next.config rewrites, headers and redirects) is left out, and the build line names each. Only NEXT_PUBLIC_* values of the app's .env* files reach the build (one set in your shell, or in the studio's own environment, is not used, so a deploy from the studio builds what a deploy from the terminal does). The build copy holds your whole app folder (a root lib/, components/, content/ and a tsconfig paths target come along) except installs, .git, the backend, local databases and env files. Sync runs first, and writes no migration: it rewrites the generated pages (and the backend's generated code if the service design changed); with a migration waiting, deploy says to migrate and redeploy the backend before these pages go live.
A page that opens on one record (/books/[id]) is built once as a shell and served at every record's address by _redirects rules (the pages beside it, like /books/new, are named first, because Cloudflare applies a rule even where a file exists and only the first match); it reads the id from the browser's address, so deep links, reload and Back work. An id that contains an encoded slash (a%2Fb) is not found on the static site (the host decodes it before matching a rule), where the dev server shows "no such record"; that is a known difference. What cannot be static is code that runs on a server (route.ts files), which deploy names.
The studio's Documentation link opens these pages (the words and still pictures ship in the studio's pack; the screen videos play there too).
Then give Claude Code the tools: Work with an agent says what works today (a .mcp.json in the project) and what works once the repository is public (the plugin).
Coming back to an older project
With a bundle: node globetrotter-<version>/install.mjs upgrade ., run in the project (Upgrade a project). By hand, for someone with the repository: from the clone, replace the tarballs in the project's vendor/globetrotter/ with newly packed ones and install them by name (the version stays 0.2.0, so a plain npm install answers "up to date" and keeps the old files), then sync:
rm -f ~/my-project/vendor/globetrotter/*.tgz
for p in core widgets-m3 primitives target-rust target-python studio cli; do (cd packages/$p && npm pack --pack-destination ~/my-project/vendor/globetrotter); done
cd ~/my-project && npm install ./vendor/globetrotter/*.tgz
(cd frontend && npm install ../vendor/globetrotter/globetrotter-core-*.tgz ../vendor/globetrotter/globetrotter-widgets-m3-*.tgz) # only when the pages live in frontend/
npx globetrotter syncSync rewrites only what it generated: the pages, their types, the contract. Your bindings, layout, globals.css, next.config.ts and tests are never touched; where one of them needs a line, sync prints it with ! and the exact edit, and stops printing it once it is made. The changes you make by hand, if your project is older than they are:
| Since | What to do | Said by |
|---|---|---|
| fonts served from the package | @import '@globetrotter/widgets-m3/fonts.css'; in globals.css, and the Readex_Pro, Inter, Roboto_Mono calls out of the layout |
sync |
a static site's links end in / |
NEXT_PUBLIC_GLOBETROTTER_TRAILING_SLASH: '1' in next.config.ts's env |
sync |
| a backend beside the pages | npx globetrotter add backend: it writes the backend, adds the .gitignore lines, and prints the /api rewrite for next.config.ts |
add backend |
| the theme on a page rendered in the browser | copy node_modules/globetrotter/templates/app/ThemeScript.tsx beside the layout and put <ThemeScript /> where the inline theme script was (a not-found page in dev kept the default theme) |
this page |
| a binding you edited | it keeps its own code: the stub's newer catch (a lost connection said in words) and every field's error reach it by hand. Move it aside, sync, and compare with the stub sync writes | this page |
Your first five minutes
The studio opens with a four-screen tour. It is behind the grid icon in the app bar whenever you want it again.

1. Click anything on the canvas. The panel on the right edits it: what it does, then Style (corners, border, fill, padding, your own CSS classes: one click each, drawn in the design's own brand). The app bar says Saved within half a second, and your app at :3000 already shows the change. Round, square, outlined, filled, spaced? Select it, open Style: Build a page.

2. Press P. Play mode: switches flip, tabs select, dialogs open, and links move between pages the way the app does. Escape brings the editor back.

3. Drag the frame's edge. The caption says which size class the shell picked and why. Each docked panel moves the steps up; a side panel gives way first, so at 1280 px a page with one keeps the rail and opens the panel from a button. Design a page has the ladder.

4. Use Ask Claude, the box under the panel: it names what it will change (the page, or the widget you selected). Say the change in words; Enter opens its log, where Run sends it. The canvas shows where the agent works, and every change it makes is listed with a Revert.

5. Select nothing and read the page panel: its states and lint, and under More the shell regions, theme and brand with a live contrast audit, the data contract, history, and Memory: what this project usually does, and a line to write a decision down. Once three widgets of a kind agree on a value, the next one starts with it.
6. Press Map (above the canvas) to see the whole app as boxes and arrows: every page, what leads where, the presses that do nothing yet. Build a page has it.
7. Press ⌘K. Everything the studio can do, typed. The highlighted command draws what it changes before you press Enter.

What is in the box
| Package | What it is |
|---|---|
globetrotter (CLI) |
init, add (backend, frontend, target), dev, studio build|start, sync (--check), mcp, check, shots, tour, states, presses, a11y, m3, monkey, journeys, diff, words, status, memory, export, deploy |
@globetrotter/studio |
the editor, staged into your project by dev |
@globetrotter/widgets-m3 |
the Material Core widget library your pages import, and the catalogue the studio places from |
@globetrotter/core |
the engine: schema, catalogue rules, codegen, lint, contract, memory |
@globetrotter/primitives · target-python · target-rust |
the backend: a service design's building blocks, and the code generated from it (Backends) |
plugin globetrotter |
the MCP tools and a skill for Claude Code |
The repository's examples/ are three real projects with READMEs and
pictures: mail, fieldops and storefront.
Where to next
- Building one real page: Build a page.
- Designing: Design a page.
- Wiring data, services, stores: Connect data.
- Letting Claude Code do either: Work with an agent.
- Any exact rule, name or number: Reference.
- The server side: Backends.