Skip to content
back to blog

2 min

Building SoberMark: twenty public datasets, one record per provider

Live: SoberMark

Case study: SoberMark

Built and run solo under my LLC, Culmination Digital. Source is private.

SoberMark is a public directory of addiction-treatment providers. You search by location, level of care, insurance, language, telehealth, and more, and you get providers near you with the facts that matter. Today it covers 10,900+ providers across all 50 states, in English and Spanish.

What I wanted to learn

I wanted to go deep on the data layer, and I wanted to do it in production rather than in a tutorial:

  • Database depth. Schema design, migrations, row-level security, materialized views, and Postgres extensions doing real work.
  • Search. Geospatial radius search, full-text ranking, and what to do when someone misspells a city.
  • Data cleaning. Public data is messy, duplicated, and stale in ways a hand-curated list never is.
  • Combining data. The same facility shows up in several datasets with a different name, phone number, and address format in each.
  • Data management. Keeping all of it correct over time, on a schedule, with one engineer.
  • AI-assisted, spec-driven development in production. Writing the spec and the conventions first, then building with a coding agent inside them.

How it's built

Next.js 16 on Vercel, TypeScript strict, and Postgres, in a pnpm monorepo with a separate data pipeline beside the web app. GitHub Actions runs CI, the scheduled data refresh, and secret scanning.

The data comes from twenty public sources: SAMHSA, NPPES, federal exclusion and debarment lists, CMS, and several state licensing boards. The same facility often shows up in several of them with a different name, phone number, or address, so the pipeline combines them into one record per provider and keeps track of where each record came from. On a schedule it refreshes the directory, and it is set up to stop rather than publish if a run comes back badly short.

Spec-driven, with an AI pair

Every rule a coding agent needs lives in the repo before the code does: agent guides for branches and migrations, conventions, runbooks, a database reference, and a decision log with dozens of recorded trade-offs. I write the spec, the agent builds inside it, and the tests and the migration checks decide whether the work is done. The same discipline shows up in the product itself. Claude helps with a few back-office tasks, and the ownership-claim assistant is built so it can never approve or reject a claim on its own.

What I took away

The search box is the visible part. The real product is the set of decisions about which source to believe and when not to publish, and writing those decisions down first is what let a coding agent build them on a product this size.

Written by Kevin Murphy, senior full-stack software engineer in Tempe, Arizona.