Production-grade multi-tenant SaaS for turning county parcel and tax lien data into structured investment decisions.
This repository contains the baseline monorepo plus authenticated dataset upload, first-pass explainable scoring, scored-results review, watchlist, portfolio/status tracking, comparison, decision history, decision handoff, saved operational views, internal jobs, alerts, worker/scheduler groundwork, enrichment, import repair, reusable import profiles, notification preferences, email delivery, digest processing/delivery history, workspace access, activity, comments, assignment, approvals, my-work queues, follows, review checklists, workspace policies, decision briefs, final decision outcomes, and outcome review. Phase 34 adds a clean audited dependency graph and high-severity supply-chain gates.
Current packages:
apps/web: React, Vite, TypeScript, Tailwind review workspaceapps/api: Express, TypeScript, auth, dataset, scoring, internal jobs, alerts, notification delivery, workspace membership/activity, watchlist, portfolio, and comparison APIspackages/db: MongoDB connection plus user, dataset, scored-record, internal-job, alert, watchlist, portfolio, comparison, decision-history, and import-profile/saved-view/notification-preference/notification-delivery/ notification-digest-batch, workspace, workspace-membership, and workspace-activity, workspace-comment, workspace-assignment, approval-request, follow-subscription, review-checklist, workspace-policy, decision-outcome, and discussion-attention modelspackages/scoring: pure explainable scoring enginepackages/engine-contract: versioned evidence and engine-result contractspackages/jurisdiction-rules: source-cited deterministic jurisdiction rulespackages/types: shared API typesservices/intelligence: authenticated Python engine-service boundaryapps/api/src/mcp: authenticated, read-only ChatGPT evidence tools over MCP
Implemented API surfaces:
GET /healthzPOST /mcp(authenticated stateless MCP Streamable HTTP)POST /auth/registerPOST /auth/loginGET /auth/meGET /workspacesGET /workspaces/currentGET /workspaces/current/membersPOST /workspaces/current/membersPATCH /workspaces/current/members/:membershipIdDELETE /workspaces/current/members/:membershipIdGET /workspaces/current/activityGET /comments/:entityType/:entityIdPOST /comments/:entityType/:entityIdPATCH /comments/:entityType/:entityId/readDELETE /comments/:commentIdGET /assignments/mineGET /assignments/:entityType/:entityIdPATCH /assignments/:entityType/:entityIdDELETE /assignments/:entityType/:entityIdGET /approvalsPOST /approvalsGET /approvals/:approvalRequestIdPOST /approvals/:approvalRequestId/approvePOST /approvals/:approvalRequestId/rejectPOST /approvals/:approvalRequestId/cancelGET /my-workGET /followsGET /follows/:entityType/:entityIdPUT /follows/:entityType/:entityIdDELETE /follows/:entityType/:entityIdGET /review-checklists/templatesPUT /review-checklists/templates/:entityTypeGET /review-checklists/:entityType/:entityIdPATCH /review-checklists/:entityType/:entityId/items/:itemIdGET /workspace-policiesPUT /workspace-policiesGET /decision-briefs/comparison_item/:entityIdGET /decision-outcomes/comparison_item/:entityIdPUT /decision-outcomes/comparison_item/:entityIdGET /outcome-reviewPOST /datasetsGET /datasetsGET /datasets/:datasetIdGET /datasets/import-profilesGET /datasets/:datasetId/mappingPATCH /datasets/:datasetId/mappingPOST /datasets/:datasetId/import-profilePOST /datasets/:datasetId/import-profile/applyPOST /datasets/:datasetId/scorePOST /datasets/:datasetId/refreshGET /datasets/:datasetId/scoring-statusGET /datasets/:datasetId/scoresGET /jobs/:jobIdGET /alertsPATCH /alerts/:alertId/readPATCH /alerts/read-allGET /notification-preferencesPATCH /notification-preferencesGET /notification-deliveriesPOST /watchlistGET /watchlistDELETE /watchlist/:watchlistItemIdPOST /portfolioGET /portfolioGET /portfolio/summaryGET /portfolio/:portfolioItemIdPATCH /portfolio/:portfolioItemIdDELETE /portfolio/:portfolioItemIdPOST /comparisonGET /comparisonPATCH /comparison/:comparisonItemIdGET /comparison/:comparisonItemId/historyPOST /comparison/:comparisonItemId/handoff/watchlistPOST /comparison/:comparisonItemId/handoff/portfolioDELETE /comparison/:comparisonItemIdPOST /saved-viewsGET /saved-viewsGET /saved-views/:savedViewId/applyPATCH /saved-views/:savedViewIdDELETE /saved-views/:savedViewId
Email delivery is provider-configured and disabled by default. When SMTP and
sender env config are present, supported delivery-eligible product alerts can
send immediate email or be grouped into bounded scheduled digests. Users can
review delivery and digest outcomes at #/delivery-history; otherwise the API
records provider-disabled outbox state. SMS, push, campaigns, and marketing
messaging are future work.
Workspace access uses an explicit X-Workspace-Id selection boundary. Existing
users receive a personal owner workspace automatically. Datasets, scoring/jobs,
watchlist, portfolio, comparison, decision history, comments, assignments,
approvals, follows, review checklists, policies, decision briefs, final
outcomes, and outcome review operate inside verified workspace membership and
role boundaries. Alerts, notification settings/history, and saved views remain
personal. The workspace layer is a practical operating system for shared review,
not enterprise IAM, realtime collaboration, legal case management, or a
compliance-grade audit log.
Use Node.js ^20.19.0 || >=22.12.0.
-
Install dependencies:
npm install
-
Start MongoDB:
docker compose -f infra/docker/docker-compose.yml up -d
-
Start the API:
npm run dev:api
-
Start the frontend:
npm run dev:web
-
Start the internal intelligence service with a strong local token:
PYTHONPATH=services/intelligence/src \ INTELLIGENCE_SERVICE_TOKEN=replace-with-at-least-32-random-characters \ python3 -m tax_lien_intelligence.server
To enable API worker calls, use the same token and set
INTELLIGENCE_SERVICE_ENABLED=true. The service remains disabled by default and must be reachable only on a private application network. -
To include source links in MCP evidence, set the public frontend URL:
MCP_APP_BASE_URL=https://app.example.com
OAuth is disabled by default. For a ChatGPT staging deployment, configure the
MCP_OAUTH_*values documented in.env.example; OAuth-enabled/mcpaccepts only the scoped OAuth token. A public connection still requires the real stable HTTPS deployment and live ChatGPT validation.
npm run audit
npm run validate:chatgpt-release
npm run typecheck
npm run test
npm run build
npm run smoke:local
npm run smoke:browser
npm run smoke:intelligence-service
npm run smoke:intelligence:mongo
npm run smoke:oauth:mongonpm run test includes the dependency-free Python unit suite and all Vitest
tests. npm run build compiles every TypeScript workspace and byte-compiles the
Python service. npm run smoke:intelligence-service starts the real
authenticated Python process on loopback and verifies health, version,
contract parity, invalid evidence, and out-of-scope behavior over HTTP.
npm run smoke:intelligence:mongo builds the application, writes and reads a
contract-valid result through the real Mongo scored-record store, then proves a
later service failure removes the prior result. CI supplies a temporary real
MongoDB service and drops the bounded smoke database after the check.
npm run smoke:oauth:mongo proves atomic one-time code consumption, refresh
replay rejection and family revocation, and access-token denylisting through
the real Mongo store, then drops its bounded smoke database.
npm run smoke:local builds the workspace, starts the API app in-process,
serves the built web shell from apps/web/dist, verifies /healthz, verifies
the structured unknown-route response, and fetches the built HTML/CSS/JS assets
over local HTTP. It is a bounded local runtime smoke, not full browser
automation or deployed proof.
npm run smoke:browser mounts the real React app in a jsdom browser-like DOM,
checks the unauthenticated app shell, and bootstraps the authenticated operator
shell with mocked API responses. It also runs the follow-up lifecycle browser
smoke for due-state rendering plus update, complete, and snooze controls, and
renders completed, not-configured, and failed intelligence evidence states.
npm run smoke:follow-ups:browser runs only the focused follow-up lifecycle
browser-like smoke and writes local JSON evidence to
/tmp/tax-lien-follow-up-browser-smoke.json by default. These browser smoke
commands are local render/control proof, not screenshot capture,
browser-driver automation, MongoDB-backed end-to-end proof, Crabbox proof, or
deployed proof.