Typed repositories for Firestore
See original GitHub issuenpm install firestore-storage
We have multiple NodeJS production apps written in Typescript which are heavily based on the Firestore Admin. From that this library was created, since we copied a lot of boilerplate code from each project.
It follows the repository pattern. For each collection you create a repository which provides you with a typed save, delete and multiple querying functions for listing and finding documents.
You can easily replace the “driver” from the default Firestore implementation with an included in-memory implementation for testing. It’s also compatible with one of your favorite open source library out there, the dependency injection library Inversify.
Since it helped us a lot and saves us a lot of code we made it opens source and published it on npm. Feedback much appreciated
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
@Bartinger looks good to me! Your project should appear on the site in the next 24h
@samtstern 😆 thank you very much