Sunday, May 3, 2026
Day 31 — ReinLogic ships, calendar UX overhaul, 92% test coverage
The biggest single day of the project. The Suite tier becomes real with ReinLogic going live. The show calendar gets a slide-out RSVP panel and email blasts. Test coverage goes from 35% to 92% in one push.
3 min read
Daily entry
Day 31of building EquinePilot
Currently Day 77 · founder build log
Milestones reached
- ✓ReinLogic v1 live (Suite)
- ✓92% test coverage
- ✓Show calendar UX
- ✓URL hygiene
- ✓Show announcement email blast
A wild day. Three big pushes landed, any one of which would have been a respectable week's work, plus a long-overdue piece of cleanup.
ReinLogic v1 went live. This is the second product in the suite — AI-powered reporting and business analysis for barn owners, audience being investors, accountants, bankers, co-owners. The architecture is non-negotiable: the AI never generates numbers, only commentary on deterministic SQL results. Every insight has a "show your work" affordance. Cached, not real-time. Single-barn at v1.
I shipped a bounded-question system — 12 named, versioned questions across six categories (performance, anomaly, forward-looking, comparative, composition, investor-framing). Each one is its own SQL query plus an optional Claude-written prose layer. The dashboard renders five cards (revenue summary, year-over-year, revenue by category, at-risk clients, expense anomalies) plus a Net Profit hero, plus charts (12-month revenue trend, category donuts). PDF export with show-your-work appendix. Pricing what-if and business valuation as decision-support tools. AI expense ingestion via Claude Opus 4.7 — managers upload a PDF, photo, or spreadsheet of expenses and Claude extracts structured rows for review.
It now lives at /manager/analytics/* inside StableSync (originally a separate app, collapsed into one for operational simplicity), gated to the Suite tier, with an upgrade landing page for Core barns showing the same charts on mock data. The marketing site's Suite product flipped from "Coming soon" to Live, and the Suite pricing tier ($79/mo) became a real Subscribe button instead of disabled.
EquinePilot now has two live products. Core ($39) gets StableSync. Suite ($79) gets StableSync + ReinLogic. The pricing finally lines up with what actually exists.
Test coverage blitz. The codebase was at 35.76% statement coverage going into today. By the end I'd written 648 tests across 59 files and pushed it to 92.13%. CI thresholds are now locked at 92% statements / 91% functions / 85% branches / 95% lines. Three waves:
- Wave 1: Stripe singleton, webhook handlers, tenant resolver, Auth.js callbacks, middleware, role guards, rate limiter, all mobile API routes. → 47.81%
- Wave 2: Inngest background functions, the cron route, billing checkout, invoice pay flow, QBO token refresh, R2 upload, admin password reset, barn provisioning. → 85.3%
- Wave 3: Horse media/document API routes, invoice PDF, email preview, server actions for waivers, signature submission. → 92.13%
I went into today knowing test coverage was the kind of thing I'd let slip in week three and would regret. Today was the day I caught up.
Show calendar UX. Two pieces — a manager monthly grid view (?view=month), and a slide-out event detail panel on click. The slide-out is the part I'm most happy with: clicking an event chip from the month view opens a right-side panel with ?event=<id> in the URL (so the link is shareable, browser back/forward works, ESC closes, body scroll-locks). Manager panel shows event details + Edit + live RSVP count; client panel shows the full inline RSVP form (status, horse selection, class picker, notes) — the same shared ClassPicker as /client/shows. Mobile falls back to navigating to the existing pages so the panel never traps a small viewport.
Plus an email blast system: sendShowAnnouncementEmail() and blastShowAnnouncement() in lib/show-announcements.ts. The dispatcher fetches all active clients for the barn, deduplicates guardian email addresses, respects per-user notification_preferences.emailEnabled, and sends best-effort per-recipient (one failure doesn't abort the batch). Wired into the create-event server action with an opt-out checkbox (auto-checked for shows) and the edit-event action with an opt-in checkbox.
One-tap "Mark paid" on invoices. Most barns launching imminently will collect payment outside Stripe and mark invoices paid manually. The previous flow required opening a dialog and filling in amount + payment method on every invoice. Added a one-tap "Mark paid" button that marks an invoice paid in full with no payment method recorded. The existing dialog is still there for partial payments. Extracted the server action (markCycleFullyPaid) into lib/billing.ts so it's directly testable; covered.
URL hygiene. Embarrassing leftover from when tenancy moved off subdomains: large parts of the codebase were still building <slug>.equinepilot.app URLs for welcome emails, show-announcement emails, Stripe checkout success/cancel, admin provisioning responses, and the QBO redirect URI docstring. Added getAppUrl() to lib/utils.ts as a single source of truth (NEXT_PUBLIC_APP_URL env override → https://equinepilot.app fallback) and threaded it through every affected file. Post-signup card and the admin ProvisionBarnButton now show the slug as a "barn code" identifier rather than a subdomain hostname.
Day 31. The product is feature-complete, tested to 92%, has two live products in the suite, and the URLs are honest. Tomorrow is for finding the first barn.