Skip to content

feat(init): learn the mobile template kind - #205

Merged
Bccorb merged 1 commit into
mainfrom
feat/mobile-template-kind
Sep 13, 2026
Merged

feat(init): learn the mobile template kind#205
Bccorb merged 1 commit into
mainfrom
feat/mobile-template-kind

Conversation

@Bccorb

@Bccorb Bccorb commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #161 (the CLI half of fells-code/seamless-templates#40). Pairs with fells-code/seamless-templates#90, which adds kind: "mobile" and the Expo starter. This PR is safe to merge ahead of that one: with today's registry there is no mobile template, so nothing new is asked or placed. The SEAMLESS_TEMPLATES_REF bump to the release that carries the starter is a separate, later PR.

  • TemplateKind gains mobile; resolveTemplateAliases and resolveTemplateSelection become generic over the three kinds (--mobile=<id|alias>, bare --mobile / --expo, conflict detection per kind); parseInitArgs accepts --mobile.
  • The mobile starter is optional. runProjectSetupPrompts / runManagedTemplatePrompts ask "Mobile app" after the backend with none first (and initialValue: none); a flag answers outright; --yes takes none, since a native app brings prerequisites (an associated domain for passkeys) an unattended run should not opt into; a registry with no mobile template asks nothing. Both return mobileTemplateId?.
  • resolveSelectedTemplates takes the list of ids and skips undefined ones; a chosen starter lands at its manifest's targetDir (mobile/) with .env filled from the same scaffold context (EXPO_PUBLIC_API_URL from {{apiUrl}}).
  • seamless.config.json records services.mobile = { framework, path: "./mobile" } only when chosen; seamless check reports the mobile project only when recorded.
  • Success output (local and managed) lists the mobile app, how to start it, the Android emulator host, and where the passkey prerequisites are documented.
  • seamless verify announces the mobile templates it cannot drive instead of filtering them out silently.
  • Template copying skips .expo, ios, android. Help text and README updated.

Test plan

  • npm run coverage: 1019 passing, 99.40 / 96.75 / 99.46 / 99.40 (floor 99 / 95)
  • New tests: prompt optionality (none first, chosen, preselected echo, --yes none, absent from registry), alias/flag resolution and conflicts for mobile, local and managed scaffolds placing a third template, config generator, check detected/missing/absent, verify skip message, parseInitArgs
  • npm run build, npx eslint src

seamless-templates gains a third kind next to web and api, starting with an
Expo starter. The CLI treated an unknown kind as if it were not there: the
alias resolver skipped it, the prompts never offered it, and verify filtered
it out without a word.

A mobile starter is optional. init asks after the backend, defaulting to
none; --mobile=<id|alias> or the bare alias includes one; --yes scaffolds
without, since a native app brings prerequisites an unattended run should not
opt into; and a registry that predates the kind offers nothing. A chosen
starter lands at mobile/, is recorded as services.mobile, is checked by
seamless check only when recorded, and is called out in the success output.
verify announces the mobile templates it cannot drive.

Closes #161.
@Bccorb
Bccorb merged commit 89e6d48 into main Sep 13, 2026
3 checks passed
@Bccorb
Bccorb deleted the feat/mobile-template-kind branch September 13, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(init): handle the mobile template kind in init and verify

1 participant