Component architecture
- Reorganise src/lib/components into pages/, sections/, ui/ subdirectories and
update all imports across routes and tests.
Owner admin dashboard (+2k lines)
- Scheduled welcome-pack emails: durable queue with cancel/reschedule and a
background sender loop (SCHEDULED_CHECK_INTERVAL_SECONDS, default 60s).
- Custom welcome-pack subject line, preview recipients, and client BCC.
- Add-client, edit client profile, and reset-onboarding flows.
- "View as client" onboarding preview (owner impersonation, dry-run submit).
- Tabbed owner welcome route (/owner/welcome/[[tab]]).
MYOB integration
- New mail_api/myob.py: create new clients as MYOB AccountRight customer
contacts. Disabled until all MYOB_* env vars are set (no-op otherwise).
Onboarding
- New "Does your dog resource guard?" Yes/No question in the Behaviour step.
- Persist vetAddress, flea/tick, and pet-insurance fields server-side.
Misc
- vite config, new hooks.ts, responsive CSS tweaks, deploy/docker config,
mail-api README and start-dev.ps1.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replaces the earlier auto-fallback-on-upstream-error approach with an
explicit flag-file toggle controlled by the deploy script. The flag
is touched before stopping the app and removed on successful finish
(or via trap if the deploy aborts), so a failed deploy doesn't strand
the site in maintenance.
- nginx/goodwalk.co.nz.svelte.conf.example: error_page 503 routes to
/maintenance.html (internal); /m/ serves static maintenance assets;
the / and /api/submit blocks return 503 when /etc/nginx/conf.d/
maintenance.flag exists.
- nginx/maintenance.html: brand-styled "Be right back" page — full
Goodwalk green background, white card with yellow accent, real
Goodwalk logo, contact details fallback, auto-reload after 60s.
- nginx/logo.png: maintenance-time logo (served from /m/logo.png).
- nginx/nginx.conf: reverted the earlier auto-fallback edits; this
file is not deployed (the prod conf is goodwalk.co.nz.svelte.conf
.example).
- scripts/deploy-remote.sh: copies maintenance.html + logo into the
nginx container, reloads nginx so the new conf is live, touches
the flag, then runs the rebuild, then clears the flag. Adds a
trap-based clear_maintenance_flag fallback. Also adds a defensive
env-file merger that appends new keys from deploy.env.template
without clobbering live values, with a timestamped .env backup.
Plus a small a11y polish unrelated to maintenance:
- ServicesSection: "Learn more" links now include screen-reader-only
"about <Service>" context.
- base.css: adds .visually-hidden utility class.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
When the SvelteKit upstream is unreachable (container restart, deploy)
nginx now serves a static, brand-styled "Be right back" page instead
of the default 502/503. Auto-reloads after 60s so visitors don't sit
on it once the app is back.
- nginx/maintenance.html: self-contained, no external assets, inline
paw SVG, brand colours, contact details fallback
- nginx/nginx.conf: proxy_intercept_errors + error_page 502/503/504
on both location blocks; 2s proxy_connect_timeout so nginx fails
over fast instead of holding the connection for 60s
Deploy note: the html file needs to live at /var/www/html/maintenance.html
inside the nginx container (already mounted from /docker/wordpress/goodwalk.co.nz/html).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>