Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kossnocorp/typesaurus
π¦ Type-safe TypeScript-first ODM for Firestore
https://github.com/kossnocorp/typesaurus
Last synced: 18 days ago
JSON representation
π¦ Type-safe TypeScript-first ODM for Firestore
- Host: GitHub
- URL: https://github.com/kossnocorp/typesaurus
- Owner: kossnocorp
- Created: 2019-07-11T08:12:10.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-06-30T23:22:14.000Z (4 months ago)
- Last Synced: 2024-10-05T13:54:16.133Z (29 days ago)
- Language: TypeScript
- Homepage: https://typesaurus.com
- Size: 5.77 MB
- Stars: 414
- Watchers: 9
- Forks: 35
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-firebase - Typesaurus - Firestoreμ νμ μΈμ΄νλ₯Ό μν TypeScript μ΅μ΄ λΌμ΄λΈλ¬λ¦¬μ λλ€. (μΉ)
README
ποΈ NEW: [Typesaurus X is out](https://blog.typesaurus.com/typesaurus-x-is-out/)!
![](https://raw.githubusercontent.com/kossnocorp/typesaurus/main/promo.gif)
# π¦ Typesaurus
TypeScript-first ODM for Firestore.
_Looking for **React** adaptor?_ Check [Typesaurus React](https://github.com/kossnocorp/typesaurus-react)!
**Why?**
- Designed with TypeScript's type inference in mind
- Universal code (browser & Node.js)
- Uncompromised type-safety
- Code autocomplete
- Say goodbye to any!
- Say goodbye to exceptions!
- [Ready to start? Follow this guide](https://typesaurus.com/get-started/).## Installation
The library is available as an [npm package](https://www.npmjs.com/package/typesaurus).
To install Typesaurus, run:```sh
npm install --save typesaurus firebase firebase-admin
```_Note that Typesaurus requires the `firebase` package to work in the web environment and `firebase-admin` to work in Node.js. These packages aren't listed as dependencies, so they won't install automatically with the Typesaurus package._
## Features
- **Complete type-safety**: uncompromised type-safety, includes Firestore quirks.
- **Universal package**: reuse the same code on the client and server.
- **JavaScript-native**: converts Firestore data types, i.e. timestamp, to native JS types, i.e. `Date`.
- **Build size-efficiency**: optimized build-size for web.
- **Typed ids**: all document ids are types, so you'll never mix up a user id with an account id.
- **Centralized schema**: easy to define, read and update.
- **Single-import principle**: single import to define, single import to use.## Changelog
See [the changelog](./CHANGELOG.md).
## License
[MIT Β© Sasha Koss](https://kossnocorp.mit-license.org/)