Firesnap is an ORM/ODM for Google Firestore, inspired by Mongoose, providing data validation, population of related data, and lifecycle hooks (save/delete callbacks). Current stable version is 1.0.14. It supports both TypeScript (with decorators) and JavaScript (with static schema). Key differentiators: decorator-based model definition, built-in validation, and Firestore-specific query operators ($eq, $gt, etc.). Release cadence is irregular; maintained primarily by a single developer. Not officially stable or production-ready (version < 1.0).
npm install firesnapNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows initialization with Firebase Admin SDK, model definition using decorators, and basic CRUD operations.
Set 'experimentalDecorators': true and 'emitDecoratorMetadata': true in compilerOptions
Call Firesnap.initialize(admin.firestore()) at app startup
Pin to exact version and expect breaking changes on minor updates
Use await Post.doc('id').get() instead of just Post.doc('id')Add 'experimentalDecorators': true and 'emitDecoratorMetadata': true to tsconfig.json
Call Firesnap.initialize(admin.firestore()) after admin.initializeApp()
Ensure class extends Model and import { Model } from 'firesnap'Use const docRef = Post.doc('id'); const doc = await docRef.get();