modules, the patterns I reuse across builds
Pick a module.
Three of them you can press.
The patterns I reuse across builds, running in production at Broomstick Hub, Beeline Medical, and the platform Gravixar runs itself on. Each engagement adds to the library, so the next build is faster because these already exist.
Three have a sandbox on this site. The rest open their write-up, because a pattern that runs in a client system is not the same thing as one you can safely poke at here.
3 interactive · 13 in the library · no signup
operations
Review State Machine
interactiveDrag a deliverable through DRAFT → INTERNAL_APPROVED → SUBMITTED_FOR_CLIENT → CLIENT_APPROVED with revision branch back into the loop. Every transition writes an audit row.
Broomstick Hub
tryDaily Check-in (Office / WFH / Field)
interactivePick OFFICE / WFH / FIELD on first portal pageview each calendar day. Manager+ team view auto-updates. Unique constraint enforces one status per day per user.
Broomstick Hub · Beeline Medical
tryCredentials tracker with AI reminders
in productionNPI / state license / DEA / board cert / CAQH / UK GMC / other, with 90/60/30/7-day expiry windows. AI-generated reminder copy via the HIPAA-aware wrapper.
Beeline Medical
readLeave management with atomic balances
in productionAnnual / sick / unpaid / parental / bereavement leave with pro-rated entitlements for new joiners. Balance updates run inside a Prisma transaction so balances can't desync.
Broomstick Hub · Beeline Medical
readShared core package
in productionThe reused parts are a private, versioned npm package, not a folder someone copies. One source for the shared modules, auth and 2FA the flagship among them, propagated by a dependency bump rather than a copy.
Broomstick Hub · Gravixar HQ · gravixar.com
readaudit & compliance
Audit Log + Safe-Restore
interactiveTwo-tier retention (CONTRACT 7y / OPERATIONAL 1y). Allowlist-gated one-click restore on UPDATE rows. Edit something here, see the audit row appear, click restore, watch the original come back.
Broomstick Hub · Beeline Medical
tryDaily security-watch cron
in productionSweeps the audit log nightly for anomalies (mass-signup spikes, DELETE bursts, stuck inquiries) and emails admins when something trips. Quiet when nothing is wrong.
Broomstick Hub
readai & guardrails
AI Intake Wizard
in productionAdaptive client intake. Visitor types one or two sentences about their business, the wizard fetches their site, drafts a brand brief the PM walks into the discovery call already holding.
Broomstick Hub
readHIPAA-aware AI Guardrail
in productionTwo independent defenses on every Claude call: a PHI sniffer regex pre-persistence, and a wrapper that prepends a stop-clause to every system prompt.
Beeline Medical
readauth & permissions
Identity & Auth
in productionNextAuth v5 JWT with the security defaults that should be standard but usually aren't: lockout, breach-list password check, anti-enumeration, invite-only signup.
Broomstick Hub · Beeline Medical
readRole hierarchy + permission guards
in productionSTAFF < TEAM_LEAD < MANAGER < ADMIN role ladder plus an isSuperAdmin tier. Guards make permission errors loud and uniform.
Broomstick Hub · Beeline Medical
readfinance
Multi-currency finance core
in productionEvery monetary row stores native amount + native currency + an FxRateSnapshot foreign key. Reports compute against the snapshot, never live FX.
Beeline Medical
readFBR + EOBI tax engine
in productionProperty-tested salary engine for Pakistan's FBR slabs and EOBI rates. Forward Gross→Net + bisection Net→Gross solver. 17/17 vitest property tests green.
Beeline Medical
read