A minimal, type-safe Firestore ORM implementing the Repository Pattern for TypeScript. Current stable version is 0.5.0, released as needed (no fixed cadence). It provides universal code sharing between backend (Node.js with @google-cloud/firestore) and frontend (web with @firebase/firestore) via adapter packages. Unlike heavier ORMs like Fireorm, it stays close to the official Firestore vocabulary, adds compile-time schema validation, and supports auto-completion for field paths in queries.
npm install firestore-repositoryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a Users collection with a typed schema, creates a repository, and performs a create & get operation.
Update Node.js to version 18 or later.
Install exactly one adapter: @firestore-repository/google-cloud-firestore for backend or @firestore-repository/firebase-js-sdk for frontend.
Use string(), double(), etc. as functions.
Import from 'firestore-repository/schema' and adapter packages directly.
Run `npm install @firestore-repository/google-cloud-firestore`.
Change import to: `import { rootCollection } from 'firestore-repository/schema'`.Use `string()` instead of `string`.