Vineettt/access-matrix ? reverse-engineered prompt

Reverse engineered prompt

Build me a lightweight access control library for Node.js in TypeScript that makes it easy to manage roles, permissions, and route access in a clean, type safe way.

I want it to work with SQLite out of the box, with PostgreSQL support too, and be designed so other database backends could be added later without a lot of rewrites. Please include a simple API for creating the access control instance, syncing routes, and loading route definitions automatically from source files. It should support common Node frameworks like Express, Fastify, NestJS, and Koa in a practical way.

Also add a few runnable examples and solid tests, and make sure the docs show a clear quick start and config example. If you need to look up current docs or best practices for any library behavior, go ahead and check online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab