Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

breeze-templates

Hosted pin-editor template manifest for Tailwind Breeze.

The Breeze mobile app ships with a set of bundled pin templates. This repo lets us publish new or refreshed templates without an App Store release: the app fetches manifest.json from this repo via the jsDelivr CDN and overlays it on top of the bundled set. The bundled templates remain an always-present offline fallback — every fetch/parse failure degrades to bundled, so a missing or malformed manifest can never break the editor.

What the app fetches

https://cdn.jsdelivr.net/gh/tailwind/breeze-templates@main/manifest.json

This URL is configured in the app via the EXPO_PUBLIC_TEMPLATE_MANIFEST_URL build-time env var. If that var is unset, the remote path is fully inert (bundled-only).

Manifest shape

{
  "manifestVersion": 1,            // envelope version (literal 1)
  "templates": [                   // each entry is a PinTemplate (validated client-side)
    { "id": "classic-bottom-bar", "schemaVersion": 1, "name": "Classic", "frame": { "aspect": "2:3" }, "layers": [ /* ... */ ] }
    // ...
  ]
}

Each template is validated against the app's pinTemplateSchema (parsePinTemplate) at load. Rules:

  • id — kebab-case, stable. A remote id matching a bundled id replaces that template in place (order preserved); a new id is appended; a bundled id absent from the manifest remains.
  • schemaVersion — currently the literal 1. A template authored for a newer schema simply doesn't appear on older clients (it fails validation and is skipped) — never crashes them.
  • Layers use brand-kit tokens (e.g. brand.headline), never literal hex/fonts, and normalized 0–1 coordinates. There are no image/thumbnail assets to host — templates are pure data.

remote-demo in the current manifest is a deliberate proof template (a copy of classic-bottom-bar with a distinct id/name) so a 7th template visibly appearing in the editor confirms the remote path is live.

Publishing (controlled-access requirement)

main is branch-protected: all changes land via a pull request (no direct pushes) so every publish is visible, reviewable, and revertible. The only real risk for this surface is who can write the manifest (defacement/supply-chain), not the inert data — so PR-gated publishing is the safeguard.

To add or refresh a template:

  1. Open a PR editing manifest.json (add/replace an entry; keep manifestVersion: 1).
  2. Validate it parses against the app schema before merging.
  3. Merge. jsDelivr serves the new manifest within its branch cache window (~12h); to publish immediately, hit the purge URL:
    https://purge.jsdelivr.net/gh/tailwind/breeze-templates@main/manifest.json
    

Migration note

The app reads this from a single configurable URL. Moving to another host (S3/CloudFront, Cloudflare, a Tailwind-owned CDN) is a change to the one EXPO_PUBLIC_TEMPLATE_MANIFEST_URL value — the app code is unchanged.

About

Hosted pin-editor template manifest for Tailwind Breeze (fetched via jsDelivr; bundled fallback in-app)

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors