Skip to content
Expose
Language:en Author:AtomForge
typescript allow-list security serialization

Expose

Expose (@atom-forge/expose) is a small TypeScript library that decides what leaves the server: nothing goes to the client unless a view names it. When a table gets a new column, that column stays on the server until someone adds it to a view, and the compiler knows the exact shape of what went out.

flowchart LR
  R[Database row] --> P1[View: identity]
  P1 --> P2[View: contact]
  P2 --> O[Output for the client]

It has no dependencies and works with any database layer or transport, because a view is a plain function.

Who this book is for

TypeScript developers who return database rows from a server to a client and want a new column to stay private by default. Basic TypeScript generics help, but only for writing views that add to a key.

Reading guide

  1. Getting started builds a first output.
  2. Views explains naming fields, overwriting, composition and stacking.
  3. Organizing an application shows where views live and how they relate to permission checks.
  4. API reference lists every export.
  5. Pitfalls collects what the library cannot check for you.
  6. Upgrading lists the changes that need action between versions.
  7. AI Notes has instructions to copy into your project's agent instruction file.