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 structure
The new command I added is `validate-data`.
It walks selected Firestore collections and validates existing documents against Zod validators generated from the same schema. It reports the documents that don’t match.
Example:
```bash
typesync validate-data \
--definition 'definition/*/*.yml' \
--model User \
--model Post \
--serviceAccount ./service-account.json
```
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 structure
The new command I added is `validate-data`.
It walks selected Firestore collections and validates existing documents against Zod validators generated from the same schema. It reports the documents that don’t match.
Example:
```bash typesync validate-data \ --definition 'definition/*/*.yml' \ --model User \ --model Post \ --serviceAccount ./service-account.json ```