Commit Graph
63 Commits
Author SHA1 Message Date
popertots 5a4cd29b44 feat(account): add editable phone and password change with validation
- Add editable phone field in /account General tab with UK phone
  validation
- Create PUT /api/user/change-password endpoint in backend
- Add zxcvbn password strength meter to change password modal
- Add "passwords don't match" validation message to both /account and
  /register
- Fix navbar logout reactivity with invalidateAll and $derived values
- Fix a11y warnings: add labels, roles, and keyboard handlers
- Remove unused CSS from account page
2026-02-20 20:17:38 +00:00
popertots 41dc839830 feat(booking): add service eligibility based on age and patch tests
- Add eligibility filtering to /api/services: exclude services below
  user's
  age, gray out services requiring patch tests that are missing/expired
- Add new endpoint /api/services/eligible-for/{user_id} for admin
  booking
  flows to check eligibility for a specific user
- Add image metadata stripping: uploads now strip all EXIF/GPS data
  via imaging library (security improvement)
- Update ServiceCard frontend: show grayed-out state for ineligible
  services with "contact us" link (public) or just warning (admin)
- Add 2 patch test services to seed data: Gel Polish Full Set,
  Luxury Gel Manicure (48h each)
- Remove deprecated local-dev.sh script
2026-02-20 18:46:38 +00:00
popertots eb1a719fc3 Exif stripping 2026-02-20 17:22:43 +00:00
popertots b4d91d5dc0 Security pass 2026-02-20 12:59:10 +00:00
popertots a5a2ffd83e Security: add rate limiting, input validation, and filter category
validation
Backend:
- Add rate limiting middleware (mw/ratelimit.go) - in-memory per-IP
  limiter
- Apply rate limits per endpoint group:
  - Public read-only: 120/min
  - Registration: 10/min
  - Portfolio filters: 60/min
  - Authenticated users: 120/min
  - Admin: none (trusted)
- Add 256 char input length validation on portfolio endpoints
- Validate filter categories exist in DB before querying
- Secure GetImage endpoint: only allow UUID or numeric timestamp (15-20
  digits)
- Remove pattern-based image lookup to prevent enumeration
- Add services validation: name (100), duration (1-480), patch test
  (0-168)
  Frontend:
- Add maxlength=256 to portfolio tag/search inputs
- Add maxlength to registration: name (50), email (255), phone (20),
  password (72)
- Add maxlength=100 to service name input
2026-02-20 12:03:14 +00:00
popertots f9eec94f2f Security: add rate limiting, input validation, and filter category
validation
Backend:
- Add rate limiting middleware (mw/ratelimit.go) - in-memory per-IP
  limiter
- Apply rate limits per endpoint group:
  - Public read-only: 120/min
  - Registration: 10/min
  - Portfolio filters: 60/min
  - Authenticated users: 120/min
  - Admin: none (trusted)
- Add 256 char input length validation on portfolio endpoints
- Validate filter categories exist in DB before querying
- Secure GetImage endpoint: only allow UUID or numeric timestamp (15-20
  digits)
- Remove pattern-based image lookup to prevent enumeration
- Add services validation: name (100), duration (1-480), patch test
  (0-168)
  Frontend:
- Add maxlength=256 to portfolio tag/search inputs
- Add maxlength to registration: name (50), email (255), phone (20),
  password (72)
- Add maxlength=100 to service name input
2026-02-20 12:03:05 +00:00
popertots 9259de9393 Portfolio: add filtering, URL sharing, and improved tag input
- Add category filters with dynamic counts that reduce as filters
  applied
- Add ?filter[category]=value URL params for filterable links
- Add ?img= timestamp param that bypasses filters to show specific image
- Update URL when opening/navigating/closing modal for shareable links
- Backend: add /api/portfolio/filters endpoint with filter logic
- Backend: add timestamp lookup fallback for GetImage endpoint
  Frontend:
- Portfolio page: filter dropdowns, keyboard nav, mobile improvements
- ImageUpload: live tag suggestions from API, arrow/Tab navigation,
  confirmation modal before upload, mobile-optimized touch targets
