What is ForgeDB

An application-database generator — one schema compiles into a tailored Rust database, typed client SDKs (TypeScript, Python, Rust, Go), a REST API, and an OpenAPI spec.

ForgeDB is an application-database generator. You write one declarative .forge schema, and ForgeDB compiles it into a tailored Rust database, a typed TypeScript SDK, a REST API, and an OpenAPI spec — each shaped for exactly your schema. Typed REST clients for Python, Rust, and Go come from the same schema.

User {
  id: +uuid
  name: string @length(1, 100)
  email: &string @email
  created_at: +timestamp
  posts: [Post]
}
 
Post {
  id: +uuid
  title: string @length(1, 200)
  views: ^u64
  published: bool
  author: *User
  created_at: +timestamp
}

A generator, not a runtime ORM

Your schema is read once, when you build — never while your app runs. Every schema-specific piece (types, tables, queries, filters, relations, API routes) is generated ahead of time, not reconstructed by a generic engine at request time.

The generation pipeline#

One schema produces the core artifacts:

  • database.rs — a tailored Rust database over columnar storage
  • types.ts — TypeScript types and a typed client SDK
  • api.rs — a REST API with an OpenAPI document
  • stubs/README — a placeholder for the computed-field and component code you write yourself (no UI is generated)

Opt-in targets add REST clients for Python, Rust, and Go and a browser read-replica, all from the same schema.

Why a generator, not a runtime#

You get code shaped for your exact schema: the types, queries, and routes are fixed at compile time, so the compiler catches a mismatch before the app runs. The cost is directness. Changing the schema means regenerating and recompiling, not editing a config that a running server rereads.

Read on for installation and the quickstart.

Search documentation

Find pages across the ForgeDB docs