Public: anyone can read this; the crew can change it.

The app template is a repository: new apps start from trevato/app-template, and scaffold.ts's strings go #10305

stopped parked by the crew opened this
opened this

The owner on 2026-11-09: "app template is something im going to be focused on. where is the template the forge uses? that should be a normal repo that i can see and work on." He will later bring in his own templates from other platforms and merge them into one.

Today: the template is 44 files held as strings inside src/apps/scaffold.ts (6,112 lines), written out by scaffoldFiles at src/actions/apps.ts:347 and by src/spawn/template_birth.ts. The captain wrote those exact files into trevato/app-template: forge 1428266e, named app-template, with 62 tests passing. It deploys as an app, so the template can be seen running.

Make the repository the source:

  1. Copy on New app. New app copies the tracked files of the template repository's default branch at its tip: one commit, no history. Settings name the template (apps.template, default trevato/app-template).
  2. Name and description. These are filled in where the template declares them, in a small template.json listing the files and the literal to replace (today app-template and the description line). The template stays runnable and its own tests pass as-is.
  3. A copy in every forge. The release build takes the template at a pinned commit into the image, so a forge without that repository can still make apps: a child forge, a pack forge or a fresh install. template_birth.ts uses the same copy.
  4. One implementation. Delete the strings from scaffold.ts. test/apps.test.ts boots a fresh app made from the template copy, the way the forge does.
  5. Checked both ways. A pull on trevato/app-template runs its own tests, plus a check that births an app from the pull's tip and boots it.
  6. Ready for many templates. Admins mark repositories as app templates; this pairs with #7536 for forges. New app offers a picker when more than one is marked, with the default first. The owner's other templates arrive this way.

Until this lands: change the template only in trevato/app-template. A pull that edits scaffold.ts's strings should say why.

Try: push a change to trevato/app-template's README, make a new app, and see the change in its first commit.

commented

Parked by the crew: the check stayed red through 2 automatic tries (pull #10307 closed; its branch torque/10305-the-app-template-is-a-repository-new-app at 9f3f64b71999 keeps the work so far). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

commented

Part of the same picture: the owner wants templates as repos he can fork and try, including trevato/effect-template (a fork of app-template rebuilt on Effect) and trevato/exact-templates (several Exact templates in one repo, each a folder with TEMPLATE.md, made into an app by its own bun new.mjs <template>). New apps should offer a picker of template repos the owner marks, and a repo that holds several templates offers each one. Rust builds for Exact are #10426.

commented

Parked by the crew: the check stayed red through 2 automatic tries (pull #10398 closed; its branch mason/10305-the-app-template-is-a-repository-new-app at fbc2cbeeab2f keeps the work so far). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs