d-bye

Generate a CRUD REST API from your schema

Define your table’s columns and d-bye generates list, create, update, and delete REST endpoints in Rust (actix) or Node.js (Express) — with input validation and foreign-key integrity. And not just the API: from the same spec it generates the React front end and PostgreSQL DDL, consistent across the stack and exported as a ZIP you own.

What is a CRUD API generator?

A CRUD API is the set of REST endpoints that Create, Read, Update, and Delete rows in a table. Since every table ends up with roughly the same shape, it’s a great fit for generating from a schema.

d-bye treats the design spec as the single source of truth: define tables, columns, constraints, and foreign keys, and it generates the CRUD API from them. The AI drafts the spec, not raw code, then passes type checks and a compile check — so it never ships broken API code.

If you want to start from the DB schema, see our table definition template and how-to. What you define becomes the API, screens, and DDL.

What the generated API includes

Per table, at least these are generated together.

GET / (list)
List with pagination and sorting.
GET /:id (one)
Fetch a single row by primary key.
POST / (create)
Create with input validation; respects defaults and types.
PUT/PATCH /:id (update)
Full or partial update.
DELETE /:id (delete)
Delete (switchable to soft-delete if needed).
Validation / FK integrity
Type, required, and foreign-key checks enforced server-side.

Start by defining the schema (copy-paste template)

Below is a products table example. Copy it, adapt it to your table, and build the same in d-bye visually — that definition generates a CRUD API like the code below.

template
| Logical name | Physical name | Type | PK | NOT NULL | Description |
|--------------|---------------|------|:--:|:--------:|-------------|
| ID | id | uuid | x | x | Primary key |
| Name | name | varchar(120) |  | x | Required |
| SKU | sku | varchar(40) |  | x | Unique |
| Price | price | numeric(10,2) |  | x | >= 0 |
| Supplier | supplier_id | uuid (FK) |  | x | References suppliers |

How to generate a CRUD API

  1. Define the table and its columns (type, NOT NULL, default, FK).
  2. Choose the back-end stack (Rust actix or Node.js Express).
  3. Generate the CRUD API from the spec.
  4. Check endpoint behavior via preview / the generated code.
  5. Generate the code and export as a ZIP.
  6. Drop it into your repo, extend it by hand, and deploy.

With d-bye: the definition becomes a working CRUD API

Build the products definition above visually and part of the CRUD is generated as roughly this code (Node.js/Express excerpt; Rust actix is also available).

Generated API code (example, excerpt)
// products.routes.ts — generated by d-bye (Node.js/Express, excerpt)
router.get("/products", async (req, res) => {
  const rows = await db.any(
    "SELECT * FROM products ORDER BY created_at DESC",
  );
  res.json(rows);
});

router.post("/products", validate(ProductInput), async (req, res) => {
  const { name, sku, price, supplier_id } = req.body;
  const row = await db.one(
    `INSERT INTO products (name, sku, price, supplier_id)
     VALUES ($1, $2, $3, $4) RETURNING *`,
    [name, sku, price, supplier_id],
  );
  res.status(201).json(row);
});
  • Not just the API — also the React front end’s CRUD screens and PostgreSQL DDL.
  • All derived from one spec, so API, UI, and DB agree across the stack.
  • Every generation passes type checks and a compile check, so it never ships broken code.
  • Export everything as a ZIP and run it on your own infrastructure — no lock-in.

FAQ

Can I generate a REST API from a database schema?
Yes. Define tables and columns (types, constraints, foreign keys), and it generates a CRUD REST API in Rust (actix) or Node.js (Express). The same spec also generates the front end and PostgreSQL DDL.
Can I choose the back-end language?
You can switch between Rust (actix-web) and Node.js (Express). Both are generated from the same spec, so consistency with the front end and DB is preserved.
Can I edit the code by hand afterward?
The output is plain code, exported as a ZIP. You can read, modify, add tests, and deploy it anywhere. To change the design, edit the spec and regenerate.
Will the AI-generated API code break?
d-bye has the AI draft a spec rather than raw code, then runs type checks and a compile check as a gate. See the Learn guide “an AI code generator that actually works” for how it works.

Next step

  • Try a template’s API and screens as a working preview in the free Sandbox
  • Start from working templates: inventory, attendance, approvals, contacts
  • Full download requires Personal or higher (design and preview are free, no credit card)