Skip to main content

Complied

Complied is the compliance operating system for NYC lead-based paint work. Secure Environmental Group uses it to run inspections and Abated NYC uses it to run abatement. It tracks HPD lead-paint violations and their deadlines, schedules and captures field work (XRF, dust wipe, paint chip, abatement), generates the reports, affidavits and filing packages HPD expects, prices and bills the work, and gives each client a white-label portal onto their buildings.

Full documentation is published at https://docs.compliednyc.com from the docs/ folder.

Where to start​

If you are…Read
New to the productProduct overview, then Decisions and glossary
Running projects in the appThe operator guide
Working on the codeArchitecture overview, Local development, Conventions
Touching data or permissionsData model, Permissions and tenancy, Security
Working out an HPD ruleHPD system model and the resolution rulebook

Open work — bugs, gaps, and decisions still to make — is tracked in GitHub Issues, not in the docs.

Stack​

React + Vite + TypeScript + shadcn/ui (Tailwind v4) on Cloudflare Pages; Supabase (Postgres with row-level security, Deno edge functions, Storage, pg_cron); a pure-TypeScript domain package for compliance logic; a DuckDB query service for the map; headless-browser PDF rendering.

Quick start​

Requires Node 20+, Docker, and the Supabase CLI.

npm install
npm run dev # local Supabase check + migrations + Vite + edge functions
npm run build # production build
npm run test # vitest
npm run lint # eslint

Before your first run, read Local development — in particular, never run supabase db reset against the local instance: it holds the loaded citywide public data, not just test fixtures.

Repository layout​

PathWhat it is
src/The web app: staff shell and client-portal shell, pages, components, data/ (the only Supabase query layer), auth/
domain/@complied/domain — pure-TypeScript compliance logic (HPD programs, services, ingestion normalizers), no I/O
supabase/Migrations and edge functions (report/document generators, email and notifications)
map-service/The /map query service: DuckDB over a nightly Parquet snapshot, deployed separately
ingest/The ingestion ops CLI (backfill, delta, redrive, records, rollups) with an interactive menu, straight against Postgres
db-tests/Local-Postgres regression suite (cross-tenant isolation, ingestion)
scripts/Dev, guard, seed and maintenance tooling
docs/Documentation source; website/ publishes it with Docusaurus
archive/The previous application, kept read-only for reference — not built, linted or shipped

Coding agents: start with AGENTS.md.