Brad Paws Client Portal
A full-stack React 19 + Hono portal on Cloudflare Workers, running a live SF pet-care operation.
Brad Paws is a pet-care business in SF, and this portal is its system of record. Dozens of clients and their pets run through it, with bookings and invoices processed every month. The credential isn't the business, it's the software: I treated a small operation as a place to build production patterns properly. I integrated the operator's existing tools instead of replacing them — Notion stayed the workspace, Google Calendar the scheduling source of truth, and the portal took over everything customer-facing. It's a TypeScript monorepo (client portal, API Worker, sync Worker, shared package) on Cloudflare Workers with D1, KV, R2, and Workflows, no origin server. The hard part was making external APIs feel local. I cache OAuth tokens in KV so 98% of Calendar operations never touch Google's auth endpoint.
- Architected a TypeScript monorepo (React Router 7 client portal, Hono API Worker, scheduled sync Worker, shared domain package) on a 19-table D1 schema, running on Cloudflare Workers, D1, KV, R2, and Workflows with no origin server
- Chose this stack around one constraint, that the operator never manages infrastructure: zero monthly cost, no cold starts, nothing to scale, with a documented path to Durable Objects if write concurrency ever demands it
- UUID primary keys for distributed ID generation, E.164 phone normalization, and
ExternalId-based cross-source deduplication throughout
- Integrated Google Calendar v3 via service account with KV-backed token caching (55-min TTL), reducing live OAuth calls by ~98% under normal load
- Implemented multipart/mixed HTTP batching for Calendar writes: raw boundary construction (no library support in Workers), 50 PATCH requests per HTTP call, response parsing, and 429/500/503 retry with exponential backoff, staying within Cloudflare subrequest limits and Google rate constraints during migrations
- Re-architected a fragile calendar backfill that was tripping Cloudflare's subrequest cap into a Cloudflare Workflows fan-out / fan-in: one durable instance per date window, an idempotent count-based fan-in, and exactly-once finalization. Backfills now retry per window and recover from a crash without skipping or double-writing data
- Built observability for unattended automation: structured JSON logging, workflow run tables, heartbeat rows, cron failure emails, and a watchdog that catches silent never-ran failures
- Built conflict-aware booking across boarding, house-sit, and walk/check-in with a server-enforced cancellation policy and fee tiers, plus automatic Google Calendar rollback on DB failure
- Designed a multi-source payment pipeline (Notion REST, Venmo CSV from R2, Gmail) normalized into idempotent events with per-source cursor commits, and automated past-due detection (grace periods, ambiguous-owner handling) that emails the operator weekly
- Automated monthly invoicing:
pdf-libsynthesis → R2 storage → emailed delivery, with authenticated batch ZIP download (fflate, ~5MB peak memory) behind ownership-verified Hono endpoints
- Wrote 1,500+ tests (server coverage near 100%) with Playwright end-to-end suites, covering auth, booking, cancellation, calendar parsing, AI tools, and every dashboard component
- Gated by a CI pipeline that runs type generation, typecheck, ESLint, Prettier, and tests on every push, with Cloudflare auto-deploy on merge to
mainand production source maps