2 ms·
Show HN: Schema-first codegen for SQL, Rust, Go, Python and TS (single binary)
AstrolaDB (alab) is a schema-first code generator for polyglot systems. Define your schema once and generate:
- SQL migrations (PostgreSQL, SQLite)
- Language-native types (Rust, Go, Python, TypeScript)
- API contracts (GraphQL, OpenAPI)
It's build-time only, with zero runtime dependencies. All outputs are explicit artifacts you can commit. The schema is the single source of truth across languages and APIs.
Links:
- Repo: https://github.com/hlop3z/astroladb https://github.com/hlop3z/astroladb
- Docs: https://hlop3z.github.io/astroladb/ https://hlop3z.github.io/astroladb/
- Comparison: https://hlop3z.github.io/astroladb/comparison/ https://hlop3z.github.io/astroladb/comparison/
- hlop3z 10mo agoI built AstrolaDB after repeatedly running into schema drift. For example, forgetting to update TypeScript models. Most tools either lock you into a runtime or require a large ecosystem. I wanted a single binary that runs locally or in CI and produces fully owned artifacts, with no runtime coupling.
- verdverm 10mo agoI have built something similar, using CUE to define the source of truth instead of JS/TS. https://github.com/hofstadter-io/hof https://github.com/hofstadter-io/hof How do users connect the generated code to the code they have to write in your framework? I use diff utils so they can write directly in the generated code without breaking things
- hlop3z 10mo ago[dead]