@getera/templates
v1.0.0
Published
Era site templates — complete small sites written as code (not blocks), each with its own typography, palette and layout. Built to static files and deployed to <slug>.getera.site.
Maintainers
Readme
@getera/templates
Thirty-one complete small websites, written as code, each with its own typography, palette and layout, that run on your Era business: products, cart and Era's hosted checkout, blog posts, forms and bookings. Turkish and English. Static output, deployed to <your-site>.getera.site.
· Guide: build and deploy a site · MIT
Requirements
Bun 1.1 or newer. Templates are TypeScript files that are rendered at build time, so the package ships its TypeScript sources and runs under Bun. The era CLI drives everything below and re-runs itself under Bun when it needs to.
Quickstart
npm install -g @getera/cli
era login # sign in with your browser (only needed to deploy)
era templates # the catalogue
era init my-site --template harman # copy a template into a folder you own
cd my-site && bun install && era dev # preview at http://localhost:4321
era deploy --site <site id> # publish to <slug>.getera.site--template takes a template name, a vertical (coffee, law, hotel …) or store, blog or services for the first template of that kind. The new folder holds the template's template.ts, its style.css, the photos it uses, era.config.json (site id and Era address) and a package.json that depends on this package for the kit.
Without a site id the site runs on its sample content and says plainly that checkout and forms are a preview. With one, it reads the owner's products, posts, forms and booking times from Era.
The templates
| Template | Site |
| --- | --- |
| adalet | Kaya & Demir — law office |
| akademi | Akademi Atölye — online courses |
| beyaz-gun | Beyaz Gün — wedding planner |
| bulut | Bulut Kasa — cloud POS |
| cicek | Çiçek Atölyesi — florist |
| cizgi | Çizgi Architects — architecture studio |
| danisman | Pusula Consulting — management consultancy |
| dokuma | Dokuma — linen boutique |
| emlak | Ada Emlak — estate agent |
| firin | Fırın 1923 — neighbourhood bakery |
| gulus | Gülüş — dental clinic |
| harman | Harman — coffee roastery |
| ipek | İpek — beauty salon |
| iz | İz Studio — creative agency |
| kadraj | Kadraj — photographer |
| konak | Konak — solid-wood furniture |
| kuvvet | Kuvvet — strength gym |
| liman | Liman Otel — boutique hotel |
| minik | Minik — toy shop and play club |
| nabiz | Nabız — polyclinic |
| nota | Nota Müzik Evi — music school |
| parla | Parla — fine jewellery |
| pati | Pati Dükkân — pet shop and grooming |
| pirilti | Pırıltı Temizlik — home & office cleaning |
| rota | Rota — small-group tours |
| sahne | Sahne Bomonti — concert and event venue |
| sayfa | Sayfa — independent bookshop |
| servis | Servis 34 — car service |
| sofra | Sofra — modern Anatolian restaurant |
| umut | Umut Kütüphaneleri — village school libraries |
| volt | Volt — electronics and repairs |
catalog.json lists each one with its title, description and features in both languages.
Use it as a library
import { listTemplates, scaffold, renderSite } from '@getera/templates'
const all = await listTemplates('en') // name, vertical, title, products/posts/services counts
await scaffold('harman', './my-site', { siteId: 'YOUR_SITE_ID' })
await renderSite({ dir: './my-site', out: './my-site/dist' })@getera/templates/kit is what a template imports: defineTemplate, escaping html templates, links per language, responsive photos, money and dates, and a form renderer.
How a template is made
templates/<name>/template.ts exports defineTemplate({ meta, content, products, posts, services, forms, layout, pages }), and style.css holds all of its design. The kit gives plumbing only, never components, so templates do not look alike.
The shared runtime (era.js, about 14 KB, built from src/runtime/era.ts on @getera/storefront) wires data-era-* attributes: cart, checkout, forms, booking times, live prices, the mobile menu and reveal-on-scroll. An installed copy uses the prebuilt src/runtime/era.js.
Photos are Era's own generated photos, never stock. Each is kept in two AVIF sizes, 1200 px (<id>.avif) and 640 px (<id>-800.avif), served through srcset; the whole pool of 197 photos is about 9 MB.
Develop
This package lives in geteraio/era-templates next to @getera/storefront (mirrored from Era's main repository).
bun src/build.ts <name> | --all [--site <id> --api <origin>] # build to dist/<name>
bun src/check.ts [name…] # build + page checks
bun src/serve.ts <name> # local previewLinks
- Guide: Build and deploy a site
- Your own design instead:
@getera/storefront· CLI:@getera/cli - Security issues: see SECURITY.md
License
MIT © Era
