Skip to content

AstrolaDB (alab)

Welcome to AstrolaDB aka alab. A schema orchestration tool with multi-language code generation. It gives you the types and the migrations then it gets out of the way. Including: GraphQL schemas and OpenAPI specifications.

One schema: many languages.

export default table({
id: col.id(),
username: col.username().unique(),
password: col.password_hash(),
});

Rust | Go | Python | TypeScript

AstrolaDB is a schemas orchestration tool. It lets you design your database schemas and migrations using JavaScript. It includes a built-in JavaScript engine powered by Goja.

Your .js schema files are the single source of truth:

CommandOutputPurpose
alab migrateSQL migrationsUpdate your database
alab export -f typescript.ts filesType-safe code
alab export -f openapiopenapi.jsonAPI documentation

The name is a play on “Astrolabe”, an ancient astronomical instrument. In this case, Alab acts as a database instrument 🎹🎸, giving you a laboratory to play, explore and design your schemas.

Before the main performance, we run a sound check to make sure everything is working. Fire up the local server:

Terminal window
alab live
The Music

Imagine a band: Python on the drums, Go on the guitar, Rust on the bass, and TypeScript singing. Different instruments, different roles yet is the same song. The notes are universal and the rhythm must be shared.

This tool makes sure everyone stays in sync. No matter who writes the notes or lyrics, when the music plays, each instrument hits its mark, creating a full song… letting the music flow!

AstrolaDB is the Universal Music Orchestrator for Data Models! And… The model.js files are the lead singers of Alab.

One schema change, and it rewrites the Sheet Music for all instruments, no coordination needed. That’s Passive Orchestration.

It solves the “Three-Headed Monster” of backend dev: Schema Drift, Type-Safety and Documentation.

D12: My Band