Two ways to use Bodega Cat. Both keep the public shop as static HTML. Admin, preview, and checkout stay Cloudflare functions.
- Copy
apps/template(or start a new Astro app with the Cloudflare adapter). - Install
bodegacatand addbodegacat()inastro.config. - Set Stripe keys. Deploy with
examples/deploy/cloudflare-pages/README.md. - Pick a built-in theme in Admin → Settings: Bodega Cat, Void Kitten, or Paddleboard. The page lists the fields that theme actually uses (copy, links, colors, and photos). Paddleboard replaces the home page. Save, then redeploy when the static pages should match. A photo uploaded for an image field is served from
/files/theme/<field>and updates without a rebuild.
A theme package implements BodegaCatTheme (import type { BodegaCatTheme } from "bodegacat/themes/types").
- Colors and type. Set
variables(and optionalcss) on the theme. Admin can save that object to KV. Those values are CSS only. - Admin fields. Add a JSON
settingslist on the theme. Field types aretext,textarea,url,links,color,select, andimage. Text, links, and images are stored on settings ascontent, keyed by field id. Color and font fields writetheme.variables. Read values withthemeTextandthemeLinksfrombodegacat/themes. Older shops still havehomeHeadline,shopTagline,aboutTitle,aboutText,contactEmail,footerLinks,socialLinks, andlogo; those fill in whencontentdoes not have the same id. - A different home page, shop page, or an extra block on the product page. Pass the component files to
bodegacat(), keyed by the themeid. These files are not stored in KV. They still apply after an admin settings save, as long as the saved theme uses the sameid.
import bodegacat from "bodegacat";
export default {
integrations: [
bodegacat({
themeSlots: {
"@acme/shore": {
home: "./src/themes/shore/Home.astro",
shop: "./src/themes/shore/Shop.astro",
productExtra: "./src/themes/shore/ProductExtra.astro",
},
},
}),
],
};home receives siteConfig, t, copyrightYear, and catalogShopHref. shop receives siteConfig, products, t, and productPath and replaces the catalog page, including the shop tagline. Omit shop to keep the default catalog (search, category and tag filters, product grid). productExtra receives product and siteConfig and renders under the buy box. Omit a slot to keep its default.
Image fields upload to staff-only POST /api/admin/theme-asset. The file is stored at theme/<fieldId> and the saved value is /files/theme/<fieldId>. GET /files/[...key] is public and only serves keys under theme/. The template wrangler.toml binds that bucket as FILES. If the binding is missing, the image field says file storage is not configured.
Set that theme as theme in site config (alias @config if you replace the package default) or save a theme with the same id in Admin → Settings, then redeploy the static shop.
Product types are presets for variation editors. Merchants edit them in Admin → Product types. A host can pass productTypes to bodegacat() as a starting list before KV exists.
Deeper changes (a different data model or a replaced page) use Vite resolve.alias for @models, @themes, or @config. Those aliases apply to the injected routes, so you do not fork the package source. Replacing a whole route is the alias of last resort.
Bodega Cat is AGPL-3.0. You can customize it. If you offer a modified copy of Bodega Cat to users — including running that copy as the shop they use — you share the source of those modifications. A theme package that only implements this public interface is your code.