@shopbite-de/storefront 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +13 -1
- package/CLAUDE.md +5 -3
- package/app/components/Home/Categories.vue +2 -2
- package/app/components/Navigation/MobileTop.vue +1 -1
- package/app/composables/useAddressAutocomplete.ts +3 -11
- package/app/composables/useCheckoutMethodGuard.ts +1 -1
- package/app/composables/useShippingMethodChoice.ts +2 -2
- package/app/composables/useTrackEvent.ts +4 -3
- package/app/pages/account/recover/password/index.vue +10 -0
- package/app/pages/registrierung/bestaetigen.vue +4 -0
- package/app/utils/openingHours.ts +1 -1
- package/app/utils/schema.ts +2 -2
- package/app/utils/trackingUrl.ts +39 -0
- package/content/index.yml +16 -16
- package/content/zahlung-und-versand.md +3 -3
- package/docs/notes/2026-07-04-issue-239-hydration-mismatches.md +1 -1
- package/docs/notes/2026-09-08-issue-244-category-url-trailing-slash.md +2 -2
- package/docs/notes/2026-09-10-issue-251-shop-data-in-base-layer.md +4 -4
- package/docs/notes/2026-09-10-issue-272-restaurant-schema.md +3 -3
- package/docs/notes/2026-09-10-issue-273-performance-media.md +4 -4
- package/docs/notes/2026-09-10-issue-274-seo-basics.md +6 -6
- package/docs/notes/2026-09-10-issue-275-accessibility.md +3 -3
- package/docs/notes/2026-09-10-issue-290-footer-nap.md +5 -5
- package/docs/notes/2026-09-10-issue-294-matomo-without-config.md +1 -1
- package/docs/notes/2026-09-10-issue-296-track-direct-search.md +1 -1
- package/docs/notes/2026-09-10-issue-312-store-api-criteria-post.md +3 -3
- package/docs/notes/2026-09-10-issue-313-wishlist-scoped-tailwind.md +1 -1
- package/docs/notes/2026-09-10-issue-314-mobile-js-cost.md +1 -1
- package/docs/notes/2026-09-12-issue-319-stylesheet-cost.md +1 -1
- package/docs/notes/2026-09-12-issue-325-product-card.md +2 -2
- package/docs/notes/2026-09-12-issue-327-home-hero.md +2 -2
- package/docs/notes/2026-09-13-issue-332-home-info-cards.md +1 -1
- package/docs/notes/2026-09-13-quick-view-flicker.md +1 -1
- package/docs/notes/2026-09-14-demo-noindex.md +2 -2
- package/docs/notes/2026-09-17-quick-view-compact-options.md +1 -1
- package/docs/notes/2026-09-21-issue-273-cache-and-demo-video.md +1 -1
- package/docs/notes/2026-09-21-issue-363-non-fatal-404.md +2 -2
- package/docs/notes/2026-09-21-issue-366-wishlist-404.md +1 -1
- package/docs/notes/2026-09-21-issue-378-dev-modules.md +1 -1
- package/docs/notes/2026-10-05-issue-289-product-deep-links.md +1 -1
- package/docs/notes/2026-10-05-issue-400-menu-item-ingredients-diet.md +1 -1
- package/docs/notes/2026-10-05-issue-401-restaurant-schema-ordering.md +1 -1
- package/docs/notes/2026-10-05-issue-402-llms-txt.md +1 -1
- package/docs/notes/2026-10-05-issue-403-ai-crawlers.md +1 -1
- package/docs/notes/2026-10-05-issue-404-faq.md +1 -1
- package/docs/notes/2026-10-06-old-seo-url-redirect.md +5 -5
- package/docs/notes/2026-10-07-issue-434-property-group-projection.md +1 -1
- package/nuxt.config.ts +56 -8
- package/package.json +2 -1
- package/server/api/address/autocomplete.get.ts +79 -14
- package/server/api/listing/[categoryId].get.ts +5 -28
- package/server/api/search.get.ts +4 -18
- package/server/plugins/bounded-cache.ts +28 -0
- package/server/plugins/security-headers.ts +54 -0
- package/server/routes/llms.txt.ts +1 -1
- package/server/utils/addressAutocomplete.ts +181 -0
- package/server/utils/listingParams.ts +117 -0
- package/server/utils/securityHeaders.ts +165 -0
- package/test/layer/nuxt.config.ts +2 -2
- package/test/nuxt/AccountPagesPreset.test.ts +10 -10
- package/test/nuxt/AuthPagesPreset.test.ts +3 -0
- package/test/nuxt/CheckoutFormsPreset.test.ts +5 -5
- package/test/nuxt/CheckoutSummary.test.ts +1 -1
- package/test/nuxt/HeaderFooterPreset.test.ts +10 -10
- package/test/nuxt/HomeFaq.test.ts +1 -1
- package/test/nuxt/NavigationMobileTop.test.ts +1 -1
- package/test/nuxt/OrderPagesPreset.test.ts +2 -2
- package/test/nuxt/RegisterConfirmPage.test.ts +12 -0
- package/test/nuxt/useAddressAutocomplete.test.ts +7 -22
- package/test/nuxt/useCheckoutMethodGuard.test.ts +1 -1
- package/test/nuxt/useShippingMethodChoice.test.ts +1 -1
- package/test/nuxt/useTrackEvent.test.ts +16 -0
- package/test/unit/addressAutocomplete.spec.ts +247 -0
- package/test/unit/boundedCache.spec.ts +231 -0
- package/test/unit/highlight.spec.ts +2 -2
- package/test/unit/llmsTxt.spec.ts +28 -28
- package/test/unit/openingHours.spec.ts +3 -3
- package/test/unit/schema.spec.ts +29 -32
- package/test/unit/securityHeaders.spec.ts +254 -0
- package/test/unit/seo.spec.ts +23 -29
- package/test/unit/sitemap.spec.ts +1 -1
- package/test/unit/trackingUrl.spec.ts +48 -0
package/.env.example
CHANGED
|
@@ -20,6 +20,11 @@ OPENAPI_ACCESS_KEY=key
|
|
|
20
20
|
OPENAPI_JSON_URL="https://shopware.shopbite.net"
|
|
21
21
|
|
|
22
22
|
NUXT_GEOAPIFY_API_KEY=
|
|
23
|
+
# Per-IP limit of address lookups that reach Geoapify (token bucket in
|
|
24
|
+
# memory; capacity 0 = off, e.g. when the reverse proxy limits the route).
|
|
25
|
+
# The client IP is read from X-Forwarded-For.
|
|
26
|
+
NUXT_ADDRESS_AUTOCOMPLETE_RATE_LIMIT_CAPACITY=20
|
|
27
|
+
NUXT_ADDRESS_AUTOCOMPLETE_RATE_LIMIT_REFILL_PER_MINUTE=20
|
|
23
28
|
|
|
24
29
|
# Matomo loads only when both values are set
|
|
25
30
|
NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_MATOMO_URL=
|
|
@@ -39,7 +44,7 @@ NUXT_PUBLIC_SITE_TELEPHONE=
|
|
|
39
44
|
NUXT_PUBLIC_SITE_GOOGLE_BUSINESS_PROFILE_URL=
|
|
40
45
|
# Restaurant schema (schema.org), e.g. "€€"
|
|
41
46
|
NUXT_PUBLIC_SITE_PRICE_RANGE=
|
|
42
|
-
# Comma-separated, e.g. "
|
|
47
|
+
# Comma-separated, e.g. "12345 Musterstadt, 12346 Beispieldorf"
|
|
43
48
|
NUXT_PUBLIC_SITE_DELIVERY_AREAS=
|
|
44
49
|
NUXT_PUBLIC_SITE_GEO_LATITUDE=
|
|
45
50
|
NUXT_PUBLIC_SITE_GEO_LONGITUDE=
|
|
@@ -53,3 +58,10 @@ NUXT_STORE_NAME="ShopBite"
|
|
|
53
58
|
STORE_DESCRIPTION="Reduziere deine Kosten und steigere deinen Umsatz"
|
|
54
59
|
# Secret of POST /api/_cache/purge, the backoffice empties the Store API caches after menu changes (empty = off)
|
|
55
60
|
NUXT_CACHE_PURGE_SECRET=
|
|
61
|
+
|
|
62
|
+
# Bound of the in-memory server cache (LRU); max entries 0 = unbounded
|
|
63
|
+
NUXT_CACHE_STORAGE_MAX_ENTRIES=5000
|
|
64
|
+
NUXT_CACHE_STORAGE_MAX_SIZE_MB=128
|
|
65
|
+
# Sortings accepted by the listing and search routes, comma-separated
|
|
66
|
+
# (empty = Shopware's standard sortings; add custom sorting keys here)
|
|
67
|
+
NUXT_LISTING_SORTINGS=
|
package/CLAUDE.md
CHANGED
|
@@ -112,7 +112,7 @@ The storefront reads plain Shopware entities with fixed names; seed data must ma
|
|
|
112
112
|
|
|
113
113
|
### Server routes
|
|
114
114
|
|
|
115
|
-
`server/api/address/autocomplete.get.ts` — Geoapify proxy (keeps API key server-side).
|
|
115
|
+
`server/api/address/autocomplete.get.ts` — Geoapify proxy (keeps API key server-side). Passes on only `text` (3–200 characters), `lang` (`/^[a-z]{2}$/`) and `limit` (1–10), 400 otherwise; the area filter comes from `public.shopBite.addressAutocomplete.boundingBox`, never from the query. Upstream errors are logged with the key redacted and answered with a generic 502 (ofetch messages contain the request URL). Identical lookups come from a bounded in-memory cache (5 min, 500 entries); lookups reaching Geoapify are rate limited per client IP (`addressAutocomplete.rateLimit`, token bucket in memory per process, capacity 0 = off; the IP comes from `X-Forwarded-For`, so the app must run behind a proxy that sets it). Helpers in `server/utils/addressAutocomplete.ts`.
|
|
116
116
|
`server/utils/shopware/adminApiClient.ts` — Admin API client for server-side Shopware operations requiring elevated credentials.
|
|
117
117
|
`server/api/__sitemap__/urls.get.ts` — dynamic `@nuxtjs/sitemap` source (navigation categories from the Store API).
|
|
118
118
|
`server/routes/llms.txt.ts` — `/llms.txt` for AI assistants (#402): shop, hours, ordering and the menu with prices, ingredients and diets as Markdown, built by the pure `server/utils/llmsTxt.ts`; `swr` 1 h. Every Store API source is optional (`Promise.allSettled`), content pages blocked in `robots.txt` are left out.
|
|
@@ -120,14 +120,16 @@ The storefront reads plain Shopware entities with fixed names; seed data must ma
|
|
|
120
120
|
Pages without content throw `createNotFoundError()` (`app/utils/notFound.ts`): fatal only in the browser, because a fatal error makes Nitro log a `[request error] [fatal]` block per scanner request (#363).
|
|
121
121
|
`modules/dev-tooling.ts` registers `@nuxt/eslint`, `@nuxt/hints` and `@nuxt/test-utils/module` only when the storefront itself is the project (not for shops extending the layer, not inside `node_modules`); they are devDependencies, so never add them to `modules` in `nuxt.config.ts` (#378).
|
|
122
122
|
The cached Store API handlers (`defineCachedEventHandler`, TTL `public.shopBite.cacheTtl`, a day for products, listings, categories) can be emptied by the backoffice: `POST /api/_cache/purge` with `Authorization: Bearer $NUXT_CACHE_PURGE_SECRET` (route off without the secret, #484). `server/utils/cachePurge.ts` picks the Nitro keys (`cache:nitro:handlers:<name>:<escaped key>`) by id, so a new cached handler needs its `name` in `ALL` there and the id in its `getKey`.
|
|
123
|
+
The Nitro cache is bounded (`server/plugins/bounded-cache.ts`): an LRU (`unstorage/drivers/lru-cache`) mounted at `cache:` with at most `cacheStorage.maxEntries` entries (5000) and `maxSizeMb` of serialised data (128), `NUXT_CACHE_STORAGE_*`; evicted entries are fetched again. A shop that mounts its own `nitro.storage.cache` keeps it, `maxEntries` 0 leaves the cache unbounded. `/api/listing/[categoryId]` and `/api/search` validate their parameters before they become keys (`server/utils/listingParams.ts`, 400 otherwise): category id and `properties`/`manufacturer` as 32-hex ids (`|`-separated, at most 50, lower-cased, deduplicated and sorted), `order` from `listingSortings` (empty = Shopware's standard sortings `name-asc`, `name-desc`, `price-asc`, `price-desc`, `topseller`, `score`; add custom sortings there), `p` 1–20, text queries at most 100 characters with whitespace collapsed.
|
|
123
124
|
Layout data is cached the same way, because every page renders it, a 404 too (once its own page and once `/__nuxt_error`): a vulnerability scanner probing 404 paths otherwise multiplied its request rate at Shopware many times over. With warm caches an SSR request asks Shopware only for `/context` (per visitor: cart, login); paths with non-ASCII characters that pass the known-path filter still make their SEO lookups uncached, and the browser loads config, hours and holidays once per page load (below). Handlers and TTLs (`cacheTtl.*`, `NUXT_PUBLIC_SHOP_BITE_CACHE_TTL_*`): `/api/navigation/[type]` (`main`, `footer`, `menu`, `home`; key includes the menu root; `navigation`, a day), `/api/breadcrumb/[categoryId]` (`category`; an empty breadcrumb, i.e. an unknown id, is a 404 and not cached), `/api/top-sellers` (`listing`), `/api/payment-methods` (Restaurant schema, asked without a visitor context; `paymentMethods`, 1 h), `/api/shopbite/config` (cached function `shopbite-config`, `config`, 60 s), `/api/shopbite/business-hours` and `/holidays` (`businessHours`/`holidays`, 5 min), `/api/seo-url?path=` (function `seo-url`, `seoUrl`, 10 min; key = lookup field (`pathInfo` for technical URLs, else `seoPathInfo`) + lower-cased value; only matches that spell the looked-up value up to case are stored, because Shopware's collation also ignores accents and trailing spaces and each such variant would add an entry). Config, hours, holidays and the SEO caches use `swr: false`: with Nitro's default `swr: true` an expired entry is still served once, so the TTL would not cap the staleness. A failed Shopware request is never cached. During an outage the layout handlers and `shopBiteConfig()` serve the last good answer per key and otherwise fail fast with 503; after a failure each handler asks Shopware again only after 30 s (`createResilientLoader`, `server/utils/backoff.ts`), and `storeApiGet`/`storeApiPost` do not retry (ofetch retries a GET once by default). Use the loader in a new cached handler. Before an order, `Checkout/Summary.vue` asks Shopware for the checkout switch (`checkCheckoutEnabled`) and does not order when it is off or cannot be checked. Only server-side rendering reads config, hours and holidays from the cache: `useAsyncData` reuses the server payload at hydration (a `refresh()` during hydration does not fetch either), so `useLiveShopData` (app.vue, error.vue) reloads the three keys from Shopware with `refreshNuxtData` after hydration; store status, delivery time choice and order buttons then act on that. Keys contain no language or context: like all cached handlers they call Shopware with the sales channel's access key only. Every purge (any target) empties the layout handlers (`LAYOUT`), the lists and the cached functions `seo-url`, `seo-paths`, `shopbite-config`; `{ "layout": true }` empties only the layout data (and `llms.txt`), for changes of hours, closing days or the checkout switch.
|
|
124
125
|
|
|
126
|
+
`server/plugins/security-headers.ts` sends the headers of `runtimeConfig.securityHeaders` (`NUXT_SECURITY_HEADERS_*`, empty value = header off, builders in `server/utils/securityHeaders.ts`) with every response: HSTS (only when `public.storeUrl` is https), `nosniff`, `X-Frame-Options: DENY` plus `Content-Security-Policy: frame-ancestors 'none'`, `Referrer-Policy`, `Permissions-Policy` (camera, microphone, geolocation, usb, browsing-topics off; Web Share and clipboard stay allowed). Rendered HTML gets `Cache-Control: private, no-store` (it may carry the visitor's cart or login, `useUserContextInSSR`) unless a route rule sets one, loses `x-powered-by`, and gets a `Content-Security-Policy-Report-Only` (self, Shopware endpoint, Matomo, extra hosts from `contentSecurityPolicyReportOnly.scriptSrc`/`connectSrc`/`imgSrc`, optional `reportUri`) whose `script-src` lists the sha256 of each inline script of that response (Nuxt's config script and the import map; JSON payload and JSON-LD are data blocks). Inline styles stay allowed (Vue style bindings). The service worker caches no pages (no `runtimeCaching`), so personalised HTML never lands in CacheStorage.
|
|
125
127
|
`modules/public-cache.ts` (local module, also active in shops extending the layer) adds a 30-day `Cache-Control` route rule for every file in the `public/` folders of all layers; Nitro serves them without one. `image.ipx.maxAge` gives resized logos the same lifetime. Replace a public file under a new name (#273).
|
|
126
128
|
`server/api/content/*.get.ts` — Nuxt Content queries for the pages. Do not call `queryCollection()` in page code: in the browser it downloads the SQLite WASM build (865 KB) on client-side navigation (#314).
|
|
127
129
|
|
|
128
130
|
### Client-side JavaScript budget (#314)
|
|
129
131
|
|
|
130
|
-
- Nothing that the first paint does not need belongs in the entry chunk. Components that only some shops use go behind `Lazy…` + `v-if` (`SalesChannelSwitch`); the Matomo registry is imported in `plugins/matomo.ts` after `onNuxtReady`, tracking pushes to `_paq` via `useTrackEvent`.
|
|
132
|
+
- Nothing that the first paint does not need belongs in the entry chunk. Components that only some shops use go behind `Lazy…` + `v-if` (`SalesChannelSwitch`); the Matomo registry is imported in `plugins/matomo.ts` after `onNuxtReady`, tracking pushes to `_paq` via `useTrackEvent`. Tracked URLs (`setCustomUrl`) go through `trackingUrl()` (`app/utils/trackingUrl.ts`): no fragment, and of the query only campaign parameters (`utm_*`, `mtm_*`, `pk_*`, `matomo_*`) and the quick view configuration (`produkt`, `ohne`, `extras`), because e-mail links carry one-time secrets; the password reset and registration confirmation pages also `router.replace` their query away once read.
|
|
131
133
|
- Overlays (`SbSheet`, collapsibles) are created on first use (`v-if` + `nextTick()` before opening), not mounted with the page — mounting forces a layout of the whole page.
|
|
132
134
|
- Long lists render on the server and hydrate on scroll: `hydrateWhenVisible(Component)` (`app/utils`) keeps the markup and the chunk, Used for the bon cards and the footer.
|
|
133
135
|
- `NuxtLink` prefetches on interaction only (`experimental.defaults.nuxtLink`), and Rolldown groups shared framework/UI modules into two chunks (`vite.build.rollupOptions.output.codeSplitting`). Measure with Lighthouse behind the h2 proxy (see `docs/notes/2026-09-10-issue-314-mobile-js-cost.md`) before changing either.
|
|
@@ -145,7 +147,7 @@ Layout data is cached the same way, because every page renders it, a 404 too (on
|
|
|
145
147
|
- No toasts (removed in #445, other responses to be designed): results and errors show where they happen, e.g. `role="alert"` boxes in forms and the checkout, `role="status"` regions, the voucher error at its field.
|
|
146
148
|
- Menu (#441): `Category/Listing.vue` has three columns from `lg` (`MenuCategoryIndex` word list, the list, `MenuCartPanel`), `NavigationMobileTop` below `lg` (section chips; the open section's sub-categories as a second chip row led by "Alle", the current chip scrolls into view); `MenuSectionHeader` and `MenuBonCard` (one column, number strip, `photo` for the `bonPhoto` view). The card's button adds a product straight to the cart unless `productNeedsChoice()` (a parent with variants, `childCount` in the listing projection), which opens the quick view; extras stay optional. Cards hydrate on approach (`hydrateWhenVisible`), so a click on a card that has not hydrated yet is lost. Filters live in an `SbSheet`, sorting is an `SbSelect` (`toSortingOptions()`). A section with sub-sections (#487) lists its dishes grouped: direct dishes first, then an `h2` per sub-section in navigation order (`groupBySubsections()`/`findCategory()` in `app/utils/menuGroups.ts`, needs `categoryIds` in the listing projection); the sub-section pages stay.
|
|
147
149
|
- Product sheet (#442): `SbSheet` with a bon header (a custom `#header` gets the full width below a toolbar with the `#actions` and the close button; next to the buttons a long name broke after four letters on a 393 px phone) (number strip, name as `DialogTitle`, diet and description as `DialogDescription`); `Configurator` shows variants as `SbChoiceGroup` (required), `DeselectIngredient` as `SbChip` ingredient chips (pressed = included), `CrossSelling` as `SbCheckbox` rows with a search, `Detail` a sticky footer with `SbStepper` and the add button.
|
|
148
|
-
- Cart and checkout (#443): `MenuOrderMode` (`useOrderMode`) and the checkout's shipping section list ALL active shipping methods (`useShippingMethodChoice`, `onlyAvailable: false`), because a delivery-area rule on the shipping city never matches before the guest has an address (
|
|
150
|
+
- Cart and checkout (#443): `MenuOrderMode` (`useOrderMode`) and the checkout's shipping section list ALL active shipping methods (`useShippingMethodChoice`, `onlyAvailable: false`), because a delivery-area rule on the shipping city never matches before the guest has an address (fixed in 2.0.3); `useCheckoutMethodGuard` switches only a blocked payment method, a blocked shipping method is reported in the checkout and never switched to pickup. It shows the shipping methods as an `SbSegmentedControl` only when there are two to four. The header cart opens an `SbSheet`; `Cart/Item` uses `SbStepper` (remove at 1). The checkout is one page, `/bestellung/kasse` (the old step routes 301 there, `routeRules`): numbered sections Lieferung oder Abholung (`CheckoutPaymentAndDelivery part="shipping"`), Wann, Ihre Angaben (`CheckoutLoginOrRegister` with Reka tabs, `UserRegistrationForm` (logic in `useRegistrationForm`) / `UserLoginForm`, or `UserDetail`), Bezahlung (`part="payment"`) and the order card in `Checkout/Summary.vue`; the order button says "Zahlungspflichtig bestellen" (§ 312j BGB). Forms validate with Zod on submit and show errors at the fields plus a focused summary in form order; `AddressFields` sets `autocomplete`.
|
|
149
151
|
- Order and account (#445): `/bestellung/<id>/erfolg` and `/bestellung/<id>` render `OrderConfirmation` (`OrderDetail`: facts incl. the wished time from the `customerComment`, receipt lines, totals; call card), `/bestellung/<id>/fehler` a payment retry. Login, registration, password pages and the registration confirmation render in `UserAuthPanel`; the account pages in `layouts/account.vue` (link navigation with `aria-current`) with `UserAccountHeader`; `AddressForm` (also used when an address is edited in the checkout). Irreversible actions confirm with `SbConfirmDialog` (focus starts on "Abbrechen"). Search, contact (`useContactForm`), wishlist (`useWishlistEntries`, #467), content pages and `error.vue` (with its own `Header`/`Footer`, because the error page replaces `app.vue`) use the same pieces.
|
|
150
152
|
- Home page (#444): `pages/index.vue` renders `HomeHero` (kicker, `[highlight]{.text-primary}` part in the accent colour via `splitHighlight()`, buttons from `hero.links`, live status, rating card from the Google `usp`; the photo is `hero.image` with the blurred video `hero.poster` as fallback, cropped 4:5 at `hero.imagePosition` (object-position); it sits in a `<picture>` with a `min-width: 640px` source, so phones load a 1 px GIF), `HomeFacts` (`features`), `HomeCategories` (word list, `useHomeMenuCategories`; a wide first category image switches to a full-width photo below the words, and `sizes` asks for the width the crop needs, since thumbnails are picked by width), `HomeHighlights` (top sellers as bon cards), `HomeRestaurant` (`gallery` + opening hours in the SSR HTML) and the two-column `HomeFaq`; `cta` and `mittagstisch` in `content/index.yml` are not shown.
|
|
151
153
|
- Header and footer (#455): `Header.vue` (logo, main nav, status pill, phone, account, wishlist, cart button opening the cart `SbSheet`, menu `SbSheet` on phones), `Footer.vue` (address, hours, footer navigation columns). `app.vue` has the skip link to `main#inhalt`.
|
|
@@ -5,8 +5,8 @@ import type { Schemas } from "#shopware";
|
|
|
5
5
|
* Menu sections of the presets on the home page (#444): a word list in the
|
|
6
6
|
* display font on the darker band, no dish counts. On desktop one photo
|
|
7
7
|
* follows the hovered or focused section (category media from Shopware);
|
|
8
|
-
* phones get the words stacked and no photo. Wide category banners (as
|
|
9
|
-
*
|
|
8
|
+
* phones get the words stacked and no photo. Wide category banners (as
|
|
9
|
+
* some shops use) do not fit the 4:5 column: then the photo spans the width
|
|
10
10
|
* below the words in the banner's own aspect ratio.
|
|
11
11
|
*/
|
|
12
12
|
withDefaults(
|
|
@@ -6,7 +6,7 @@ import { useNavigation } from "~/composables/useNavigation";
|
|
|
6
6
|
* Menu categories as horizontally scrolling rows on phones and tablets
|
|
7
7
|
* (#445); the desktop menu has the word-list index (MenuCategoryIndex).
|
|
8
8
|
* The first row holds the menu sections. When the open section has
|
|
9
|
-
* sub-categories (
|
|
9
|
+
* sub-categories (e.g. Fleischgerichte → Vom Rind, Hähnchen …),
|
|
10
10
|
* a second row lists them, led by "Alle" for the section itself; deeper
|
|
11
11
|
* levels follow in the same row. The current chip scrolls into view.
|
|
12
12
|
*/
|
|
@@ -25,23 +25,15 @@ interface GeoapifyResponse {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export function useAddressAutocomplete() {
|
|
28
|
-
const { boundingBoxCoordinates } = useAddressSuggestionArea();
|
|
29
|
-
|
|
30
28
|
async function getSuggestions(text: string): Promise<AddressSuggestion[]> {
|
|
31
29
|
if (!text || text.length < 3) {
|
|
32
30
|
return [];
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
try {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
limit: 5,
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
if (boundingBoxCoordinates.value) {
|
|
43
|
-
query.filter = `rect:${boundingBoxCoordinates.value}`;
|
|
44
|
-
}
|
|
34
|
+
// The server route applies the configured area
|
|
35
|
+
// (`addressAutocomplete.boundingBox`) itself.
|
|
36
|
+
const query = { text, lang: "de", limit: 5 };
|
|
45
37
|
|
|
46
38
|
const { data } = await useFetch<GeoapifyResponse>(
|
|
47
39
|
"/api/address/autocomplete",
|
|
@@ -51,7 +51,7 @@ type MethodGuardConfig<M extends CheckoutMethod> = {
|
|
|
51
51
|
* A blocked shipping method is only reported, never switched: its rule
|
|
52
52
|
* usually needs the shipping address (delivery area), which a guest enters
|
|
53
53
|
* after choosing delivery or pickup. Switching turned every delivery into
|
|
54
|
-
* a pickup before the address was known (
|
|
54
|
+
* a pickup before the address was known (2.0.2). With an
|
|
55
55
|
* address the checkout says the method is not possible and the customer
|
|
56
56
|
* picks another one.
|
|
57
57
|
*/
|
|
@@ -6,8 +6,8 @@ import type { Schemas } from "#shopware";
|
|
|
6
6
|
*
|
|
7
7
|
* `useCheckout().getShippingMethods()` asks the Store API for the methods
|
|
8
8
|
* whose availability rule matches right now. A rule on the shipping
|
|
9
|
-
* address (
|
|
10
|
-
*
|
|
9
|
+
* address (e.g. "Valide Lieferung", city Musterstadt, Nebenort or
|
|
10
|
+
* Beispieldorf) never matches before the guest has entered an address, so
|
|
11
11
|
* "Lieferung" vanished from the choice. Whether the chosen method works
|
|
12
12
|
* for the address is checked in the cart (`shipping-method-blocked`).
|
|
13
13
|
*/
|
|
@@ -16,9 +16,10 @@ export function useTrackEvent() {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
// Page views are pushed by `plugins/matomo.ts` (initial page and every
|
|
19
|
-
// `page:finish`), not by the registry's page watcher.
|
|
19
|
+
// `page:finish`), not by the registry's page watcher. The URL keeps only
|
|
20
|
+
// harmless query parameters (`trackingUrl`): e-mail links carry secrets.
|
|
20
21
|
function trackPageView(path: string) {
|
|
21
|
-
push(["setCustomUrl", path]);
|
|
22
|
+
push(["setCustomUrl", trackingUrl(path)]);
|
|
22
23
|
push(["setDocumentTitle", document.title]);
|
|
23
24
|
push(["trackPageView"]);
|
|
24
25
|
}
|
|
@@ -75,7 +76,7 @@ export function useTrackEvent() {
|
|
|
75
76
|
productNumber: string,
|
|
76
77
|
path: string,
|
|
77
78
|
) {
|
|
78
|
-
push(["setCustomUrl", path]);
|
|
79
|
+
push(["setCustomUrl", trackingUrl(path)]);
|
|
79
80
|
push([
|
|
80
81
|
"trackEvent",
|
|
81
82
|
"Product",
|
|
@@ -16,6 +16,7 @@ const PASSWORD_MISMATCH_ERROR = "Die Passwörter stimmen nicht überein.";
|
|
|
16
16
|
|
|
17
17
|
const { apiClient } = useShopwareContext();
|
|
18
18
|
const route = useRoute();
|
|
19
|
+
const router = useRouter();
|
|
19
20
|
|
|
20
21
|
// Schemas
|
|
21
22
|
const routeValidationSchema = z.object({
|
|
@@ -53,6 +54,15 @@ function validateRouteParameters(): string {
|
|
|
53
54
|
const recoveryHash = ref<string>("");
|
|
54
55
|
recoveryHash.value = validateRouteParameters();
|
|
55
56
|
|
|
57
|
+
// The hash is a one-time secret: remove it from the address bar (history,
|
|
58
|
+
// tracking, shared screenshots) once read. After hydration, so the server
|
|
59
|
+
// and the browser render the same page.
|
|
60
|
+
onMounted(() => {
|
|
61
|
+
if (route.query.hash !== undefined) {
|
|
62
|
+
router.replace({ query: {} });
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
56
66
|
async function resetPassword(data: PasswordResetSchema) {
|
|
57
67
|
await apiClient.invoke(
|
|
58
68
|
"recoveryPassword post /account/recovery-password-confirm",
|
|
@@ -6,6 +6,7 @@ useSeoMeta({
|
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
const route = useRoute();
|
|
9
|
+
const router = useRouter();
|
|
9
10
|
|
|
10
11
|
const { apiClient } = useShopwareContext();
|
|
11
12
|
const { refreshSessionContext } = useSessionContext();
|
|
@@ -41,6 +42,9 @@ function toConfirmError(e: unknown): ConfirmError {
|
|
|
41
42
|
async function confirmRegistration() {
|
|
42
43
|
const em = route.query.em;
|
|
43
44
|
const hash = route.query.hash;
|
|
45
|
+
// One-time secrets: off the address bar (history, tracking, shared
|
|
46
|
+
// screenshots) once read.
|
|
47
|
+
router.replace({ query: {} });
|
|
44
48
|
if (typeof em !== "string" || typeof hash !== "string" || !em || !hash) {
|
|
45
49
|
error.value = "invalid";
|
|
46
50
|
return;
|
|
@@ -84,7 +84,7 @@ export function groupOpeningHours(
|
|
|
84
84
|
return rows;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
/** `tel:` link for a displayed phone number, e.g. `+49
|
|
87
|
+
/** `tel:` link for a displayed phone number, e.g. `+49 123 456789`. */
|
|
88
88
|
export function toTelHref(telephone: string): string {
|
|
89
89
|
return `tel:${telephone.replace(/[^\d+]/g, "")}`;
|
|
90
90
|
}
|
package/app/utils/schema.ts
CHANGED
|
@@ -26,7 +26,7 @@ type HolidayLike = {
|
|
|
26
26
|
|
|
27
27
|
export type SiteInfo = {
|
|
28
28
|
name: string;
|
|
29
|
-
/** Other names the shop is listed under, e.g. "
|
|
29
|
+
/** Other names the shop is listed under, e.g. "Alter Hof". */
|
|
30
30
|
alternateNames?: string[];
|
|
31
31
|
url: string;
|
|
32
32
|
description?: string;
|
|
@@ -35,7 +35,7 @@ export type SiteInfo = {
|
|
|
35
35
|
cuisine?: string;
|
|
36
36
|
priceRange?: string;
|
|
37
37
|
googleBusinessProfileUrl?: string;
|
|
38
|
-
/** Places the shop delivers to, e.g. "
|
|
38
|
+
/** Places the shop delivers to, e.g. "12345 Musterstadt" (#401). */
|
|
39
39
|
deliveryAreas?: string[];
|
|
40
40
|
/** Nuxt parses numeric env values into numbers. */
|
|
41
41
|
geo?: { latitude?: number | string; longitude?: number | string };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Query parameters that page tracking may send: Matomo and UTM campaign
|
|
3
|
+
* parameters and the quick view configuration (`produkt`, `ohne`, `extras`,
|
|
4
|
+
* #411). Everything else is dropped, because links from e-mails carry
|
|
5
|
+
* one-time secrets in the query (password reset `hash`, registration
|
|
6
|
+
* confirmation `em`/`hash`).
|
|
7
|
+
*/
|
|
8
|
+
const ALLOWED_PARAMS = new Set(["produkt", "ohne", "extras"]);
|
|
9
|
+
const ALLOWED_PREFIXES = ["utm_", "mtm_", "pk_", "matomo_"];
|
|
10
|
+
|
|
11
|
+
function isAllowed(name: string): boolean {
|
|
12
|
+
return (
|
|
13
|
+
ALLOWED_PARAMS.has(name) ||
|
|
14
|
+
ALLOWED_PREFIXES.some(
|
|
15
|
+
(prefix) => name.startsWith(prefix) && name.length > prefix.length,
|
|
16
|
+
)
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** The path for Matomo's `setCustomUrl`: no fragment, allowed parameters only. */
|
|
21
|
+
export function trackingUrl(fullPath: string): string {
|
|
22
|
+
const withoutHash = fullPath.split("#")[0] ?? "";
|
|
23
|
+
const queryStart = withoutHash.indexOf("?");
|
|
24
|
+
if (queryStart === -1) return withoutHash;
|
|
25
|
+
|
|
26
|
+
const path = withoutHash.slice(0, queryStart);
|
|
27
|
+
const kept = withoutHash
|
|
28
|
+
.slice(queryStart + 1)
|
|
29
|
+
.split("&")
|
|
30
|
+
.filter((pair) => {
|
|
31
|
+
const name = pair.split("=")[0] ?? "";
|
|
32
|
+
try {
|
|
33
|
+
return isAllowed(decodeURIComponent(name));
|
|
34
|
+
} catch {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return kept.length ? `${path}?${kept.join("&")}` : path;
|
|
39
|
+
}
|
package/content/index.yml
CHANGED
|
@@ -15,7 +15,7 @@ hero:
|
|
|
15
15
|
icon: i-simple-icons-google
|
|
16
16
|
link: https://www.google.com/maps/place/?q=place_id
|
|
17
17
|
- title: 20 Jahre
|
|
18
|
-
subtitle: in
|
|
18
|
+
subtitle: in Musterstadt
|
|
19
19
|
icon: i-lucide-award
|
|
20
20
|
- title: Lieferservice
|
|
21
21
|
subtitle: Schnell & zuverlässig
|
|
@@ -32,7 +32,7 @@ hero:
|
|
|
32
32
|
size: xl
|
|
33
33
|
color: neutral
|
|
34
34
|
variant: outline
|
|
35
|
-
to: "tel:+
|
|
35
|
+
to: "tel:+49123456789"
|
|
36
36
|
target: _blank
|
|
37
37
|
features:
|
|
38
38
|
title: Alle [Informationen]{.text-primary} auf einen Blick
|
|
@@ -48,7 +48,7 @@ features:
|
|
|
48
48
|
to: "#oeffnungszeiten"
|
|
49
49
|
- title: Lieferung
|
|
50
50
|
kind: delivery
|
|
51
|
-
description: Wir liefern nach
|
|
51
|
+
description: Wir liefern nach Musterstadt und Beispieldorf. Ab 15 € frei Haus, darunter 1 € Liefergebühr.
|
|
52
52
|
icon: i-lucide-truck
|
|
53
53
|
- title: Reservierung
|
|
54
54
|
kind: reservation
|
|
@@ -56,8 +56,8 @@ features:
|
|
|
56
56
|
description: Bestellungen nehmen wir gerne online oder telefonisch entgegen.
|
|
57
57
|
icon: i-lucide-phone
|
|
58
58
|
link:
|
|
59
|
-
label:
|
|
60
|
-
to: "tel:+
|
|
59
|
+
label: 0123 456789 anrufen
|
|
60
|
+
to: "tel:+49123456789"
|
|
61
61
|
menu:
|
|
62
62
|
headline: SHOPBITE
|
|
63
63
|
title: Unsere Speisekarte
|
|
@@ -72,23 +72,23 @@ gallery:
|
|
|
72
72
|
headline: SHOPBITE
|
|
73
73
|
links:
|
|
74
74
|
- label: Tisch reservieren
|
|
75
|
-
to: tel:+
|
|
75
|
+
to: tel:+49123456789
|
|
76
76
|
color: primary
|
|
77
77
|
variant: subtle
|
|
78
78
|
trailingIcon: i-lucide-phone
|
|
79
79
|
images:
|
|
80
80
|
- image: https://fsn1.your-objectstorage.com/shopbite-demo-shopware/media/be/7b/ba/1789148625/restaurant1.webp?ts=1789148625
|
|
81
|
-
alt:
|
|
81
|
+
alt: Restaurant Innenbereich 1
|
|
82
82
|
- image: https://fsn1.your-objectstorage.com/shopbite-demo-shopware/media/7c/a7/1c/1789148639/restaurant2.webp?ts=1789148639
|
|
83
|
-
alt:
|
|
83
|
+
alt: Restaurant Innenbereich 2
|
|
84
84
|
- image: https://fsn1.your-objectstorage.com/shopbite-demo-shopware/media/94/27/0b/1789148651/restaurant3.webp?ts=1789148651
|
|
85
|
-
alt:
|
|
85
|
+
alt: Restaurant Innenbereich 3
|
|
86
86
|
- image: https://fsn1.your-objectstorage.com/shopbite-demo-shopware/media/50/31/b1/1789148669/restaurant4.webp?ts=1789148669
|
|
87
|
-
alt:
|
|
87
|
+
alt: Restaurant Innenbereich 4
|
|
88
88
|
- image: https://fsn1.your-objectstorage.com/shopbite-demo-shopware/media/41/1b/09/1789148680/restaurant5.webp?ts=1789148680
|
|
89
|
-
alt:
|
|
89
|
+
alt: Restaurant Innenbereich 5
|
|
90
90
|
- image: https://fsn1.your-objectstorage.com/shopbite-demo-shopware/media/5b/d1/f9/1789148692/restaurant6.webp?ts=1789148692
|
|
91
|
-
alt:
|
|
91
|
+
alt: Restaurant Innenbereich 6
|
|
92
92
|
|
|
93
93
|
mittagstisch:
|
|
94
94
|
headline: SHOPBITE
|
|
@@ -110,7 +110,7 @@ mittagstisch:
|
|
|
110
110
|
icon: i-lucide-info
|
|
111
111
|
links:
|
|
112
112
|
- label: Reservieren
|
|
113
|
-
to: "tel:+
|
|
113
|
+
to: "tel:+49123456789"
|
|
114
114
|
color: neutral
|
|
115
115
|
variant: subtle
|
|
116
116
|
trailingIcon: i-lucide-phone
|
|
@@ -119,13 +119,13 @@ faq:
|
|
|
119
119
|
title: Häufige Fragen
|
|
120
120
|
items:
|
|
121
121
|
- question: Wohin liefern Sie?
|
|
122
|
-
answer: Wir liefern nach
|
|
122
|
+
answer: Wir liefern nach 12345 Musterstadt (Musterstadt und Nebenort) und nach 12346 Beispieldorf.
|
|
123
123
|
- question: Was kostet die Lieferung?
|
|
124
124
|
answer: Ab 15 € Bestellwert liefern wir kostenlos. Darunter berechnen wir eine Liefergebühr von 2 €.
|
|
125
125
|
- question: Wie lange dauert die Lieferung?
|
|
126
126
|
answer: Etwa 30 Minuten. Bei der Bestellung können Sie auch eine spätere Lieferzeit wählen.
|
|
127
127
|
- question: Kann ich meine Bestellung abholen?
|
|
128
|
-
answer: Ja, Sie können Ihre Bestellung auch bei uns in der
|
|
128
|
+
answer: Ja, Sie können Ihre Bestellung auch bei uns in der Musterstraße 1 in Musterstadt abholen.
|
|
129
129
|
- question: Wie kann ich bezahlen?
|
|
130
130
|
answer: Bei Lieferung bar, bei Abholung bar oder mit EC-Karte.
|
|
131
131
|
- question: Gibt es vegetarische und vegane Gerichte?
|
|
@@ -141,6 +141,6 @@ cta:
|
|
|
141
141
|
to: /speisekarte/
|
|
142
142
|
color: primary
|
|
143
143
|
- label: Tisch reservieren
|
|
144
|
-
to: tel:+
|
|
144
|
+
to: tel:+49123456789
|
|
145
145
|
variant: outline
|
|
146
146
|
trailingIcon: i-lucide-phone
|
|
@@ -10,7 +10,7 @@ description: Zahlungs- und Lieferinformationen
|
|
|
10
10
|
Wir bieten Ihnen zwei Möglichkeiten, Ihre Bestellung zu erhalten:
|
|
11
11
|
|
|
12
12
|
- **Lieferung:** Wir bringen Ihre Bestellung direkt zu Ihnen nach Hause (beachten Sie bitte unsere Liefergebiete).
|
|
13
|
-
- **Abholung:** Sie können Ihre Bestellung auch direkt bei uns abholen (
|
|
13
|
+
- **Abholung:** Sie können Ihre Bestellung auch direkt bei uns abholen (Musterstraße 1, 12345 Musterstadt).
|
|
14
14
|
|
|
15
15
|
### Zahlungsmöglichkeiten
|
|
16
16
|
|
|
@@ -21,8 +21,8 @@ Wir bieten Ihnen zwei Möglichkeiten, Ihre Bestellung zu erhalten:
|
|
|
21
21
|
|
|
22
22
|
Wir liefern ausschließlich in folgende Gebiete:
|
|
23
23
|
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
24
|
+
- **12345 Musterstadt** (Stadtteile Musterstadt und Nebenort)
|
|
25
|
+
- **12346 Beispieldorf**
|
|
26
26
|
|
|
27
27
|
### Lieferkosten
|
|
28
28
|
|
|
@@ -71,7 +71,7 @@ This is a step toward the multi-platform goal: only the seeding in
|
|
|
71
71
|
- `AnimatedSection` renders product cards with `opacity-0` in SSR HTML
|
|
72
72
|
(IntersectionObserver reveals them post-mount) — content invisible without
|
|
73
73
|
JS; potential SEO/CLS concern. → suggested issue
|
|
74
|
-
- `Header/Right.vue` hardcodes the phone number `tel:+
|
|
74
|
+
- `Header/Right.vue` hardcodes the phone number `tel:+49123456789` in the
|
|
75
75
|
base layer — should come from config for multi-tenant demo shops.
|
|
76
76
|
→ suggested issue
|
|
77
77
|
- The 16 home-page mismatches from the RUM data were **not** reproducible
|
|
@@ -4,7 +4,7 @@ Date: 2026-09-08, reduced to the remaining delta on 2026-09-10. Branch `fix/issu
|
|
|
4
4
|
|
|
5
5
|
## Re-verified (2026-09-08)
|
|
6
6
|
|
|
7
|
-
Live probe on
|
|
7
|
+
Live probe on the customer shop:
|
|
8
8
|
|
|
9
9
|
| URL | Result |
|
|
10
10
|
| ------------ | ----------------------------------------- |
|
|
@@ -53,7 +53,7 @@ note of #277 on why a project composable must not share a layer name).
|
|
|
53
53
|
|
|
54
54
|
## Verification
|
|
55
55
|
|
|
56
|
-
Production build against the
|
|
56
|
+
Production build against the customer Store API: `/c/Fisch/` 200,
|
|
57
57
|
`/c/fisch/`, `/c/fisch`, `/c/FISCH` and `/c/Pizza` → 301 to the SEO URL,
|
|
58
58
|
`/c/Fisch?properties=x` → 301 `/c/Fisch/?properties=x`, unknown paths 404.
|
|
59
59
|
Playwright: direct load, link navigation, client-side redirect and back
|
|
@@ -6,12 +6,12 @@ As of 2026-09-10, branch `fix/251-header-phone-from-config`.
|
|
|
6
6
|
|
|
7
7
|
| Place | Hardcoded | Now |
|
|
8
8
|
| --- | --- | --- |
|
|
9
|
-
| `Header/Right.vue` | `tel:+
|
|
10
|
-
| `BottomNavi.vue` (not used by any page, but exported by the layer) | OpenStreetMap directions to
|
|
9
|
+
| `Header/Right.vue` | `tel:+49123456789` (the customer shop) | `site.telephone`, button hidden without a number |
|
|
10
|
+
| `BottomNavi.vue` (not used by any page, but exported by the layer) | OpenStreetMap directions to the customer shop's coordinates, same phone number | `site.googleBusinessProfileUrl` for the route, `site.telephone` for the call; each button hidden without a value |
|
|
11
11
|
| `pages/bestellung/[id]/index.vue` | `tel:+4917623456789` ("call us" card) | `site.telephone`, card hidden without a number |
|
|
12
|
-
| `useValidCitiesForDelivery` | delivery cities `
|
|
12
|
+
| `useValidCitiesForDelivery` | delivery cities `Musterstadt, Beispieldorf, Hausen` and a Geoapify bounding box around Musterstadt | removed, see below |
|
|
13
13
|
|
|
14
|
-
`content/` (demo content that a shop overrides) still carries
|
|
14
|
+
`content/` (demo content that a shop overrides) still carries the customer shop's phone number and gallery alt texts, the ShopBite demo's imprint and the "Musterstraße 1" pickup address in `zahlung-und-versand.md`. Left as is: it is content, not code, and every shop replaces it; worth a separate clean-up of the demo content.
|
|
15
15
|
|
|
16
16
|
## Decision on the delivery area (Lirim)
|
|
17
17
|
|
|
@@ -5,7 +5,7 @@ As of 2026-09-10, branch `feature/272-restaurant-schema`.
|
|
|
5
5
|
## Decisions (agreed with Lirim)
|
|
6
6
|
|
|
7
7
|
- **Own builders + `useHead`** instead of `nuxt-schema-org`: the storefront already writes `CollectionPage` and `BreadcrumbList` JSON-LD by hand, the builders in `app/utils/schema.ts` are pure functions (unit-testable, an acceptance criterion), no new dependency, platform-neutral.
|
|
8
|
-
- **Menu split:** the home page carries `Restaurant` + `Menu` with one `MenuSection` per menu category (name, URL) from the menu navigation that is loaded anyway; each category page carries a `MenuSection` with its products as `MenuItem` incl. `offers.price` from the listing that is loaded anyway. A full menu on the home page would have meant ~41 listing requests during SSR and 60–80 KB more HTML for
|
|
8
|
+
- **Menu split:** the home page carries `Restaurant` + `Menu` with one `MenuSection` per menu category (name, URL) from the menu navigation that is loaded anyway; each category page carries a `MenuSection` with its products as `MenuItem` incl. `offers.price` from the listing that is loaded anyway. A full menu on the home page would have meant ~41 listing requests during SSR and 60–80 KB more HTML for the customer shop (#273).
|
|
9
9
|
- Data source is `runtimeConfig.public.site` (as for the footer, #290) plus two new keys: `address.country` (default `DE`) and `priceRange`. Later the plugin config (shopbite-de/shopware-plugin#15, #298) can feed the same builders.
|
|
10
10
|
- `Product` schema on product pages waits for #289 (there are no product pages yet).
|
|
11
11
|
|
|
@@ -18,10 +18,10 @@ As of 2026-09-10, branch `feature/272-restaurant-schema`.
|
|
|
18
18
|
|
|
19
19
|
## Pitfalls found on the first run
|
|
20
20
|
|
|
21
|
-
- Nuxt parses a numeric env value (`NUXT_PUBLIC_SITE_ADDRESS_POSTAL_CODE=
|
|
21
|
+
- Nuxt parses a numeric env value (`NUXT_PUBLIC_SITE_ADDRESS_POSTAL_CODE=12345`) into a number; `postalCode` is coerced to a string in the builder.
|
|
22
22
|
- `dayOfWeek` lists are sorted Monday to Sunday; the plugin returns Sunday (7) before Saturday in insertion order.
|
|
23
23
|
- Menu sections nest: `Nudeln` carries its nine pasta subcategories as `hasMenuSection`.
|
|
24
24
|
|
|
25
25
|
## Verification
|
|
26
26
|
|
|
27
|
-
Production build against the
|
|
27
|
+
Production build against the customer Store API with the NAP env variables set: the home page HTML carries one `Restaurant` node (3 KB) with address, phone, cuisine, price range, `sameAs`, two grouped `openingHoursSpecification` entries, two `specialOpeningHoursSpecification` entries (holidays from the plugin), and a `Menu` with nine sections, two of them nested. `/c/Pizza/` carries `CollectionPage`, `BreadcrumbList` and a `MenuSection` with 29 `MenuItem`s incl. `offers` in EUR (3 KB). The Rich Results Test and the Schema Markup Validator need a public URL, so that check happens after the deploy.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
As of 2026-09-10, branch `feature/273-performance-hero-media`.
|
|
4
4
|
|
|
5
|
-
## Measurement (Lighthouse 12 on
|
|
5
|
+
## Measurement (Lighthouse 12 on the customer shop, 2026-09-10)
|
|
6
6
|
|
|
7
7
|
| | Mobile | Desktop |
|
|
8
8
|
| --- | --- | --- |
|
|
@@ -34,7 +34,7 @@ ffmpeg -i hero.mp4 -vf "scale=1280:-2" -r 25 -c:v libx264 -crf 28 -preset medium
|
|
|
34
34
|
|
|
35
35
|
| Shop | Original | 720p | Poster 1280 |
|
|
36
36
|
| --- | --- | --- | --- |
|
|
37
|
-
|
|
|
37
|
+
| Customer shop | 3.4 MB | 713 KB | 65 KB |
|
|
38
38
|
| ShopBite demo | 27.6 MB | 6.0 MB | 60 KB (`public/hero-poster.webp`) |
|
|
39
39
|
|
|
40
40
|
The 720p files are not in a repository; they need to be uploaded to the respective Shopware media (no admin credentials in the storefront `.env`).
|
|
@@ -42,7 +42,7 @@ The 720p files are not in a repository; they need to be uploaded to the respecti
|
|
|
42
42
|
## Not covered
|
|
43
43
|
|
|
44
44
|
- `Wishlist.vue`, `CardKitchen.vue`, `FilterGroup.vue`, `ShippingMethod.vue`, `PaymentMethod.vue` still use `NuxtImg` for small icons; harmless without a provider domain.
|
|
45
|
-
-
|
|
45
|
+
- The customer shop's `Kalam-Regular.ttf` (154 KB, `font-display: optional`) is the shop's own font.
|
|
46
46
|
- bf-cache "Internal error".
|
|
47
47
|
|
|
48
48
|
## Measuring locally: pitfalls
|
|
@@ -54,7 +54,7 @@ Lighthouse against the bare `node .output/server/index.mjs` is not comparable wi
|
|
|
54
54
|
- TTFB is 450–680 ms here (SSR calls the Store API in another data centre) vs 190 ms live.
|
|
55
55
|
- The observed (unthrottled) first paint of the local headless Chrome is ~1.5 s although HTML, CSS and poster are loaded at 0.45 s, while the live site paints at 0.4 s; nothing in the HTML hides the page. Simulated mobile FCP therefore stays around 3.2 s locally regardless of media, and mobile LCP (poster loaded at 1.6 s) is reported as 5.6 s ("render delay" ~4 s). The mobile acceptance numbers need a run against the deployed shop.
|
|
56
56
|
|
|
57
|
-
Local results (h2 proxy,
|
|
57
|
+
Local results (h2 proxy, customer Store API, demo content): desktop `/` 98 (LCP 1.0 s, was 88/1.9 s live), `/c/Pizza/` 98 (LCP 1.0 s); mobile `/` 66 (LCP element is the 19 KB poster, page weight 1.07 MB instead of 5.1 MB, no video request), `/c/Pizza/` 65 (category header 37 KB thumbnail instead of 756 KB, CLS 0).
|
|
58
58
|
|
|
59
59
|
The `blur-sm` on the poster made no measurable difference in the simulation; it was still removed in favour of a pre-blurred file (19 KB instead of 60 KB), which also saves the filter on real phones.
|
|
60
60
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
As of 2026-09-10, branch `feature/274-seo-sitemap-canonical-og`.
|
|
4
4
|
|
|
5
|
-
## Starting point (live,
|
|
5
|
+
## Starting point (live, the customer shop)
|
|
6
6
|
|
|
7
7
|
- `/sitemap.xml` 404, robots.txt without `Sitemap:`.
|
|
8
8
|
- Home page: no canonical, no `og:image`, `twitter:card: summary`.
|
|
@@ -35,15 +35,15 @@ As of 2026-09-10, branch `feature/274-seo-sitemap-canonical-og`.
|
|
|
35
35
|
|
|
36
36
|
## Verification
|
|
37
37
|
|
|
38
|
-
Production build locally against the
|
|
38
|
+
Production build locally against the customer Shopware (Store API, public access key) with `NUXT_PUBLIC_STORE_URL=https://shop.example.com`:
|
|
39
39
|
|
|
40
|
-
- robots.txt: `Sitemap: https://
|
|
40
|
+
- robots.txt: `Sitemap: https://shop.example.com/sitemap.xml`
|
|
41
41
|
- `/sitemap.xml` 200: home page, content pages, categories incl. subcategories with `/`, lastmod, category images
|
|
42
42
|
- Home page, `/c/Pizza/`, `/c/Nudeln/Penne/`, `/agb`, `/anmelden`, `/bestellung/warenkorb`: exactly one absolute canonical and one absolute `og:image` each, individual title
|
|
43
43
|
|
|
44
|
-
## After the release for
|
|
44
|
+
## After the release for the customer shop
|
|
45
45
|
|
|
46
|
-
- Set `NUXT_PUBLIC_SITE_ADDRESS_CITY=
|
|
47
|
-
- Remove `seo.title`/`seo.description` in `content/index.yml` or fill them with search terms (currently
|
|
46
|
+
- Set `NUXT_PUBLIC_SITE_ADDRESS_CITY=Musterstadt`, `NUXT_PUBLIC_SITE_CUISINE`.
|
|
47
|
+
- Remove `seo.title`/`seo.description` in `content/index.yml` or fill them with search terms (currently the shop name and city, which takes precedence over the new default).
|
|
48
48
|
- `public/card.png` exists; check it is 1200 × 630 px. Run the Facebook Sharing Debugger.
|
|
49
49
|
- The `robots.disallow` for `/impressum`, `/datenschutz`, `/agb` keeps those pages out of the sitemap.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
As of 2026-09-10, branch `fix/275-accessibility-contrast-aria-hidden`.
|
|
4
4
|
|
|
5
|
-
## Findings (Lighthouse 12 on
|
|
5
|
+
## Findings (Lighthouse 12 on the customer shop, score 92 mobile and desktop)
|
|
6
6
|
|
|
7
7
|
The issue guessed at light backgrounds and a carousel; both audits point elsewhere.
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@ Contrast of the palettes in use (WCAG ratio, target ≥ 4.5; "tint" is the 10 %
|
|
|
14
14
|
| Palette | 500 on white | 600 on white / tint | 400 on #171717 | 500 on #171717 |
|
|
15
15
|
| --- | --- | --- | --- | --- |
|
|
16
16
|
| ShopBite orange (storefront default) | 3.11 | old `#e64d00` 3.87; new `#c23d00` 5.30 / 4.59 | 6.89 | 5.76 |
|
|
17
|
-
|
|
|
17
|
+
| Customer green | 4.99 | 7.12 / 6.12 | 9.07 | 3.59 |
|
|
18
18
|
| Tailwind rose (hey-amore) | 3.67 | 4.70 / ~4.1 | 6.66 | 4.88 |
|
|
19
19
|
| Tailwind red (masala-mio) | 3.76 | 4.83 / ~4.2 | 6.48 | 4.76 |
|
|
20
20
|
|
|
@@ -25,7 +25,7 @@ So the storefront default and both demos fail in light mode as well; nobody had
|
|
|
25
25
|
- Contrast: Nuxt UI convention. `--ui-primary` is `brand-600` in light mode and `brand-400` in dark mode; the storefront's own `brand-600` becomes `#c23d00` (5.30 on white, 4.59 on its tint). `--ui-success` is `green-800` light / `green-400` dark. Rule for demos: `brand-600` ≥ 5:1 on white (covers the tint), `brand-400` ≥ 4.5:1 on `#171717`.
|
|
26
26
|
- Toast proxies: instead of patching `reka-ui` (tried first: a pnpm patch of `dist/Toast/FocusProxy.{js,cjs}` without `aria-hidden` cleared the audit), the **status toasts are gone**. A permanent "closed" toast was a misuse of a transient notification; the status is now a line above the opening hours in the footer (`components/Footer/StoreStatus.vue`, `useStoreStatus`). A chip next to the logo was tried first: on phones only the dot fit, on the desktop the text ran into the navigation, and inside the logo link it broke the link's accessible name. Transient toasts stay on Nuxt UI; their proxies only exist for seconds. Upstream issue for the proxy still worth filing.
|
|
27
27
|
- The status line is client only (`ClientOnly` with a placeholder of the same size): the open/closed state depends on the current time, and the server's clock/time zone is not the shop's. Server-rendered status would need a configured time zone; separate issue if wanted.
|
|
28
|
-
-
|
|
28
|
+
- The customer shop keeps its own `main.css`; the same `--ui-primary` and `--ui-success` changes went there.
|
|
29
29
|
|
|
30
30
|
## Implementation
|
|
31
31
|
|
|
@@ -7,7 +7,7 @@ As of 2026-09-10, branch `feature/290-footer-nap`.
|
|
|
7
7
|
- Data comes from `runtimeConfig.public.site` (platform-neutral, via env): `address.street`, `address.postalCode`, `address.city` (since #274), `telephone`, `googleBusinessProfileUrl`. The same values will later feed the `Restaurant` schema from #272. Long-term the values move to the Shopware plugin config (shopbite-de/shopware-plugin#15, storefront #298), env stays as fallback.
|
|
8
8
|
- A dedicated contact block above the Shopware footer navigation (not extra columns), so it stays readable regardless of the number of navigation columns.
|
|
9
9
|
- Opening hours: consecutive days with identical intervals are grouped, days without hours show as "Ruhetag". No holidays/closing days in the footer.
|
|
10
|
-
-
|
|
10
|
+
- The customer shop: only a note in the PR, no special handling (see below).
|
|
11
11
|
|
|
12
12
|
## Implementation
|
|
13
13
|
|
|
@@ -21,8 +21,8 @@ As of 2026-09-10, branch `feature/290-footer-nap`.
|
|
|
21
21
|
- A `mockNuxtImport("useRuntimeConfig")` without `app.baseURL` breaks the router setup of the Nuxt test environment (`useRouter()` undefined, see #294; `HeaderRight.test.ts` mocks with `app.baseURL` and works). `test/nuxt/FooterContact.test.ts` sets the real runtime config via `Object.assign` instead.
|
|
22
22
|
- After switching branches across #292, `@nuxtjs/sitemap` was missing from `node_modules` (`nuxt prepare`: "Cannot resolve module"). Run `pnpm install --frozen-lockfile` after every switch to a newer `main`.
|
|
23
23
|
|
|
24
|
-
## After the release for
|
|
24
|
+
## After the release for the customer shop
|
|
25
25
|
|
|
26
|
-
- Set env: `NUXT_PUBLIC_SITE_ADDRESS_STREET="
|
|
27
|
-
- **Clarify the phone number:** imprint says `+49
|
|
28
|
-
- Remove the link categories "
|
|
26
|
+
- Set env: `NUXT_PUBLIC_SITE_ADDRESS_STREET="Musterstr. 1"`, `NUXT_PUBLIC_SITE_ADDRESS_POSTAL_CODE=12345`, `NUXT_PUBLIC_SITE_ADDRESS_CITY=Musterstadt`, `NUXT_PUBLIC_SITE_TELEPHONE`, `NUXT_PUBLIC_SITE_GOOGLE_BUSINESS_PROFILE_URL`.
|
|
27
|
+
- **Clarify the phone number:** imprint says `+49 123 456789`, the Shopware footer navigation `tel:+49123456780`. For NAP consistency use one number, identical to the Google Business Profile.
|
|
28
|
+
- Remove the link categories "Musterstraße 1" and "Tel: …" in the Shopware folder "Unternehmen", otherwise address and phone appear twice in the footer.
|