Commit graph

35 commits

Author SHA1 Message Date
e896fd3c99 Shop: item priority, block sort order and an optional "Sort by" menu
- items.priority (migration + pb_schema.json): Recommended order in Shop
  blocks, higher first, then by name. Set under Services & products, which
  now lists items in that order.
- Shop block: choose its order (Recommended, Most popular, price up/down,
  name) and optionally let visitors re-sort with a "Sort by" menu.
  sortItems() in shared/items.ts is the one place items are ordered.
- Most popular: GET /api/shop/popular returns item ids by units sold in
  paid orders over the last 90 days (ids only, no sales figures).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gWt7pNdAsocjxujY3m
2026-11-04 22:36:50 +00:00
5e2db31b5e PocketBase 0.40.6, JS SDK 0.28.2; fresh-install steps for the new dashboard
- docker-compose: elestio/pocketbase v0.40.6, digest-pinned (same port,
  user and layout as v0.23.12)
- pocketbase SDK ^0.28.2 in both apps and packages/shared (0.27/0.28
  are additions and pb.filter() fixes, nothing breaking)
- README: setup steps rewritten for the 0.40 dashboard: install link
  from the log, and tick "Merge with the existing collections" on
  schema import (the default deletes `users`); an upgrade section
  (back up first, data upgrade is one-way, what changed)
- AGENTS.md: versions; field settings go at the top level, not `options`

Compared with main (0.23.12 + SDK 0.26) on copies of real data: admin
and public page text, image upload, import of all three backups, the
shop flow via hooks, Stripe webhook signatures, and a fresh install
with pb_schema.json import all behave the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gX7xH4zwYTr5vE7mf8
2026-11-03 09:43:49 +00:00
d62799f263 PocketBase: switch image to elestio/pocketbase v0.23.12
spectado/pocketbase has been removed from Docker Hub. elestio publishes
the same PocketBase version (0.23.12), so schema, migrations and hooks
are unchanged. The image differs in packaging:

- listens on 8090 instead of 80 (Caddyfile, POCKETBASE_INTERNAL_URL)
- runs as non-root user `pocketbase` (uid 100), so pb_data written by
  the old root-run image needs a one-off chown; README documents it
- pinned by digest as well as tag

Tested: copy of an existing pb_data volume, README chown command via
podman-compose, then the full stack (public page renders, admin and db
routes via Caddy, shop hooks respond). A fresh volume also works.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gX7xH4zwYTr5vE7mf8
2026-11-03 09:10:16 +00:00
2dc57fd27c Dashboard: chart, utilisation, sales, customers, codes owed, attention; show password
Adds to the dashboard: an income-per-month bar chart (hover for the
figures; the month table is its table view), opened-time utilisation
(booked hours against hours opened in Slots), what sells and popular
lengths, new vs. returning customers and regulars, what usable codes are
still worth, and a "Needs attention" list (failed booking emails, group
sessions nearly full and codes expiring in the next 30 days). Slot places
and code credits come from the shop hooks, as everywhere else.

Login: a Show/Hide button on the password field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gV9YDZk1XhjJ5LtyAt
2026-10-27 09:14:27 +00:00
bdc040636a Admin: dashboard at / with income and hours; Site design 2x2 grid
The dashboard shows income (paid orders, by the month they were paid),
hours worked and still booked this month, the next 7 days' bookings and
a 12-month table. Booked time is counted with overlaps merged, so a
group session is one hour of work however many people booked it.
Login and the sidebar title now land on the dashboard.

Site design: four cards in a three-column grid left Style alone under
Header. Two columns on xl (Header|Footer, Colors|Style) and all four
side by side from 2xl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gV9YDZk1XhjJ5LtyAt
2026-10-27 08:54:57 +00:00
a6f9e6c6e3 Public site: smoother scrolling
Scrolling the home page dropped frames on a desktop-sized window. Measured
in Firefox and Chromium, the cost came from blocks fading in while scrolling
and from the blurred (frosted) header and calendar cards, which are redrawn
on every frame.

