The problem
There was no single place to follow domestic and foreign food and export law; changes meant checking each agency site by hand.
What I built
A register nobody types into: about 17 n8n flows scan agency sites and post to an ingest API that keeps every version. The team reads Thai summaries, acknowledges, comments and asks AI about selected laws.
Key features
- Laws collected automatically, with version history showing which fields changed
- AI-written Thai titles and summaries for foreign laws
- Ask AI about selected laws plus attached knowledge files (PDF, Word, text)
- Per-person acknowledgement stamps and a who-has-read-it list
- Monthly overview and a 14-day health strip per source
- Search that matches Thai and English terms both ways; admin for access, AI settings and audit log
Under the hood
- Ported the backend from Node/Fastify to layered .NET 10 (Api/Core/Infrastructure), checking every read endpoint returns the same JSON
- Write-once version table: every change adds a row with the changed field names and a full snapshot
- AI cost and safety limits: per-person and system-wide quotas, IPs stored only as HMAC, keys and tokens only as hashes, document text wrapped as data against prompt injection