Tracking: white-label refactoring (extract brand, enable Nuxt layers) #2

Open
opened 2026-05-04 15:19:38 +02:00 by libretech · 0 comments
Owner

Tracking: White-label refactoring of libreshop/shop

Why

libreshop/shop currently ships with MUELLERPRINTS branding, Stuttgart contact data, and notebook-specific copy hardcoded across 27 files. This blocks reuse by other adapters (third-party shops based on libreshop). The companion adapter libretech/mp consumes this image and cannot override pages, components, or composables — only runtime env vars.

The companion repo libretech/mp needs to consolidate muellerprints.de (Druckerei) and muellerprints-paperwork.com (Shop) under one domain. To do that cleanly without forking libreshop/shop, we need libreshop/shop to become a true white-label base.

Goal

libreshop/shop becomes a brand-neutral Nuxt 3 base image. Adapters extend it via Nuxt layers (native extends: mechanism). All branding, contact data, legal copy, and brand-specific feature narratives are overridable via the layer or driven by app config / env vars.

libreshop/shop still ships with real default content (a generic example "Demo Print Shop" with placeholder assets) so the bare image is deployable and demonstrable on its own.

Architecture decisions (locked)

  • Override mechanism: Nuxt layers (extends:) — native Nuxt 3, NOT a custom Strapi-style file-precedence system.
  • Three-image stack:
    1. git.librete.ch/libreshop/shop:vX.Y.Z — white-label base
    2. git.librete.ch/libretech/mp-shop:vA.B.C — branded adapter (built FROM base)
    3. mp/compose.yml consumes mp-shop, not libreshop/shop directly
  • Versioning: semver. Major = breaking override surface (component renamed/removed, slot signature changed, env-var rename). Adapter SemVer is independent (libreshop is implementation detail).
  • Stable override surface (semver-protected): Header, Footer, Hero, TrustBar, ProductCard, PageSection, layouts default/bare/deep, composables useBranding(), useNavigation(), usePageContent(). Internal components have no stability guarantee.
  • Product schema scope (now): notebook-specific (cover/binding/ruling/pages/pattern). Generic product abstraction is future work, separate epic. Adapters customize composables for now.

Sub-issues

This issue tracks the refactor. Concrete work items as separate issues:

  • Brand strings out of nuxt.config + Header + Footer → app.config + runtimeConfig
  • Refactor usePageContent.ts: hardcoded MP content → generic defaults + override path
  • Refactor useProductContent.ts: hardcoded notebook narratives → adapter-owned
  • Add Nuxt extends: layer support + document stable override surface (README)
  • Tailwind config: merge content globs across layers
  • Server APIs (contact.post.ts, sitemap, schema.org): env-driven, not hardcoded
  • CHANGELOG + semver commitment, base image publishing strategy

Out of scope

  • Generic product schema (separate future epic)
  • New product types beyond notebooks
  • CMS multi-tenancy (Strapi schema stays as-is)

Companion tracking issue

libretech/mp adapter rebuild: see https://git.librete.ch/libretech/mp/issues (linked once mp tracking issue is filed)

# Tracking: White-label refactoring of libreshop/shop ## Why libreshop/shop currently ships with MUELLERPRINTS branding, Stuttgart contact data, and notebook-specific copy hardcoded across 27 files. This blocks reuse by other adapters (third-party shops based on libreshop). The companion adapter `libretech/mp` consumes this image and cannot override pages, components, or composables — only runtime env vars. The companion repo `libretech/mp` needs to consolidate `muellerprints.de` (Druckerei) and `muellerprints-paperwork.com` (Shop) under one domain. To do that cleanly without forking libreshop/shop, we need libreshop/shop to become a true white-label base. ## Goal libreshop/shop becomes a brand-neutral Nuxt 3 base image. Adapters extend it via Nuxt layers (native `extends:` mechanism). All branding, contact data, legal copy, and brand-specific feature narratives are overridable via the layer or driven by app config / env vars. libreshop/shop still ships with **real default content** (a generic example "Demo Print Shop" with placeholder assets) so the bare image is deployable and demonstrable on its own. ## Architecture decisions (locked) - **Override mechanism:** Nuxt layers (`extends:`) — native Nuxt 3, NOT a custom Strapi-style file-precedence system. - **Three-image stack:** 1. `git.librete.ch/libreshop/shop:vX.Y.Z` — white-label base 2. `git.librete.ch/libretech/mp-shop:vA.B.C` — branded adapter (built FROM base) 3. mp/compose.yml consumes mp-shop, not libreshop/shop directly - **Versioning:** semver. Major = breaking override surface (component renamed/removed, slot signature changed, env-var rename). Adapter SemVer is independent (libreshop is implementation detail). - **Stable override surface (semver-protected):** `Header`, `Footer`, `Hero`, `TrustBar`, `ProductCard`, `PageSection`, layouts `default`/`bare`/`deep`, composables `useBranding()`, `useNavigation()`, `usePageContent()`. Internal components have no stability guarantee. - **Product schema scope (now):** notebook-specific (cover/binding/ruling/pages/pattern). Generic product abstraction is **future work**, separate epic. Adapters customize composables for now. ## Sub-issues This issue tracks the refactor. Concrete work items as separate issues: - [ ] Brand strings out of nuxt.config + Header + Footer → app.config + runtimeConfig - [ ] Refactor usePageContent.ts: hardcoded MP content → generic defaults + override path - [ ] Refactor useProductContent.ts: hardcoded notebook narratives → adapter-owned - [ ] Add Nuxt `extends:` layer support + document stable override surface (README) - [ ] Tailwind config: merge content globs across layers - [ ] Server APIs (contact.post.ts, sitemap, schema.org): env-driven, not hardcoded - [ ] CHANGELOG + semver commitment, base image publishing strategy ## Out of scope - Generic product schema (separate future epic) - New product types beyond notebooks - CMS multi-tenancy (Strapi schema stays as-is) ## Companion tracking issue libretech/mp adapter rebuild: see https://git.librete.ch/libretech/mp/issues (linked once mp tracking issue is filed)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: libreshop/shop#2
No description provided.