- Add scrollbar-hide utility and fix filter dropdown overflow
- Move Clear all button, add vertical separator on desktop
2026-02-20 00:32:09 +00:00
popertots dfd552b02f feat(storage): add S3/R2 abstraction with local Rustfs dev
- Add backend/internal/s3/ with build-tag pattern (dev vs prod)
- Dev: Uses local Rustfs container (S3-compatible)
- Prod: Stub for R2 Cloudflare (add AWS SDK to implement)
- Add S3 env vars to .env.example and .env
- Add Rustfs service to compose.yml
- Add Rustfs reset to local-dev-2.sh (wipes data on each run)
2026-02-17 22:47:38 +00:00
popertots d43d7ebc5e readme 2026-02-17 22:38:22 +00:00
popertots 1082631525 feat(auth): wire up refresh token endpoint and auto-refresh
- Add POST /api/refresh-token endpoint to router
- Auth store now calls refreshTokenIfNeeded on init and every hour
- Token refreshes automatically when within 2 weeks of expiry
2026-02-17 21:54:45 +00:00
popertots e20263b717 Update readme 2026-02-17 21:47:11 +00:00
popertots bbb273c192 feat(notifications): add admin notification acknowledgement on booking state changes
- Add AcknowledgePendingBookingNotification helper for acknowledging notifications
- ConfirmBookingHandler: acknowledge pending notification when booking confirmed
- Cancel handlers: acknowledge pending notification and only create cancelled_booking notification if booking was not in pending status
- Add user_notification_preferences table with email, sms, push enabled flags
- Update cancellation logic to check original status before creating notifications
2026-02-17 21:38:50 +00:00
popertots 105831eeb3 Update readme 2026-02-12 22:29:42 +00:00
popertots 50746595e7 feat(bookings): improve admin booking wizard and user dashboard
Backend:
- Enriched GetAllUserBookings response with calculated total_amount,
  amount_paid, and duration_minutes.
- Refactored GetBookingHandler to return a flat booking object matching
  frontend expectations.
- Added account_role to admin user list response and sorted users by
  booking activity.
- Corrected function name oo to AdminCreateBookingForUserHandler.

Frontend:
- Rebuilt BookingCreateModal into a 4-step wizard supporting guest
  bookings, service overrides, and real-time availability checks.
- Fixed account dashboard logic to correctly identify upcoming vs past
  bookings and sort unpaid items to the top.
- Extracted booking flow into a shared BookingFlow component.
- Redirected admin users from home page to /today.
2026-02-12 22:15:10 +00:00
popertots 2ace6d4d87 WIP call in booking 2026-01-24 22:08:36 +00:00
popertots 3a8ea4c98f added booking approvals 2026-01-19 22:32:35 +00:00
popertots 1dd37a8d22 Added booking approvals 2026-01-19 22:32:25 +00:00
popertots 73610e5d8e Fix booking search, shrink time picker 2026-01-17 19:59:03 +00:00
popertots 3a77e582e3 Split admin dashboard, implement user and booking search 2026-01-17 18:55:58 +00:00
popertots 1e8995f577 responsive 2026-01-06 16:55:26 +00:00
popertots 67d812a9be Fix booking count filters, add admin notifications, and improve bookings
UI
2026-01-06 16:45:36 +00:00
popertots f536a7fd04 Fix booking count filters, add admin notifications, and improve bookings
UI
2026-01-06 16:45:17 +00:00
popertots 08e4e12a73 portfolio frontend 2025-11-28 18:03:15 +00:00
popertots 7bc2129422 Portfolio frontend, various fixes 2025-11-28 18:03:06 +00:00
popertots c1548c503f My account 2025-11-09 01:49:28 +00:00
popertots e8f53f4282 linting and bugfixing 2025-11-09 01:49:21 +00:00
popertots e734ec8f37 Fix bugs 2025-11-06 22:59:33 +00:00
popertots 01780d90e5 Fix init script 2025-11-06 16:29:41 +00:00
popertots 28815d3b25 Update readme 2025-11-06 16:05:33 +00:00
popertots f1dc375c5f update obsidian 2025-11-03 23:47:58 +00:00
popertots 2b7ec96d37 obsidian 1 2025-11-03 23:25:04 +00:00
popertots 24257f56b7 Update gitignore, and include obsidian 2025-11-03 23:24:18 +00:00
popertots 715fea6f27 ragignore 2025-10-31 23:11:33 +00:00
popertots 5cedba21e7 Bookings 2025-10-23 22:35:10 +01:00
popertots 56ff4132b4 booking modal part 1 2025-10-22 23:29:38 +01:00
popertots 94404c7b3b Fix admin 2025-10-22 17:50:17 +01:00
popertots a141404f74 add routes 2025-10-21 00:34:33 +01:00
popertots dec2dfb7fe Fix overrides 2025-10-21 00:30:50 +01:00
popertots ea0d042793 booking init 2025-10-21 00:26:28 +01:00
popertots 989e45e55c add holiday test and tweak services 2025-10-21 00:26:21 +01:00
popertots ded1081a16 fix calendar again 2025-10-20 20:19:31 +01:00
popertots 17ebaeba94 Add exceptional hour modals 2025-10-19 21:17:28 +01:00
popertots 5efc893269 split exceptional from default hours 2025-10-19 18:40:54 +01:00
popertots 37fd41dce5 fix mobile toast, theming 2025-10-19 18:18:15 +01:00
popertots 9630afe00d Add, toggle, and delete services 2025-10-18 23:35:07 +01:00
popertots 0a90126f93 re-fix calendar 2025-10-18 22:04:22 +01:00
popertots 79eae16868 services on pricelist 2025-10-18 22:04:12 +01:00
popertots 68cf27541a Better skeleton use, live services in booking 2025-10-18 21:39:57 +01:00
popertots fad47df642 Better dev script 2025-10-18 16:10:16 +01:00
popertots 69b8c0cbe5 services WIP 2025-10-18 00:45:57 +01:00