anarkafkas
Show HN: Typesync, schema-first Firestore tooling that now validates stored data
https://github.com/kafkas/typesync
Hi HN,I’ve been working on Typesync, an open-source CLI for Firestore projects.The basic idea is that you define your Firestore models once in YAML or JSON, then generate the boring parts from that:- TypeScript models - Python/Pydantic models - Swift models - Firestore Security Rules validators - Mermaid diagrams of the document structureThe new command I added is `validate-data`.It walks...
Taya runs browser-based workflows with AI while you sleep
ReScript aims to be a strictly typed JS, simpler and faster than TS
Metronome is building a usage-based billing infrastructure
Show HN: Proficient - AI assistants that help you with your job applications
A light, fast, and memory-efficient collection traversal library for Firestore
Firecode: A collection traversal API for Firestore
I'll actually write up some tests to confirm that we don't process any docs twice!
I'm currently writing another migrator that won't be using Firestore batches, it'll just use the good old Promise.all(). I'm planning to add more capabilities soon like error-resilient traversers using different traversal strategies, the ability to re-traverse the docs that couldn't be migrated the first time etc.
If it's positioned before all the docs in the current batch then it won't be traversed. If it's positioned after the current batch then it will be. So obviously that also depends on whether you’re traversing a plain collection or a Query.
Catching all the new docs that were added requires implementing a different strategy like adding a temporary field to all the traversed docs and then querying the ones that don’t have that field. It’s definitely something that we can implement soon!