A Zod alternative with runtime schema introspection
Typed error selectors fix Zod's magic string pain point with actual compile-time checks.
Schema-first Firestore tooling for types, validation, and visualization
Validates live Firestore docs against schema when other tools only generate types.
Firestore developers building multi-platform apps
Zod · Pydantic · Firebase Extensions
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 ```
Typed error selectors fix Zod's magic string pain point with actual compile-time checks.
Solves a real CI/CD pain, but dotenv validation already exists (python-dotenv, pydantic).
Inline validation without schema classes, but Pydantic already owns this space.
Python FFI bridge via PyO3 is clever, but tool-calling frameworks are crowded.
Zero-decorator function wrapping into MCP tools solves real integration friction.
Yet another JSON viewer when browser DevTools and JSONLint already exist.