Commit Graph
23 Commits
Author SHA1 Message Date
austin d2c62f35ed Admin for the menu and enquiries, plus gallery fixes
Admin
- /api/admin: products CRUD, the enquiry inbox, and presigned photo upload straight to the
  bucket so images never pass through the app. Gated by platform.security.authenticated-paths
  = /api/admin/**, so any signed-in Authentik user is staff — the alternative is a role model
  a two-person bakery would never maintain.
- /api/me is deliberately PUBLIC. The SPA asks on every page load, and requiring a login
  would bounce every anonymous visitor to Authentik just to read the menu.
- /admin screens: product list with edit and remove, an editor with drag-free photo
  reordering and upload, and an enquiry inbox that flags anything the relay refused.

Gallery
- swipe on touch devices, which the react-awesome-slider it replaced had and this did not,
  plus arrow keys and position dots — with swipe there is otherwise nothing to say a card
  holds more than one photo. Vertical drags are ignored so page scrolling still works.
- @BatchSize on the photo collection: the products page loaded the whole catalogue and
  Hibernate issued a query per product for its images, forty-odd round trips for a page
  that needs two.

Three things the tests caught, none of which are obvious:
- Adding the storage starter broke every existing test. It activates on a default endpoint,
  so an S3 client is built even in tests and dies on blank keys.
- MockMvc's webAppContextSetup leaves the security filter chain OUT, so the first version of
  the security test passed 200s and proved the opposite of what it claimed. It needs
  .apply(springSecurity()).
- Turning on the security starter turns on CSRF — for the PUBLIC contact form too, which
  then 403s. The SPA now reads the XSRF-TOKEN cookie and sends X-XSRF-TOKEN, and there is a
  test asserting the form is rejected without it.
2026-07-23 11:58:21 -05:00
austin 27821cdb90 Inherit the platform contract tests, and extend the shared Renovate preset
PlatformWebContract asserts what this app must do because it is on the platform: an /api
path matching no controller 404s rather than returning the SPA, health is UP, the liveness
and readiness probes exist, and a client-side route forwards to the shell. That first one
shipped broken to six live sites and was found by typing a URL by hand; now it fails a
build instead.

renovate.json is three lines pointing at austin/renovate-config. The rules were copied per
repo, so they matched only by luck and a change was six edits.

Platform 0.1.9.
2026-07-23 09:46:53 -05:00
austin 4c5537e593 Point the motion imports at the renamed package
Renovate's replacement PR swapped framer-motion for its successor 'motion' in
package.json but left the imports, so the build could not resolve them. The React entry
point is motion/react.
2026-07-23 08:52:01 -05:00
austin b8e38d56a1 tsconfig: drop baseUrl, which TypeScript 7 removed
TS7 errors with 'Option baseUrl has been removed'. The paths mapping already points at
./src/*, which resolves relative to this file without it, and TS 5.9 accepts the same
config — so this lands safely ahead of the TypeScript 7 bump.
2026-07-23 08:50:29 -05:00
austin ea55de39d4 Update dependency vite-plugin-svgr to v5 2026-07-23 12:44:13 +00:00
austin 7789d0d2f4 Update dependency typescript to v7 2026-07-23 12:44:13 +00:00
austin b443c8d861 Replace dependency framer-motion with motion 2026-07-23 12:44:11 +00:00
austin 33b3d064c7 Update bennett platform to v0.1.7 2026-07-23 12:44:11 +00:00
austin 5380f477ca Platform 0.1.6 (contact security) + fidelity fixes from the port review
- .container back in @layer components so Tailwind's px-4 still wins; unlayered it had
  quietly widened the gutter on every page
- shadow-sm -> shadow-xs: Tailwind v4 renamed the scale, so the ported markup was giving
  every white card a heavier shadow than the live site
- route changes jump to the top again instead of smooth-scrolling
- preload the wordmark font and the hero image
2026-07-23 06:09:38 -05:00
austin 292a8e3087 Platform 0.1.5: fail fast on a blank contact recipient 2026-07-22 22:18:23 -05:00
austin f471462d05 Rewrite on the Bennett platform: Spring Boot + Vite/React SPA
Replaces the Next.js app. Same site, same look; the parts that were decisions rather
than markup now live in Java.

- catalogue, curated order, category filter and image URLs move from a TypeScript array
  into Postgres behind /api/products and /api/categories
- contact form uses the shared platform-starter-contact: validate, RECORD, send, then
  fan out to n8n. Recording first means a relay outage costs a notification, not an enquiry
- PageMetaController rewrites title/description/OG per route, replacing what Next's SSR
  gave crawlers and link-preview scrapers
- 50MB of photos leave the repo for the MinIO bucket, re-encoded to webp (14MB) with EXIF
  (including phone GPS) stripped
- fixes a catalogue typo: 'Strawberry Pie' was category 'Pies', which no filter matched, so
  it was unreachable unless browsing All
2026-07-22 22:09:51 -05:00
austin 207415dbbe ci: exercise workflow_run webhook (no-op) 2026-07-22 19:50:15 -05:00
austin 7eefc5d008 contact: fan out enquiries to n8n hub (fire-and-forget)
Keeps the direct SMTP email as the reliable delivery path; when CONTACT_HUB_URL
is set, also POSTs the enquiry to the n8n webhook so the hub sends the customer
auto-reply and (later) creates CRM/task records. Best-effort with a 4s timeout,
so a slow or down hub never blocks or fails the form.
2026-07-22 18:12:45 -05:00
austin eb8cc01a59 contact route: optional SMTP auth + trust local self-signed relay/bridge 2026-07-22 15:17:06 -05:00
austin a142269a59 ci: push image under thevine org after repo move 2026-07-22 11:53:58 -05:00
austin ade2aec063 ci: re-trigger build after runner docker.sock fix 2026-07-22 10:50:09 -05:00
austin 91a37a8d06 Add Docker build + Gitea Actions CI for self-hosting
- next.config: output 'standalone' for a self-contained server bundle
- Dockerfile: multi-stage Next.js build (node:22-alpine)
- .gitea/workflows/deploy.yml: build + push to the Gitea registry
2026-07-22 10:44:04 -05:00
austin fae1be2b39 added a dynamic favicon 2025-02-25 16:54:58 -08:00
austin 4e4c7a68f3 removed unessesary images 2025-02-25 16:54:45 -08:00
austin df5cc5f022 removed history page 2025-02-11 10:45:19 -06:00
austin dcda124b31 updated readme 2025-02-10 12:45:41 -06:00
austin c9eb6480da updated default.nix shell for nextjs 2025-02-10 12:42:19 -06:00
austin 769e99d4c3 2.0 2025-02-08 14:24:51 -06:00