Back to articles
I built a zero-infrastructure audit logging SDK for TypeScript -> here's what I learned

I built a zero-infrastructure audit logging SDK for TypeScript -> here's what I learned

via Dev.to WebdevSadat Nazarli

Every B2B SaaS eventually gets this message from a customer: "Someone changed this record — who did it?" If you don't have audit logs, you have no answer. I've seen this problem in fintech systems I've built, and every time the solution was the same: spend two weeks writing the same boilerplate from scratch. So I built trailkit — a lightweight, zero-infrastructure audit logging SDK for TypeScript. Here's what I learned along the way. The problem with existing solutions When I looked at the npm ecosystem, the situation was bleak. The audit-log package was last published 13 years ago. Most ORM-specific plugins are abandoned or locked to a single database. And commercial services like WorkOS charge $5,000+/month for 100 organizations — which makes no sense for a small B2B SaaS team that just needs to answer "who did what." The gap was clear: there's no lightweight, TypeScript-native library that just works out of the box. The insight that made everything click: AsyncLocalStorage The harde

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
6 views

Related Articles