A self-contained, forkable sandbox for independently building, testing, and deploying custom Handlebars templates for the Ceres document renderer.
This repository is designed specifically for independent creators, designers, and frontend devs. It provides everything you need to build custom invoice, quotation, and document templates without relying on the core Ceres repository.
Important
If the automated deployment fails on your first push, ensure GitHub Pages is enabled:
- Go to your repository Settings → Pages.
- Under Build and deployment, set the Source to GitHub Actions.
- Isolated Build System: Uses the exact same Webpack configuration as the core Ceres engine.
- AI-Ready: Includes built-in agent files and guardrails (
AGENTS.md,.agent/skills) to supercharge your workflow with LLMs. - Creator Friendly: No strict corporate linting rules (ESLint, Stylelint). Pre-configured to Node 22 (
.nvmrc). - Live Preview Modal: A floating developer UI to instantly inject API payloads and generate Lydia-compatible manifest URLs.
- Zero-Config Deployment: Automatically deploys bundled templates to GitHub Pages via Actions.
Clone or fork this repository, then install dependencies:
nvm use # Ensures you refer to Node 22
npm installBy default, the repository comes with an example-template. You can duplicate the folder src/templates/example-template to start a new design.
Each template folder requires four core files:
template.hbs: The Handlebars HTML structure.styles.css: The styling for your document.index.ts: Entrypoint exportingwindow.CeresTemplate.version.json: Semantic versioning{ "version": "1.0.0" }.
To compile the bundles and start the local development server:
npm run build
npx http-server ./dist -p 8081Open http://127.0.0.1:8081 in your browser. The app will automatically redirect to
?devMode=1and bring up the Live Preview modal.
Because Ceres relies on dynamically fetching data, the ceres-example UI comes with a floating DevBridge Modal in the bottom-right corner.
- In the Load Template field, type your folder name (e.g.,
example-template). - Click Load. The page will reload and fetch your template's manifest.
By default, the renderer will stall at "Trying to load document..." if it lacks payload data.
- Paste an external sample API URL (or a local JSON server URL) into the API URL Settings field.
- Click Load API. The URL will be base64-encoded via URL parameters and the template will immediately render your data.
Once you are happy with the design and it works flawlessly on localhost, you need to point Lydia to your published bundle:
- Ensure your changes are deployed to GitHub pages.
- Enter the absolute URL of your published Template in the modal.
- The Template Path field will present the raw, unencoded path. Click Copy and drop this manifest URL directly into Lydia!
This repository includes a pre-configured GitHub Actions workflow (.github/workflows/deploy.yml).
Every time you push to the master branch, GitHub Actions will:
- Run
npm run build - Upload the
dist/folder - Publish it to your repository's GitHub Pages.