February 12, 20260.1.4Calmony Sanctions Monitor
v0.1.4 — feat: MVP database schema upgrade, constants, validators & services
Release v0.1.4: MVP Database Schema, Constants, Validators & Services
12 February 2026
This release lays the foundational layer for the Calmony Sanction Monitor MVP.
What changed
- Database schema: Expanded to 12 tables — new tables for
creditTransactions,screeningResults,screeningCertificates, andnotifications. Existing tables (users,people,matches,auditLog) gained fields for credit balances, entity types, screening counts, match reasons (JSONB), reviewer tracking, and IP/user-agent logging. 4 PostgreSQL enums defined. - Application constants (
constants.ts): Credit pricing tiers, confidence thresholds, 30+ audit action types, status configs with labels and CSS classes, pagination defaults, certificate reference generator. - Shared Zod validators (
validators.ts): Input schemas for person CRUD, match review, credit purchases, screening, audit queries, bulk upload (up to 1,000 records), and CSV column mapping. - Audit log service: Fire-and-forget
createAuditLog(), request-awarecreateAuditLogFromRequest()(captures IP + user agent), andcreateBatchAuditLog()for bulk ops. - Credit system service:
getCreditBalance()with usage estimates,deductCredits()with atomic transactions,addCredits()with automatic bonus tier calculation. - API route upgrades: All existing routes now use shared validators, constants, and services. Screening endpoint tracks duration and creates
screeningResultsrecords. Match review records status transitions. GDPR delete covers all new tables. Sanctions sync filters byisActive. - Environment placeholders: Added Resend (email) and Stripe (payments) env vars to
.env.example.
Why it matters
This is the internal foundation that all upcoming features — tRPC routers, CSV bulk upload, credit management UI, screening certificates, and email notifications — will build on. No user-facing UI changes, but the data model and service layer are now ready for the full MVP.
Technical notes
- Requires
npm run db:pushto sync schema changes - Status fields use
textcolumns (not enum columns) for backward compatibility - New columns have sensible defaults (
isMonitored: true,screeningCount: 0,isActive: true) - No breaking changes to existing pages
Release Notes
Release v0.1.4 Published ✅
PR #13: feat: MVP database schema upgrade, constants, validators & services
Merge Status: The PR could not be merged via the GitHub API because the changes were already present on the main branch (the content was identical, causing a merge conflict with itself). The code from PR #13 is fully incorporated into main.
Release Created:
- Tag:
v0.1.4 - Title: v0.1.4 — MVP Foundation: Database Schema, Constants, Validators & Services
- URL: https://github.com/LetMC/CalmonySanctionsMonitor/releases/tag/v0.1.4
Key Changes in This Release:
- Database Schema — 12 tables with comprehensive indexes, 4 PostgreSQL enums, TypeScript type exports
- Application Constants — Credit pricing, confidence thresholds, status configs, audit actions, and more
- Shared Zod Validators — Person CRUD, match review, credit, screening, audit, and bulk upload schemas
- Audit Log Service — Fire-and-forget logging with request context and batch support
- Credit System Service — Balance queries, atomic deductions, purchases with bonus tiers
- Updated API Routes — All existing routes upgraded to use the new foundation
- Environment Variables — Resend email and Stripe payment placeholders added