Reusable Ankhorage app templates, presets, and manifest generators.
import { createCategoryAppManifest, createStarterTemplate } from '@ankhorage/templates';
const manifest = createCategoryAppManifest('social_community');
const creatorManifest = createStarterTemplate(seed, {
templateId: 'creator',
});Starter templates are category-aware. A category can expose one or more template variants.
For example, social_community provides a default community starter and a creator
starter.
Default resolution is deterministic:
- no
templateIdselectsdefault - an unknown template id falls back to that category's
default - an unregistered category falls back to
fallback/default
The generated manifest includes category-specific routes, screens, copy, and route icons.
Icons use the existing route icon: IconSpec property from @ankhorage/contracts:
{
name: 'groups',
screenId: 'social_community-community-starter-groups',
label: 'Groups',
icon: { provider: 'material-community', name: 'account-group-outline' },
}Auth behavior is not modeled as a visible navigation route in category templates. It remains
controlled by the manifest infra and settings.authFlow configuration. The original generic
starter remains available as the fallback template and preserves its existing sign-in screen.
fallback/default: Home, Details, Settings, Sign infood_drink/default: Discover, Menu, Reservations, Orders, Profilehealth_fitness/default: Today, Plans, Progress, Coach, Profileshopping_commerce/default: Browse, Search, Sell, Orders, Profilesocial_community/default: Feed, Groups, Messages, Profile, Settingssocial_community/community: Feed, Groups, Messages, Profile, Settingssocial_community/creator: Studio, Posts, Audience, Insights, Settings
Only categories that exist in AppCategory are registered. New category literals should be added
in @ankhorage/contracts before this package registers templates for them.
Add category-owned files under src/templates/starter/categories/<category>/:
content.tsfor category-specific copy and placeholder dataroutes.tsorroutes.<variant>.tsfor route names, labels, screen ids, and iconsscreens.tsorscreens.<variant>.tsfor ZORA node trees<variant>.template.tsfor manifest assemblyindex.tsforCategoryStarterTemplateDefinitionmetadata
Register the category in src/templates/starter/starter.registry.ts. Keep shared behavior in
src/templates/shared/*; category wording and navigation should stay inside the category folder.
bun run typecheck
bun run build
bun run lint
bun run test