201 Commits

Author SHA1 Message Date
e2d9ae7541 nginx: redirects for legal pages, gzip, security headers
- 301 redirects /privacy|terms|refund → /shop/* (pages live in estore)
- gzip compression for HTML/CSS/JS/JSON/SVG
- X-Frame-Options, X-Content-Type-Options, Referrer-Policy headers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 13:44:56 -04:00
f4b1f7722e Fix data dir permissions and legal doc links
- Dockerfile: create /app/data owned by nextjs before USER switch so fresh
  deployments work without manual chown. Existing servers need:
    sudo chown -R 1001:1001 estore/data
- nav.js: fix footer legal links to point to /shop/privacy|terms|refund
  (pages live in estore, not main site)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 13:28:20 -04:00
215a8f2e3f Add Plausible Analytics to color page and estore
Both were missing tracking. All pages now report to beachpartyballoons.com
in Plausible.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 21:25:06 -04:00
50680a323f Major overhaul: shared nav, admin improvements, email enhancements, routing fixes
Navigation & layout
- Replace per-page hardcoded nav/footer with shared nav.js (client-side injection)
- Add nginx reverse proxy back to docker-compose for clean localhost routing
- Rename /color-picker/ to /color/ across nav, directory, and references

eStore admin
- Add variation hiding controls (mirrors existing modifier hiding)
- Add delivery rate editor (base fee + per-mile per tier, persisted to data/)
- Fix all missing BASE prefix on fetch calls (admin PATCH/DELETE, availability, slots, colors)
- Mount estore/data/ as a Docker volume so admin config survives rebuilds

Booking & calendar
- Set pickup calendar events to TRANSPARENT (free) so they don't block delivery slots
- Skip CANCELLED events in busy-time calculation
- Re-check slot availability at checkout before charging (409 on conflict)

Phone & email validation
- Auto-format phone as (XXX) XXX-XXXX as user types
- Require exactly 10 digits; tighten email regex

Confirmation emails (store alert + customer)
- Full item detail per line: name, price, add-ons, colors, note
- Charges breakdown: subtotal, delivery fee, tax, total
- Delivery window: simplified M/D/YY h:mm – h:mm AM/PM format
- .ics calendar attachment on customer confirmation

Delivery rates
- Extract configurable rates to delivery-rates.ts (server-only, no fs in client bundle)
- calcDelivery() accepts optional rates param; delivery-quote route passes configured rates

Content
- Change all "40+ latex colors" references to "70+"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 21:14:06 -04:00
9f9f326af9 Add root docker-compose and osrm data directory 2026-04-13 19:27:07 -04:00
668ee46ba6 Add root .gitignore 2026-04-13 19:22:46 -04:00
c984c14085 Remove terms page — now lives in estore footer 2026-04-13 19:22:36 -04:00
f58ae2c5f7 Add 'main-site/color-picker/' from commit '248d73a619ea4fbdca711a516f464cd0a505bfae'
git-subtree-dir: main-site/color-picker
git-subtree-mainline: 21ebb9667b34023f8d563bf8fa2abf7f838f51d7
git-subtree-split: 248d73a619ea4fbdca711a516f464cd0a505bfae
2026-04-13 19:22:30 -04:00
21ebb9667b Add 'estore/' from commit 'e34dfc397c94025670baa2b73b482c01f3033a6a'
git-subtree-dir: estore
git-subtree-mainline: 746868d720b9be1003a2f783b7a12d526d8eea60
git-subtree-split: e34dfc397c94025670baa2b73b482c01f3033a6a
2026-04-13 19:22:23 -04:00
746868d720 Add 'main-site/' from commit '5cefb4d1618bc54ae0e86830421a8c911900302c'
git-subtree-dir: main-site
git-subtree-mainline: 4d1daa39101c0a85ca6d916f1c31139faf39632a
git-subtree-split: 5cefb4d1618bc54ae0e86830421a8c911900302c
2026-04-13 19:22:17 -04:00
4d1daa3910 Initial monorepo root 2026-04-13 19:21:56 -04:00
e34dfc397c Allow COOKIE_SECURE=false to disable Secure flag behind HTTP proxy
NODE_ENV=production sets Secure:true but the container may sit behind
an HTTP-only reverse proxy, causing browsers to reject the cookie.
COOKIE_SECURE=false in .env overrides the flag without changing NODE_ENV.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 18:51:45 -04:00
c8fc15be86 Remove OSRM healthcheck — image has no curl/wget/nc
The osrm-backend image is too minimal to run any health probe.
Drop the healthcheck entirely and use a plain depends_on so the
shop starts after OSRM, without blocking on a health condition
that can never pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 18:47:31 -04:00
2f7123af21 Fix OSRM healthcheck: use curl HTTP check and add start_period
/dev/tcp is bash-only and fails in the container's default sh.
Switch to a real HTTP check against the OSRM API root, and add a
30s start_period so Docker doesn't fail the check before the road
data finishes loading.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 18:42:55 -04:00
69b28be77c Untrack runtime data files from git
catalog-cache.json and item-overrides.json are written at runtime by the
admin panel — they should not be in version control.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 18:28:59 -04:00
cdaf79ac71 Security hardening, checkout reliability, onboarding tour, and UX fixes
Security:
- Replace raw password cookie with HMAC-derived session token + constant-time compare
- Add rate limiting (5 attempts / 15 min) to admin login
- Atomic JSON writes via file-utils to prevent corruption on crash
- Tighten CSP headers; add Square CDN to style-src and font-src
- WebP conversion + 20 MB limit on admin image uploads

Checkout reliability:
- Delayed capture flow: pre-auth → calendar write → capture (never charge without booking)
- Derive payment idempotency key from SHA-256(nonce) to prevent nonce/key mismatch on retry
- Idempotency key persisted in localStorage; auto-retry on network failure
- Idempotent CalDAV writes using orderId-based UIDs; treat 412 as success
- User-friendly Square error messages instead of raw API detail strings

UX:
- Welcome modal + 5-step guided tour with spotlight and scroll-into-view
- Balloon release agreement checkbox required before payment
- 24-hour lead time enforced server-side in both delivery and pickup slot generators
- Fix Square card form race condition with double-rAF before attach()
- Tour hides Bulma modal-background for bright, unobscured modal steps

Notifications:
- Improved SMTP error logging; re-throw on failure so callers see it

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 18:27:33 -04:00
3cb9eae975 Initial commit — Beach Party Balloons shop
Full Next.js storefront with Square catalog integration, balloon color picker,
delivery/pickup slot booking, CalDAV calendar sync, and admin panel.

Admin features: item overrides, category display order/visibility, hours editor,
holiday/occasion windows, quantity units, and modifier deselect.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 20:37:10 -04:00
248d73a619 Redesign color picker UI and improve palette modals 2026-02-22 15:51:44 -05:00
5cefb4d161 Fix Contact Us button markup 2025-12-27 11:37:07 -05:00
8b0793c42f Enhance FAQ and gallery UI 2025-12-27 11:30:38 -05:00
b585d851dd Add trusted logos and manual reviews 2025-12-27 10:29:38 -05:00
7c42800245 Prevent caching of store status updates 2025-12-26 12:58:46 -05:00
a3b8593133 Improve gallery sharing and admin tagging 2025-12-26 12:50:25 -05:00
3a679eb03c chore: match uploads by stripping timestamp prefixes 2025-12-08 16:02:51 -05:00
cf575afc3f chore: normalize brace suffix in reprocess base names 2025-12-08 15:59:34 -05:00
a94d938131 chore: allow reprocess to use raw source files 2025-12-08 15:56:12 -05:00
d230e88bd1 chore: log missing sources during reprocess 2025-12-08 15:52:39 -05:00
467fcbffb7 chore: ignore uploads and add reprocess script 2025-12-08 15:40:40 -05:00
5c391f3dee fix: load gallery/admin scripts from local folders 2025-12-08 14:17:25 -05:00
7e06f7f63a fix: serve bundle from /build path 2025-12-08 13:58:30 -05:00
35956d2849 fix: correct gallery asset paths and update fetch URL 2025-12-08 13:49:21 -05:00
7b3cfb5178 chore: ignore mongodb_data 2025-12-08 13:37:25 -05:00
9ca29e13de chore: update gallery tooling and docker setup 2025-12-08 13:26:36 -05:00
a58b0f7cdb update colors 2025-12-08 09:34:26 -05:00
c340cd2eaf Reorganize gallery, optimize builds, add backups 2025-11-25 16:22:29 -05:00
b2a3e5d605 fix: Add HEIC/HEIF support and resolve CORS issues
- Add libheif-dev to backend Dockerfile to support HEIC/HEIF image uploads via sharp.
- Update backend URL in frontend to use 'photobackend.beachpartyballoons.com'.
- Update CORS whitelist to include the new backend hostname.
- Stage user's change to docker-compose.yml exposing port 5001.
2025-11-24 19:05:14 -05:00
962201975b fix: Resolve CORS issue for photo uploads
- Forces frontend to use HTTP for backend requests to prevent mixed content errors.
- Tightens backend CORS policy to a whitelist of allowed origins.
2025-11-24 16:39:19 -05:00
5053cbcf44 refactor: Reorganize project structure and clean up repository
This commit reflects an intentional reorganization of the project.

- Deletes obsolete root-level files.
- Restructures the admin and gallery components.
- Tracks previously untracked application modules.
2025-11-24 15:15:35 -05:00
e4240d3f02 feat: Implement UI/UX and code efficiency improvements for gallery and admin pages
This commit includes the following changes:

Gallery Page (gallery.html):
- Moved inline CSS to gallery.css for better organization and caching.
- Implemented a skeleton loader to improve perceived loading performance.
- Added a 'No results' message when search/filter yields no photos.
- Enhanced responsive image handling in the modal to load full-resolution images.

Admin Page (admin/index.html):
- Moved inline CSS to admin.css for better organization and caching.
- Fixed an aesthetic issue with the hover style on the 'Clear selection' button.
- Introduced a confirmation modal for bulk delete operations to prevent accidental data loss.
- Implemented a progress bar for file uploads, providing better user feedback.
2025-11-24 15:14:00 -05:00
cdd8ccb0e5 feat: Add docker-compose for easier application management
This commit introduces a `docker-compose.yml` file to simplify the
process of building, running, and managing the application.

- Defines the `bpb-website` service with build context, port mapping,
  and environment variables.
- Mounts a volume for `update.json` to ensure data persistence across
  container restarts.
- Sets `restart: always` to ensure the service is automatically
  restarted if it goes down.
2025-11-13 12:14:34 -05:00
72e9de96e4 feat: Containerize application with Docker and improve admin error handling
This commit introduces Docker support for the application to ensure a consistent
and reproducible environment across different deployment targets.

- Added  for building a Docker image of the application.
- Added  to exclude unnecessary files from the Docker image.
- Improved error handling in  to provide more descriptive messages
  when the server returns an unexpected response, aiding in debugging.
- Included  changes, likely from local testing.
2025-11-13 11:31:58 -05:00
91885d5ff5 Fix: Use relative URL for API requests in admin UI
Changed the  request URL in  from an absolute path
() to a relative path
().

This ensures that the API request is always sent to the same domain
that the admin page is loaded from, resolving CORS and NetworkError
issues when accessing the UI from a production FQDN or a live server
with a different port. This change relies on a correctly configured
reverse proxy in the production environment.
2025-11-12 15:07:05 -05:00
b8c8a1a45f Fix: Admin UI communication and security issues resolved 2025-11-12 14:52:35 -05:00
74aa30636c Refactor: Harden for Production
This commit refactors the Node.js server to be production-ready.

- **Strict Production Environment:** The server now checks for . If it is set, the server will refuse to start unless a secure  is provided as an environment variable. This prevents running with the insecure default password in production.
- **Logging:** Added basic logging for successful status updates and failed login attempts.
- **NPM Scripts:** Added a  script to  for starting the server in production mode ().
2025-11-12 14:26:11 -05:00
07b83c7ae8 Feature: Create Admin UI with Node.js Backend
This commit introduces a web-based admin UI to manage the store's status, backed by a simple Node.js/Express server for file writing.

Key features:
- **Admin UI (, ):** A form to update the scrolling message and closed status. It provides a user-friendly experience with loading states, in-page feedback, and change detection.
- **Node.js Backend ():** A simple Express server that serves the static site and provides a  endpoint. This endpoint receives data from the admin UI, authenticates it, and writes it to .
- **Enhanced Security:** The password is no longer hardcoded in the client-side JavaScript. Authentication is handled server-side, and the password is read from a  file for local development or an environment variable in production.
- **Project Setup (, ):** The project is now a formal Node.js project with dependencies (, , ) and a  file to exclude .
2025-11-12 14:19:34 -05:00
721bf65ed3 Feature: Implement store open/closed status with override
This commit introduces functionality to display the store's open/closed status based on a schedule, with an override mechanism for holidays or emergencies.

Changes include:
- : Added IDs to hours paragraphs for easier manipulation.
- : Refactored  to be more robust and moved its logic to  to prevent race conditions. Removed  for status updates from . Fixed lightbox navigation.
- : Added  (boolean) and  (string) fields to allow overriding the default status.
- : Consolidated all status logic. It now acts as a gatekeeper:
  - If  in  is , it displays  and ensures hours are visible.
  - If  is , it runs the scheduled open/closed logic (originally from ) and updates the status every minute, ensuring hours are always visible.
- : Reverted accidental changes and ensured only necessary status-related styles were added.

This ensures:
- The store's current open/closed status is always displayed.
- An override message can be shown for special closures.
- Store hours are always visible.
2025-11-12 13:57:52 -05:00
0505f0a641 add url for eshop 2025-10-15 14:22:43 -04:00
5c936b2b53 Merge branch 'main' of https://gitea.chrisedwards.tech/chris/bpb-website 2025-10-14 16:23:07 -04:00
29b1e92ea9 update color url 2025-10-14 16:23:04 -04:00
a0a184236c add url generator 2025-10-04 18:52:18 -04:00