Booking has been broken since launch: BookingForm POSTs /api/bookings → quinn-my-api /public/bookings, but that route was never wired into server.ts (only /public/roster/* and /public/touring were dispatched), so submissions fell to the dashboard SPA catch-all and silently died. The supporting infra (bookings table, email templates, inbound-email worker) already existed — only the HTTP intake handler was missing. - routes/booking-intake.ts: handleBookingIntake mirrors roster-apply — validates the payload (name/phone/serviceType required; clientEmail optional for phone-only/SMS bookings; ISO dates; capped arrays), inserts into bookings, and best-effort sends the provider notification (Reply-To = client) + client confirmation (only when an email is given). Email failures never fail a persisted booking. - schema-bookings.ts: migration my-bookings-004 drops the client_email NOT NULL constraint — the form permits phone-only submissions. - server.ts: register POST /public/bookings with the standard addCors wrapper. Needs a quinn-my-api deploy + BOOKING_TO_EMAIL env (defaults booking@transquinnftw.com). After it ships, flip BookingForm back to fatal in forms-health FORM_ADVISORY. Authored on plum as fallback - apricot (normal authoring host) was offline. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| .env.development | ||
| .env.local.example | ||
| eslint.config.js | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vitest.config.ts | ||
My Dashboard API
Node.js HTTP server for the Quinn personal dashboard. Port 3024.
Auth: SSO cookie (via quinn-sso-api) or service bearer token (QUINN_MY_SERVICE_TOKEN).
Dev proxy mode
When PROXY_TARGET is set, the server short-circuits every request (except /health) and proxies it upstream to the target, injecting Authorization: Bearer <QUINN_MY_SERVICE_TOKEN>. No local SQLite is touched. SSE streams (calendar sync etc.) pass through transparently — the response body is streamed, not buffered.
Copy .env.local.example to .env.local and fill in the token:
cp .env.local.example .env.local
# edit .env.local — get QUINN_MY_SERVICE_TOKEN from /etc/quinn-my-api/secrets.env on vps-0
The server logs a WARN line at boot when proxy mode is active, and prefixes each proxied request log with [PROXY→prod].
See docs/PROD_DB_UNIFICATION_PLAN.md for full architecture context.