FirestoreSequelize (v0.8.0) provides a Sequelize-like ORM for Google Cloud Firestore, enabling model definitions, queries (findAll, findOne, findOrCreate), subcollections, and sync operations. It wraps firebase-admin and supports TypeScript types. Key differentiators: intuitive API for developers familiar with Sequelize, automatic subcollection mapping, and schema sync. However, it is experimental (v0.x) with limited community adoption and potential breaking changes. Release cadence is irregular; last update was in 2021.
npm install firestore-sequelizeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes firebase-admin, defines a User model, creates a record, and queries non-admin users.
Review the CHANGELOG or migration guide before upgrading.
Avoid relying on sync for production; use manual schema management.
Always define fields with explicit type and required when needed: { type: DataTypes.STRING, required: true }.When defining a model with subcollections, include subcollections: [ChildModel] in the third argument.
Ensure admin.initializeApp() is called before firestoreSequelize.initializeApp(admin).
Use const firestoreSequelize = require('firestore-sequelize'); then firestoreSequelize.initializeApp(admin).Call firestoreSequelize.initializeApp(admin) after admin.initializeApp().
Use const { DataTypes } = require('firestore-sequelize'); or import { DataTypes } from 'firestore-sequelize'.