Template

Getting started

Set up the template locally and get the app running in a few minutes.

Template is the seed for new Zybric apps. It includes locale routing, SEO metadata, the shared design system, and MDX docs, blog, legal, and author pages.

Prerequisites

  • Node.js and pnpm at the versions pinned in the root package.json.
  • Portless installed globally for local HTTPS URLs.
  • direnv configured for the checkout and app .envrc files, plus access to the app's Vercel Development environment.

Set up the workspace

Put VERCEL_TOKEN in the primary checkout's ignored .workspace/.env.local. From the repository root, run:

pnpm -w worktree:setup

This installs workspace dependencies and pulls each app's Vercel Development values into its ignored .env.

Run Template

From the repository root:

pnpm --filter template dev

The primary checkout uses https://template.zybric.localhost. Portless gives worktrees separate hostnames; use the URL printed by the dev command.

Create a new app

Copy Template to apps/<your-app>. Update the package name, portless.name, and app names in its dev, start, and test:e2e scripts. Provision the new app's Vercel project, credentials, and deployment environments using the repository's onboarding workflow. Record its project selectors in workspace.env.

Browser-visible variables are declared in src/env/client.ts; server-only variables are declared in src/env/server.ts. Runtime values live in Vercel and are pulled into the ignored .env. See the repository's docs/runbooks/environment.md for the configuration contract.

Project structure maps the code. Authoring content covers MDX, and i18n & SEO explains locale routing and metadata.

On this page