TL;DR Gatehouse-TS is a zero-dependencies authorization policy library written in TypeScript, ported from Rust.<p>It allows you to combine different access control policies to check before allowing someone to access a resource.<p>A few weeks ago, I saw a post on HN about Gatehouse, an authorization library written in Rust. Here's the original HN thread: <a href="https://news.ycombinator.com/item?id=43466221">https://news.ycombinator.com/item?id=43466221</a><p>I looked at their GitHub page, and started reading the source code. I do this for anything posted here that catches my attention, even if it's written in a language I don't understand. The code was relatively easy to follow, even though I'm not a Rust programmer.<p>Why did I decide to try rewriting it in TypeScript? For fun, of course! That was basically the only reason. I had nothing to do on a weekend and wanted to write code. It _did_ help with some challenges I was facing at $day_job, but that came afterwards.<p>I emailed the authors of the Rust version, telling them that I was working in a TypeScript version, and they kindly blessed me to publish it with a similar name.<p>Overall I'm very happy with it. The original authors provided an amazing foundation for a port, I had fun rewriting it and trying to adapt their APIs from Rust to TypeScript. As a bonus, it was immediately useful at work as well.<p>I appreciate any feedback or thoughts on it. Please check out the original project as well, since most of the hard work was done by them: <a href="https://github.com/thepartly/gatehouse">https://github.com/thepartly/gatehouse</a><p>Documentation: <a href="https://9morello.github.io/gatehouse-ts/" rel="nofollow">https://9morello.github.io/gatehouse-ts/</a>