Quickstart
This guide takes you from a blank canvas to exported, developer-ready output — entirely in your browser. No account, nothing uploaded.
1. Open the editor#
The editor runs locally in your browser. Open it and you are ready to design:
- Go to the editor.
Your work stays on your machine. There is no sign-up and nothing is sent to a server.
2. Start from blank or a template#
- Start with a blank schema, or
- Pick one of the 16 example templates (blog, ecommerce, CRM, SaaS, and more) as a starting point.
3. Design your schema#
On the canvas you can:
- Create tables and add columns with types and constraints.
- Add relations (foreign keys) between tables.
- Define indexes on a table.
- Define shared enums and use them as a column type.
4. Validate#
Titanbase validates your schema locally as you work. Open the diagnostics to review:
- Errors — fix these before exporting (for example, a nullable primary key or a relation pointing at a missing column).
- Warnings — portability or safety hints (for example, a table without a primary key, or an unindexed foreign key).
See the Diagnostics reference for the full list.
5. Export#
Open the export panel and choose a target:
| Target | Output file |
|---|---|
| Titan JSON | <project>.titan.json |
| PostgreSQL SQL | <project>.sql |
| Mermaid ERD | <project>.mmd |
| Prisma schema | schema.prisma |
| Drizzle (PostgreSQL) schema | schema.ts |
Copy the output or download the file. Each exporter also reports any warnings so you can review them before applying the result. See Exporters for what each target supports.
6. Save your .titan.json
Save your schema as a portable .titan.json file. This is your source of truth — keep it in version control and reopen it anytime.
Tip
.titan.json is plain JSON. You can review it in pull requests and open it again in the editor later. Learn the structure in the format reference.
Run the editor from source#
Prefer to run it yourself? The project is open source:
git clone https://github.com/titanbaserun/titanbase
cd titanbase
pnpm install
pnpm dev
Requirements: Node.js 20+ and pnpm. See Contributing for the full local setup.
A minimal schema#
A .titan.json is just JSON. Here is a complete, valid single-table schema:
{
"titanVersion": "1.0",
"project": { "id": "blog", "name": "Blog" },
"dialect": "postgres",
"tables": [
{
"id": "t_users",
"name": "users",
"columns": [
{ "id": "c_users_id", "name": "id", "type": "uuid", "nullable": false, "primaryKey": true, "unique": false, "default": "gen_random_uuid()" },
{ "id": "c_users_email", "name": "email", "type": "text", "nullable": false, "primaryKey": false, "unique": true }
],
"indexes": []
}
],
"enums": [],
"relations": [],
"metadata": { "editor": { "tablePositions": { "t_users": { "x": 100, "y": 120 } } } }
}
Planned: CLI and import#
Status: PlannedSQL import and schema diff & migrations are available as library functions and in the editor. A CLI is on the roadmap but not available yet. The current quickstart path is the browser editor — and the same operations are available by importing @titanbase/core and the package functions directly.
Next, learn how the pieces fit together in Architecture, or dive into the full format reference.