- Header and upcoming-calendar cards: nearly solid background, no blur.
- Fade-in animations are shorter (0.4s / 0.5s, a smaller slide).
- They are off for people whose device asks for reduced motion, and on
  devices that can't keep up: very few cores / little memory straight
  away, otherwise when more than 1 in 10 of the first scrolled frames run
  late (scrollReveal.ts adds `plain-motion` to <html>, remembered for
  the visit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-27 08:36:03 +00:00
91f6705899 Site design → Style: fonts, corners, text size, shadows, page width
A new Style card in Site design (a `style` global) chooses the heading and
body fonts from 15 bundled ones, corners (sharp/soft/round), text size,
shadow strength and page width, with a live sample. The choices become
--site-* CSS variables that the @theme radius, shadow, container and font
tokens scale, so blocks keep using rounded-xl, shadow-sm, max-w-6xl and
follow the setting. Buttons and chips use rounded-button; the defaults
are the site's current look.

Fonts are @fontsource-variable packages (replacing the static DM Sans and
Playfair ones): still served by the site, and a browser downloads only
the fonts a page uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 19:00:37 +00:00
9500f0c07b Admin on phones: touch dragging, roomier setting rows, fading save banner
- Block list: drag a block by its handle with a finger (phones don't fire
  HTML drag events); the mouse keeps drag-and-drop on the whole row.
- Setting rows (SegmentedControl, ColorField, Anchor) put the label above
  the choices in a narrow row, so e.g. Shop "Item type" fits.
- Background Overlay is a slider instead of ten buttons.
- Page and email editors: "Draft saved." fades out like Site design's
  (new SaveStatus component); errors stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 17:23:45 +00:00
650c95fb78 Image picker: pick from the uploaded images; labels beside the fields
"Pick from library" opens the images already in `media` (newest first,
searchable by alt text or file name, 24 at a time) so one can be reused
without uploading it again; it lists them through the new admin
GET /api/media. The layout follows the sketch: box on the left, Alt text and
Image URL with their labels beside them, and Pick from library / Paste as a
full-width row underneath.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 14:21:22 +00:00
93d4863cfc Admin: one image picker everywhere, with paste and drag-and-drop
ImageUploader becomes ImagePicker and replaces the separate image field on
Services & products, so every image (blocks, card images, block backgrounds,
emails, the logo, services) is picked the same way. Besides choosing a file
it takes an image dragged onto the box or pasted (Ctrl+V while the picker
has focus, or the Paste button where the browser allows reading the
clipboard). Pasted images get a dated file name and no alt text made from
"image.png"; files the media collection won't take are refused with a
message before uploading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 13:32:43 +00:00
f86c2251dc Visual text editor; Cards, FAQ and HTML blocks; block anchors
The text editor (Tiptap) only produces simple HTML: headings, bold,
italic, strikethrough, links, lists, pull quotes, lines. Layouts that
were hand-written HTML in text blocks get their own blocks (Cards with
pictures or numbered steps, FAQ), one-offs and embeds go in an HTML
block, and every block can have an anchor for #links. Text blocks get
alignment and a small (footnote) size.

Existing text blocks the editor can't represent become HTML blocks that
render exactly as before (migration, and backup import for old files);
text that is only centred becomes centred text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 12:58:15 +00:00
68c67d7e96 Site design: type the basket page's slug instead of picking it
Like the CTA's address, the basket page is now a text box. Slashes and
spaces around the slug are ignored, and Site design warns when no page
has that slug.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 11:50:53 +00:00
f20d6777ab Site design: the CTA keeps its address, the basket page is optional
Instead of a separate booking page setting, booking links lead to the
header button's own address again, and the basket page falls back to
that address when it isn't set. Site design warns when the basket's
page isn't published or has no Checkout block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 11:44:03 +00:00
c3c10229b0 Site design: separate booking page and basket page
The header button, the basket indicator, the shop's "view basket" links,
hero buttons and the payment return page all pointed at a hard-coded
/book. Site design now has a Booking page (where the CTA leads) and a
Basket page (where the basket leads; empty = the booking page), and
warns when the page picked is unpublished or lacks its Shop / Checkout
block. On a basket page of its own, an empty basket links to the
booking page instead of saying "pick a service above".

Sites saved before this keep their links: the booking page falls back
to the CTA's old address, then /book.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 11:19:54 +00:00
23c5b70a93 Shop: show the bundle's separate price as a saving; hide unsellable bundles
Bundle cards show what the parts cost one by one, crossed out when it's
more than the bundle price. Bundles with a part that isn't on sale are
left out of the shop data, so their parts always have names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 09:04:35 +00:00
c7e019131a Docs: bundles and codes, trackStock, personal data in passes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-25 21:39:51 +00:00
e1a8a54458 Docs: windows, durations and the new slot availability rules
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-25 20:12:46 +00:00
e29eaaa8e8 Show prices in the shop currency (STRIPE_CURRENCY), not hard-coded EUR
formatPrice always formatted EUR, so the public shop, checkout, basket
and order confirmation showed € even when Stripe charged another
currency. It now takes a currency; both apps pass STRIPE_CURRENCY to the
blocks as layout data `currency` (like `timezone`), so one setting drives
what Stripe charges and every price shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6FzyGitv5gDZEcCHDGoo
2026-10-25 14:48:12 +00:00
0b3f8eabab Docs: personal data (GDPR) — what is stored, the customer tools, retention
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
2026-10-24 10:44:45 +00:00
214db95186 Show dates, times and prices in a European format and the studio's timezone
Formatting with the default locale rendered US dates (MM/DD/YYYY, 12-hour)
on the server. Everything shown to people now uses DISPLAY_LOCALE (en-GB)
and booking times use SITE_TIMEZONE. The public layout reloads on every
navigation so places left are never stale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
2026-10-24 09:32:56 +00:00
7075ab7883 Docs: slot availability rules, capacity and line holds
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
2026-10-24 08:26:37 +00:00
b52da79ec8 Slots: month calendar view with day panel
/slots?month=YYYY-MM loads only that month's grid; chips coloured by
status, service filter, a day panel with add/copy/clear, and the month's
list collapsed below. The single-slot form is enhanced so saving keeps
the month. Docs updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
2026-10-24 07:41:17 +00:00
7b6c8c2511 Compose: configurable public URL scheme/port (fixes login behind HTTPS)
ORIGIN, PUBLIC_POCKETBASE_URL and PUBLIC_SITE_URL were hard-coded to
http://<sub>.${DOMAIN}:8080. Behind a TLS reverse proxy the browser's
origin is https://<sub>.<domain>, so SvelteKit rejected the admin login
form ("Cross-site POST form submissions are forbidden") and image URLs
pointed at an unreachable port. URL_SCHEME / URL_PORT now build them
(defaults unchanged). Two flat variables because podman-compose 1.5 does
not support nested ${A:-${B}} defaults.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
2026-10-07 14:37:28 +00:00
9fab662bee Docs: shop runs in PocketBase hooks; secrets per service
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
2026-10-06 12:34:58 +00:00
bcb6cf80c7 Docs: commerce credentials are required for shop data; type-check setup
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
2026-10-06 12:06:06 +00:00
b2ebdc1799 Docs: theme colours follow Site design
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
2026-10-06 11:32:21 +00:00
c54da8728e Pin PocketBase server to 0.23.12
`spectado/pocketbase:latest` meant any rebuild could silently jump
versions, while pb_schema.json and the JS migrations target 0.23's format
and API. 0.23.12 is the image `latest` currently resolves to (same image
id), so this changes nothing at runtime.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
2026-10-06 11:21:36 +00:00
47a1250b46 Docs: admin UI conventions, timezone rule, PocketBase migrations
- AGENTS.md: new routes/labels, DaisyUI 5 + admin conventions (fieldset,
  Modal, SegmentedControl/ColorField, confirmSubmit, attempt), site-timezone
  rule, pb.filter rule, migration + pb_schema.json workflow, API-rule
  invariants (no public users sign-up).
- README: how migrations are applied and the users sign-up warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
2026-10-06 11:02:03 +00:00
Jakub Dorfman
96828994e1 added mailing through Brevo and node mailer, also a email editor, with
their custom blocks and renderers
2026-09-28 19:25:19 +02:00
Jakub Dorfman
478a5fd466 moved shared code to the shared package 2026-08-19 19:18:10 +02:00
Jakub Dorfman
1027da989e moved page rendering to a different service and access is now behind
admin.DOMAIN
www.DOMAIN
db.DOMAIN
2026-08-19 17:58:19 +02:00
Jakub Dorfman
c7f6b30b87 removed bare dev fallback routes, only support developmnet in
docker/podman
2026-08-19 13:22:51 +02:00
Jakub Dorfman
246b1990ca added reverse proxy 2026-06-05 15:32:23 +02:00
Jakub Dorfman
1b3ef17800 removed not used blocks 2026-05-20 13:57:07 +02:00
Jakub Dorfman
94c1e0b679 Added background and foreground settings to blocks, and scroll in animations 2026-05-18 18:39:49 +02:00