Postgres · file-based APIs · one command

Your backend is
a few TypeScript files.

Write a Postgres schema and HTTP handlers in TypeScript. robodev deploy syncs the database and serves the APIs — with Swagger on the project host.

terminal

npm i -g robodev
robodev auth
robodev create my-space-app
cd my-space-app
npm run dev

01

Schema in TypeScript

Declare tables with Drizzle in database.ts. Deploy creates the named database and reconciles columns — no migration files.

02

File-based APIs

Export get or post from api/planets.ts and it becomes GET /planets. Zod validates query, body, and response.

03

Hosted per project

Each project gets its own host, tenant Postgres, and /docs. The starter UI talks to it via VITE_API_URL.

database.ts

The database is a file in your repo

Default-export defineDatabase. Starbase creates that Postgres database on first deploy and keeps tables in sync after that. Destructive changes ask for confirmation, or pass --force.

Database guide →

database.ts

import { defineDatabase, pgTable, text, uuid } from "@robodev-ai/sdk";
export const planets = pgTable("planets", {
id: uuid("id").primaryKey().defaultRandom(),
name: text("name").notNull(),
});
export default defineDatabase({
name: "space",
tables: { planets },
});

api/planets.ts

import { planets } from "../database";
import { defineApi, z } from "@robodev-ai/sdk";
export const get = defineApi({
response: z.array(z.object({
id: z.string(),
name: z.string(),
})),
handler: async ({ db }) => db.select().from(planets),
});

api/*.ts

Handlers are just exports

defineApi gives you a typed db, parsed query and body, and optional response schema. Filename is the path. Open /docs on the project host to try the generated OpenAPI.

API guide →

From zero to a running app

1

Sign in

robodev auth opens Starbase in the browser and stores tokens in ~/.robodev.

2

Create

robodev create scaffolds the starter, creates a project, and deploys it.

3

Iterate

Edit database.ts or api/, then robodev deploy. npm run dev serves the UI.