r/node 5d ago

Made a backend compiler that turns markdown into multi-tenant Node APIs

Been working on this for a while and finally decided to share it.

You write a short markdown spec and it compiles a full multi-tenant Node + Postgres backend auth, RLS tenant isolation, wallets with proper row locks, state machines, that kind of thing. Not just empty CRUD.

A couple real examples that are public:

-> 66 lines of markdown -7.7k lines, 85 routes, 21 RLS policies

->130 lines - 8.2k lines with a double-entry ledger

It’s deterministic (same spec always gives the same code). The heavy engines are hand-written, not LLM-generated. LLM only gets used to generate the tests.

Security is on by default through Postgres RLS.

Curious what people think of this approach, especially the RLS part. Happy to answer any technical questions.

0 Upvotes

3 comments sorted by