| Item | Value |
|---|---|
| Live Site | castlecheckers.sonandigital.com |
| API Endpoint | castlecheckers-api.sonandigital.com |
| Repository | sonantechai/caretaker-portal |
| Database | caretaker_db |
| Stack | React 18 + TypeScript + Cloudflare Worker + D1 |
| Status | Live — July 2026 |
| Commit HEAD | b2767bf (push pending) |
What It Does
Public site — Clients visit the site, read about services, and submit service requests through a multi-step wizard. The wizard collects contact info, preferred contact method, service types (airport transport, home watch, property check, call back, other), and relevant details (flight info, dates, care tasks). An Employee button in the nav bar lets staff access the employee portal.
Admin portal — The business owner logs in via the Admin button in the nav to manage requests, clients, appointments, invoices, and settings. Styled in navy and gold (#1a3050). Flight numbers are clickable badges linking to FlightAware. Non-paid invoices can be deleted. On mobile, client details open as a full-screen overlay. The enhanced calendar supports add, edit, and delete directly from the calendar view.
Employee portal — Employees log in with their phone number and PIN. After login they see today's and upcoming appointments assigned to them.
Recent Changes (July 2026)
| Change | What It Does |
|---|---|
| Navy + Gold theme | Complete color overhaul — primary #1a3050 navy, gold accent #f59e0b. All hardcoded green #2d6a4f references replaced in CSS, AdminApp, and EmployeeApp. DB settings table primary_color key must also be updated (see Current Dev). |
| Employee login portal | "Employee" button added to public site nav. Clicking it renders EmployeeApp, which shows the EmployeeLogin screen (phone + PIN). On success, employees see their appointment schedule. |
| Secure notes | getSecureNotes / saveSecureNotes fully wired into api.ts and AppContext.tsx — available for client detail views. |
| Invoice delete | Delete button on Draft/Sent invoices. Worker rejects deletion of Paid invoices with 403. |
| Mobile client modal | On mobile, tapping a client opens their detail as a full-screen overlay with a ← Back button instead of appending below the list. |
| Contact strip layout | Phone and email in the client contact strip now stack vertically so long email addresses are fully visible. |
| Service Request edit styling | The inline edit panel (Contact Info, Services, Notes) now has proper card layout, labelled fields, and grid rows. |
| Appointment auto-switch | Clicking Edit on a different appointment while one is already open automatically switches — no manual Cancel required. |
| Migrations 0003–0006 | Added flight fields on appointments, phone index, call-back service type, and blocked_days table. |
| Blocked days | Worker + API supports creating and deleting blocked days (dates the admin is unavailable). |
Documentation Pages
| Page | What You'll Find |
|---|---|
| Admin Guide | Day-to-day portal usage, service request workflow, IATA codes |
| Credentials | Live URLs, login info, Worker secrets, D1 database ID |
| Dev Reference | Architecture, DB schema, file structure, API routes, deployment pattern |
| AI Handoff | Rules for AI session continuation, FUSE-safe commit pattern, gotchas |
| Deployment | Step-by-step deployment commands for Worker, D1, and Pages |