MENTAL HEALTH EVENTS NETWORK
Sole architect and developer·Built end-to-end·mentalhealtheventsnetwork.com
Problem
Behavioral health professionals had no centralized way to discover continuing-education events, coordinate speaking opportunities, or verify compliance across 51 U.S. licensure jurisdictions. Event data was fragmented across provider sites, email lists, and informal networks with no single source of truth. No unified coordination layer existed that could ingest from multiple sources, deduplicate across jurisdictions, and surface verified opportunities with compliance context.
Architecture Decisions
Dual-client authorization model — user-context access and administrative access run through separate database clients — the first constrained by row-level security policies, the second able to bypass them for operational reads. Conflating the two is the common failure: it means privacy rules get relaxed to accommodate operational queries, and the security invariant erodes over time. Separating them keeps member-facing access provably constrained regardless of what administrative functions require.
Schema-first migrations with ledger verification — every schema change is versioned, applied in sequence, and records itself in a migrations ledger validated by an automated check. Database state cannot silently drift from what the application code expects. This is governance applied to engineering — the same principle as documented process standards, enforced by tooling rather than discipline.
Centralized extraction engine — one AI-powered parsing module serves all four intake channels rather than duplicating logic per channel, with documented invariants and per-operation cost tracking. Event schema is complex; duplicated extraction creates consistency debt and makes model or prompt changes untenable. Centralizing it keeps output quality and AI spend both predictable and measurable.
Access & Data Model
- Authentication and row-level security policies enforced at the database layer; user actions filtered by policy, administrative operations explicitly scoped
- Security-definer functions for authorization checks requiring authenticated user context
- Speaker records classified as PII and restricted to platform-administrator policies
- Jurisdiction mapping across 51 U.S. licensure regions with compliance state tracking
- Atomic ownership transfers; scoped storage buckets; AI spend ledger tracking model usage and cost by operation
Scale & Structure
- 51 U.S. licensure jurisdictions · 27 clinical specialties · verified organizations
- Four live intake channels: automated ingestion, organization self-serve import, web submission, speaker interest
- Event corpus past 1,000 records, with pagination architecture built for growth beyond API row limits
Stack
Next.js · TypeScript · PostgreSQL · Supabase (Auth, row-level security, migrations) · Vercel · Claude API with structured output