Skip to content

Crate

The API is already built. So, what's your excuse now?

Crate is a D language framework built on vibe.d that turns struct definitions into production-ready APIs. Define your data model, hand it to a CrateRouter, and get CRUD endpoints with authentication, middleware, and relation resolution — all fully customizable.

struct Product {
string _id;
string name;
int price;
}
auto products = new MongoCrate!Product("products");
router.crateSetup!RestApi.add(products);
// Six endpoints, ready to go.

Struct-Driven

Your D struct is the API. Fields, types, and relations are introspected at compile time.

Fully Customizable

Every layer is replaceable — storage backends, middleware, serializers, auth policies, and operations.

Multi-Protocol

Serve REST, JSON:API, MCP, and GraphQL from the same model simultaneously.

Compile-Time Safe

D’s template system catches misconfiguration at build time, not in production.