Canonical template for new Ternent Vue apps.
- Feature-driven architecture (
src/modules/*) - Route-folder modules (
src/routes/*) with CamelCaseRoute*.vue - Foundational
ternent-identity,ternent-utils,@ternent/uisupport - Identity create/import/export baseline flows
- Tailwind + custom light/dark theme pair
- PWA + offline-first defaults
- Lighthouse CI thresholds (95+ for perf/a11y/best-practices/seo)
The template landing page is driven by app.yaml.
- Author landing copy, links, snippets, and theme selection in YAML.
- Run
pnpm sync:ternent-app -- --app apps/<app-name>to regenerate typed runtime config. - The browser consumes generated TS config only; it does not parse YAML at runtime.
If you want the shortest route to a new branded app:
pnpm scaffold:ternent-app -- --name ledger-demo --title "Ledger Demo" --host ledger-demo.ternent.dev --theme aurora
pnpm --filter ledger-demo devThat creates apps/ledger-demo, writes apps/ledger-demo/app.yaml, and generates the runtime config immediately.
It also scaffolds:
.github/workflows/deploy-ledger-demo.yml- a publish entry in
.ops/publish.mjs
The only manual release setup left is:
- create the Vercel project
- add
VERCEL_LEDGER_DEMO_PROJECT_IDto GitHub Actions secrets
If you want to author the app from a manifest before scaffolding it, use a manifest outside apps/ first.
- Create a starter manifest:
pnpm prepare:ternent-app -- --out .ternent-apps/ledger-demo.yaml --name ledger-demo --title "Ledger Demo" --host ledger-demo.ternent.dev --theme aurora-
Edit
.ternent-apps/ledger-demo.yamlwith your copy, links, previews, and theme choice. -
Scaffold the app from that manifest:
pnpm scaffold:ternent-app -- --manifest .ternent-apps/ledger-demo.yaml- Run the app:
pnpm --filter ledger-demo devAfter scaffolding, the app’s source-of-truth manifest lives inside the app:
apps/<app-name>/app.yaml
When you change that file, regenerate the runtime config with:
pnpm sync:ternent-app -- --app apps/ledger-demosync:ternent-app updates generated app config only. Deployment workflow and publish registration are scaffolded when the app is first created.
Minimal config-first session:
pnpm prepare:ternent-app -- --out .ternent-apps/receipt-checker.yaml --name receipt-checker --title "Receipt Checker" --host receipt-checker.ternent.dev --theme harbor-rose
pnpm scaffold:ternent-app -- --manifest .ternent-apps/receipt-checker.yaml
pnpm --filter receipt-checker devFor each scaffolded app the generator wires in the repo-level release hooks:
.github/workflows/deploy-<app-name>.ymldeploys the tagged app to Vercel.ops/publish.mjsincludes the app so changeset releases emit a GitHub release entry
Recommended sequence:
- Run
pnpm prepare:ternent-apporpnpm scaffold:ternent-app - Edit
apps/<app-name>/app.yaml - Run
pnpm sync:ternent-app -- --app apps/<app-name> - Create the Vercel project and add
VERCEL_<APP_NAME>_PROJECT_IDto repo secrets - Commit the scaffolded app, workflow, and manifest
- Add a changeset that bumps the new app package when you want the first production release
If you are already logged into both the Vercel CLI and GitHub CLI, you can automate the project/secret wiring with:
pnpm setup:ternent-app-deploy -- --app apps/ledger-demoThat script will:
- link or create the Vercel project for the app via
vercel link --project <app-id> --yes - read
.vercel/project.json - set
VERCEL_<APP_NAME>_PROJECT_IDin GitHub Actions secrets - set
VERCEL_ORG_IDin GitHub Actions secrets
Optional flags:
--project <name>to use a different Vercel project name--repo <owner/repo>to target a different GitHub repository--scope <scope>to target a specific Vercel team/scope--skip-org-secretifVERCEL_ORG_IDis already managed elsewhere
- Update external dependencies to latest stable.
- Run
pnpm --filter ternentdotdev test:unit. - Run
pnpm --filter ternentdotdev build. - Run
pnpm --filter ternentdotdev lighthouse:ci. - Update template changelog notes.