finds.dev← search

// the find

jawj/zapatos

★ 1,402 · TypeScript · NOASSERTION · updated Sep 2025

Zero-abstraction Postgres for TypeScript: a non-ORM database library

Zapatos generates TypeScript types directly from your Postgres schema and gives you a thin query-builder layer that compiles to plain SQL — no ORM magic, no runtime surprises. It's for TypeScript developers who want type-safe database access without giving up the ability to read exactly what SQL is being sent. The 48 forks on 1,400 stars suggests people use it rather than extend it.

The code-generation approach means your types are always in sync with your actual schema, not hand-maintained interfaces that drift. Lateral joins and CTEs are first-class rather than afterthoughts bolted onto an ORM that was designed for simpler queries. The SQL shortcut mode lets you drop to raw SQL and still get typed results, which is the escape hatch most ORMs make awkward. Active maintenance through mid-2025 on a project this focused is a good sign.

The code-gen step is a real adoption cost — you need a running Postgres instance to generate types, which complicates CI setup and onboarding. Low fork count means the ecosystem is thin: if you hit an edge case, you're reading source code or filing an issue, not finding a Stack Overflow answer. No support for databases other than Postgres, so if you ever need to target SQLite for testing or multi-tenancy across engines, you're stuck. The documentation site is a single long HTML page with Monaco embedded, which is clever but makes it hard to link to specific sections or search.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →