- API base is now
https://api.thehumanpatternlab.com. - Removed
/apipath prefix from canonical routes.- Example:
/lab-notes(new) instead of/api/lab-notes(old).
- Example:
- Main site legacy
/api/*routes are deprecated and redirect to the API subdomain.
- Refactored persistence to the Ledger model.
- Ledger becomes the canonical source of truth for note storage and mutation history.
- Improves auditability and enables future CLI automation workflows.
- Lab Notes endpoints continue to support list + detail retrieval while backed by the Ledger model.
- Response shape remains compatible with existing UI normalization (fields unchanged unless noted).
- Production routing standardized: website on
thehumanpatternlab.com, API onapi.thehumanpatternlab.com. - Reduced ambiguity between static site routes and API routes.
- Remove duplicate res.json call in /lab-notes handler
- Ensure handler returns after sending response
- Eliminate "Cannot set headers after they are sent" errors
- Stabilize test output and runtime behavior
- Idempotent database migration for
lab_notes - Lightweight schema version tracking via
schema_meta - Startup logging for applied schema changes
- Centralized DB migration logic into a dedicated module
- Made database bootstrap resilient to existing / older schemas
- No API behavior changes
- Safe to deploy over existing databases