"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
The box and its Choose/Paste buttons form the left column, so it lines up
with the fields beside it; Remove is a ✕ on the image and hovering an image
says how to replace it. Alt text comes first, the Image URL is smaller and
explained. Without fields (Services & products) the hint and the page's own
note sit beside the box.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
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
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
- "Saved." slides in and collapses away after 2.5 s (no motion with
prefers-reduced-motion); errors stay until the next save.
- The CTA and basket hints are short tooltips on an info button
(hover or keyboard focus) instead of paragraphs.
- A CTA address like "/book" is checked like the basket slug: warns
when no page has that slug or it isn't published.
- Home page moves above Navigation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
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
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
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
Bundle parts are JSON, so deleting a service left bundles pointing at
nothing (shown as "Item" in the shop). An onRecordDelete hook on items
now refuses while a bundle contains it or a usable code still has
sessions of it to book. A bundle with an inactive part is no longer sold
or issued; the admin items list marks it "Not on sale" and shows how many
codes are waiting on an inactive service.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
Bundles are edited with their parts (service at a length, or product,
× count), price and validity. /passes lists codes with used/held/left and
each part's share of the price; codes can be voided, reactivated, given a
new expiry, or issued without a purchase. Orders show codes bought and
bookings paid with a code; the customer page lists codes and erasure
covers them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
A window on fixed steps now has gridMinutes; the admin picks it when
creating or generating windows, and copies keep it. Added to the
(unmerged, undeployed) time-windows migration and pb_schema.json.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
Services get rows of length + price. /slots creates windows (date, hours,
services, start-times mode) and group sessions (service, length, start,
places); the day view shows free time and bookings. Generate/copy/clear
handle both kinds; windows may not overlap and can't shrink past a booking.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
Service cards step through their lengths with a slider and the price
follows. The time picker loads bookable times for the chosen length and
the months on screen from GET /api/slots (a proxy to the shop hook in each
app), and reloads when the basket's bookings change. Checkout, emails and
the basket show each booking's own length.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
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
Admin /customers finds a customer by name, email, phone or notes (orders and unpaid checkouts), exports everything stored as JSON, corrects details on every record, and erases them — anonymising orders (amounts, services and dates stay for the accounts) and deleting unpaid checkouts. A daily cron (and PocketBase start) deletes unpaid checkouts after N days and, when set, anonymises orders after M months, skipping orders with a booking ahead. A paid basket's copy of the details is cleared when its order is created. All writes are in pocketbase/pb_hooks/privacy (orders and baskets are superuser-only); migration 1793000000 makes orders.email optional and adds orders.anonymisedAt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
Site design → Footer picks the privacy policy page; it is linked from the footer and from a short notice above Pay. The notes field asks customers not to write health details (special-category data). 'Create a privacy policy draft' makes an unpublished page describing what this software does with customer data, with gaps for the studio to fill in. No consent checkbox: booking data is processed to perform the contract. Also adds the PrivacyGlobal type used by the retention settings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
Google Fonts and Stripe.js (imported from @stripe/stripe-js, which injects the script on import) sent every visitor's IP address to Google and Stripe on every page. Fonts now come from @fontsource packages bundled into each app; Stripe.js loads from the 'pure' entry point, only when the customer presses Pay.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
Calendar, day panel and list show available / in a basket / booked /
full / blocked (with what blocks it) and places taken. Services, Generate
and single slots take places (default from the service); Copy keeps
them. Once any place is taken only places (not below taken) and notes
can change. All reads go through the shop hook's slot details.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
/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
Generate fills a date range (weekdays x opening hours) spaced by the
service's duration + get-ready time (overridable). Copy repeats a week
into the next 1-12 weeks; Clear deletes free slots in a range. Each
previews first, skips past slots and overlaps with the same service, and
never touches booked or in-basket slots. Planning is pure and DST-safe in
$shared/slots.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
Migration adds the field to existing databases; pb_schema.json mirrors it
in the 0.23 top-level format (min/onlyInt under "options" is ignored).
Edited next to Duration in Services & products.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
order_lines had empty create/update/delete rules, so anyone could forge,
edit or delete the line items of real orders through the REST API. Writes
are now superuser-only (migration + pb_schema.json).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
The admin preview never received items/slots/events, so Shop and Upcoming
calendar blocks were empty there. loadShopData() (shared) now feeds both
the public layout and a new /preview loader.
A Shop block with nothing to show (no active items, a filter matching
none, or commerce data unavailable because POCKETBASE_ADMIN_* is unset)
now says so instead of rendering an empty section.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
- Admin primary/secondary now follow the site's Primary/Accent colours
(owner's request), replacing the fixed admin sage. Text on them is picked
automatically (white or dark, whichever contrasts more), which keeps the
earlier low-contrast problem from coming back with light brand colours;
brand colour is no longer used as text (active nav item, placeholders).
- New $shared/theme renders the colours as a <style> in <head> during
SSR. The public site used to apply them in onMount, so every page load
flashed the default colours first.
- DaisyUI `secondary` now maps to the site Accent everywhere — the
button block's "Secondary" variant was DaisyUI's default pink.
- Colours are admin-entered text placed inside <style>, so only plain
colour values are accepted (hex, named, rgb()/hsl()/oklch()…); anything
else falls back to the default.
- Saving colours in Site design refreshes the admin theme immediately.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
The Delete label in each block row is `relative z-10` (to sit above its
hold-to-delete fill) — the same z-index as the dropdown, and later in the
DOM, so it painted on top of the open menu. Each row is now `isolate`
(its z-indexed layers stay inside it) and the dropdowns in the page and
email editors sit at z-20.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
Agreed with the site owner:
- Grouped sidebar (Website / Bookings / Settings) instead of a flat top
bar that overflowed on phones; a drawer with a hamburger below lg.
Signed-in email and Log out at the bottom.
- Labels: Globals → Site design, Items → Services & products,
Calendar → Events, Export/Import → Backup (URLs unchanged); page headings
and cross-references updated to match.
- Export/import moved from a navbar dropdown to a /backup page that says
what is and isn't included.
- Admin event calendar starts weeks on Monday (createCalendarMonth gains an
optional weekStartsOn; the public block is unchanged).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
Security:
- PocketBase's default `users` collection allows anonymous sign-up, and
every CMS rule only checks "signed in" (the admin login also accepts
`users`). Anyone could register via the public API and edit the site,
read orders/customer details, or log into the admin. Sign-up is now
superuser-only.
- orders.create, baskets.create/update and basket_lines.create/update/
delete were open to anonymous requests, allowing forged "paid" orders in
the admin and basket tampering. The public app performs all of these
server-side with the admin client, so they are now superuser-only
(basket add-item/add-slot verified still working).
Data:
- created/updated autodate fields on all app collections; orders are now
listed newest-first by date (ids are random, '-id' was not chronological).
- Unique indexes on pages.slug and globals.key (skipped with a log line if
existing data has duplicates, so PocketBase still starts).
Delivered as a JS migration in pocketbase/pb_migrations, mounted into the
container (the image already passes --migrationsDir=/pb_migrations), so it
applies once on the next start. pb_schema.json carries the same changes for
fresh installs, where the migration runs before the schema is imported.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
- Migrate all DaisyUI 4 form markup (form-control, label-text, *-bordered —
removed in v5) to v5 fieldset/legend; labels sat inline beside inputs
and inputs fell back to a fixed 20rem width.
- One Modal component (native <dialog>: Escape, focus trap) for page,
event, item and slot editors; destructive actions confirmed everywhere.
The page Delete confirm was ignored — returning false from onsubmit
doesn't cancel — so Cancel still deleted the page.
- Block editor follows the background-picker style throughout:
SegmentedControl rows (title-cased options, clearer selected state) and
a new ColorField row with reset; image position is Left/Right like the
alignment controls.
- Globals keep their layout; readable field labels, save feedback without
reload, hints wrap.
- Pages list: fixed broken Preview link (VITE_PUBLIC_SITE_URL was
undefined → "undefined/slug"), shown for published pages only; action
column no longer breaks row alignment; empty states on all tables.
- Items: image picker instead of a raw media-id field, upload errors shown
(were swallowed), prices in the shop currency instead of hard-coded EUR.
- Slots/orders/calendar: times shown in the site timezone with a fixed
locale (server and browser render the same text).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
- Saving no longer reloads the page: a validation error (empty title,
duplicate slug) used to re-render from the server and silently discard
every unsaved block edit. Shows saving/saved/error feedback like the
email editor, an "Unsaved changes" badge, and warns before leaving.
- Status shown in the header; on a published page "Save draft" was
misleading (changes go live immediately), so it now says so and the
button reads "Save". Publish is a named submit (no DOM mutation).
- Block list: selected block is visible again (Tailwind v4's default
border colour is currentColor, so every item had a heavy black border);
drag & drop works in Firefox (needs dataTransfer data) with a drop
indicator; Alt+↑/↓ keyboard reorder; hold-to-delete works from the
keyboard, is cancelled on pointercancel/unmount, and no longer selects
the wrong neighbour afterwards.
- Shared warnOnUnsavedChanges helper; the email editor uses it too
(confirm() is ignored on tab close — cancel() triggers the browser prompt).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
- An image URL used more than once in the same string (e.g. rich text) was
only replaced once, leaving broken __IMG__ placeholders after import.
- Images that failed to export were still replaced by placeholders that the
import could never resolve; keep the original URL instead.
- Validate the uploaded file's shape and JSON (was a 500 on bad input).
- Build lookup filters with pb.filter so names/slugs with quotes don't
create duplicates.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
- Slot and timed-event times were parsed in the server's zone (UTC in the
container) while the form sent the admin's local wall-clock time, so every
save shifted them by the UTC offset (10:00 → 12:00 in Oslo, again on each
save). Inputs are now interpreted in SITE_TIMEZONE (shared helpers with
DST handling), the same setting the booking emails use.
- PocketBase failures in actions (duplicate, validation, relation in use,
DB down) now return a readable `fail()` instead of a 500 page.
- Pages: 404 for unknown slugs, slug filters built with pb.filter (quotes
broke them), duplicate-slug check on create/rename (no unique index),
invalid block JSON rejected instead of throwing; save returns a result so
the editor can stay on the page.
- Globals: only create a missing record on 404 — any other error (DB
hiccup) used to create duplicates; save reports success/failure.
- Slots: status is never taken from the form; re-read before update so a
slot booked or held since the page loaded isn't overwritten; don't delete
actively held slots.
- Orders: load all order lines in one request instead of one per order.
- Layout exposes site timezone and shop currency for display.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
- /login and /preview no longer render the admin navbar (the login page
showed Pages/Export/Logout to signed-out users; the page preview iframe
showed the whole admin shell above the draft).
- Site colours from Globals were written onto --color-primary/--color-accent
of the admin document, which are DaisyUI's theme variables — so the brand
colour restyled every admin button (low-contrast white-on-sage) and flashed
after hydration. Apply them only inside /preview; give the admin its own
sage primary at ~5:1 contrast.
- Login page redesigned with DaisyUI 5 markup (full-width inputs, labels
above), autocomplete hints, pending state.
- Navbar: active-route highlight, consistent button sizes, wraps instead of
overflowing on narrow screens.
- Import: confirm before overwriting, show per-item errors instead of
auto-reloading them away, friendly message for invalid JSON.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
- Auth cookie was always exported with the SDK default `Secure` flag, so
browsers dropped it over plain HTTP (CADDY_SCHEME=http) and login
looped back to /login. Set `secure` from the real request scheme.
- Logout never ran: the hook redirected every authenticated request to
/login (including POST /login?/logout) back to /pages. Only redirect GET.
- Refresh the token per request so revoked tokens log the user out instead
of surfacing as 500s, and sessions slide instead of expiring mid-edit.
- Use `_superusers` instead of the deprecated `pb.admins` alias; keep the
entered email on a failed login.
- docker-compose: fully-qualified image names (podman rejects short names).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv