Zero-CRUD

English · 中文
Zero-CRUD turns your DDL (CREATE TABLE statements) into a full-stack REST API — instantly.
Paste your database schema, click Parse, and get a complete backend + frontend generated in seconds. No boilerplate code. No ORM config. No manual CRUD wiring.
What It Generates
One DDL → a complete application:
| Layer |
Stack Options |
Includes |
| Backend API |
TypeScript (Express) · Python (FastAPI) · Go (Gin) · Java (Spring Boot) |
Full CRUD endpoints, pagination, filtering, sorting |
| Frontend |
Vue 3 · React |
List views, form views, detail views, FK pickers |
| Database |
MySQL · PostgreSQL · SQLite · MariaDB |
Generated init.sql, Docker Compose |
| Deployment |
Docker · Docker Compose |
One-command startup |
Every generated API includes:
- ✅ REST endpoints:
GET/POST/PUT/DELETE for each table
- ✅ Pagination & filtering:
/list?page=1&size=20, filter by any column
- ✅ Unique column lookups:
/by-username/:value for UNIQUE columns
- ✅ Batch operations:
/listByIds, /count
- ✅ Soft delete: toggleable — records stay recoverable, hidden from queries
- ✅ Optimistic locking: conflict detection on concurrent updates
- ✅ Audit fields: creation & last-update tracking per record
- ✅ Field-level permissions: per-role visibility and editability
Quick Start
1. Install the Extension
Download from the VS Code Marketplace or visit zero-crud.com.
2. Open a Project
Ctrl+Shift+P → Zero-CRUD: New Project
3. Paste Your DDL
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
email VARCHAR(255) NOT NULL UNIQUE,
role ENUM('admin','manager','user') NOT NULL DEFAULT 'user',
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NULL ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB;
4. Click "Parse DDL"
Zero-CRUD analyzes your schema and configures generation automatically.
5. Click "Generate"
Choose your backend language (TS/Python/Go/Java) and frontend framework (Vue/React).
6. Run It
cd generated/ts_backend
npm install && npm run dev
http://localhost:3000/api/Users/list
http://localhost:3000/api/Users/1
http://localhost:5173/ (frontend)
Supported DDL
Zero-CRUD parses common CREATE TABLE DDL from MySQL, PostgreSQL, SQLite, and MariaDB — covering typical data types, primary and foreign keys, unique constraints, defaults, and auto-increment columns. Constructs it can't interpret are flagged with clear severity-tagged messages, so you can fix the DDL or continue with reduced functionality.
Constraint Badges
Each column in the table config shows constraint badges:
| Badge |
Meaning |
| PK |
Primary Key |
| AI |
Auto Increment |
| NN |
Not Null |
| UQ |
Unique |
| FK |
Foreign Key |
| DEF |
Has Default Value |
| AGUID |
UUID Auto-Generated |
| GEN |
Generated Column |
| SYS |
System Field |
Project Structure
After generation, you get a complete project:
generated/
├── ts_backend/ # TypeScript Express API
│ ├── src/
│ │ ├── dao/ # Data access objects
│ │ ├── restApi/ # REST endpoints
│ │ ├── routes/ # Express route definitions
│ │ ├── schema/ # Column schemas
│ │ ├── types/ # TypeScript interfaces
│ │ ├── auth/ # Authentication & permissions
│ │ ├── init/ # Database connection
│ │ ├── utils/ # DAO utilities (query builder, etc.)
│ │ └── app.ts # Express app entry
│ ├── init.sql # Database initialization
│ ├── Dockerfile
│ └── package.json
├── vue_frontend/ # Vue 3 frontend (optional)
│ ├── src/
│ │ ├── views/ # ListView, FormView, DetailView
│ │ ├── api/ # API client
│ │ ├── types/ # TypeScript types
│ │ └── router.ts # Vue Router
│ └── package.json
├── react_frontend/ # React frontend (optional)
└── docker-compose.yml # Full stack deployment
API Reference
Endpoints Generated Per Table
| Method |
Path |
Description |
POST |
/api/:table/list |
Paginated list with filters & sorting |
POST |
/api/:table/listByIds |
Batch fetch by IDs |
POST |
/api/:table/count |
Count with filters |
GET |
/api/:table/:id |
Get single record |
GET |
/api/:table/by-:col/:val |
Get by unique column |
POST |
/api/:table |
Create record(s) |
PUT |
/api/:table/:id |
Update record |
DELETE |
/api/:table/:id |
Delete record (soft or hard) |
Database Dialects
Zero-CRUD generates schema-compatible init.sql for each supported database.
| Dialect |
Generation |
| MySQL |
✅ |
| PostgreSQL |
✅ |
| SQLite |
✅ |
| MariaDB |
✅ |
Backend Languages
| Language |
Framework |
| TypeScript |
Express |
| Python |
FastAPI |
| Go |
Gin |
| Java |
Spring Boot |
Installation
VS Code Extension
- Download from the VS Code Marketplace
- Or run
code --install-extension zero-crud-*.vsix
- For help, visit zero-crud.com/support
Requirements
- Node.js 18+
- One of: Go 1.22+, Python 3.10+, Java 21+, or just Node.js for TypeScript backend
- MySQL/PostgreSQL/SQLite (for running generated code)
FAQ
Can I customize the generated code?
Yes. The generated code is standard, readable source code — not a black-box framework. Modify it as you would any other project.
What if my DDL has unsupported features?
Zero-CRUD tells you exactly what it can't interpret and lets you fix the DDL or proceed with reduced functionality.
How do I handle permissions?
Enable "Function Permission" in Project Settings. This generates role-based access control with field-level masking. Roles are passed via X-User-Role header.
Does the generated code handle authentication?
The generated code includes middleware for role-based access (X-User-Role header) and user identification (X-User-Id header). Full OAuth/JWT authentication is outside the generated scope — add it to the generated auth/ module.
Can I generate only the backend without a frontend?
Yes. In Project Settings, deselect frontend templates. Only the backend will be generated.
Support
Found a bug or have a feature request?
License
Proprietary. Free for personal and evaluation use. See the Terms for details.
Zero-CRUD 中文版
Zero-CRUD 把你的数据库表结构(CREATE TABLE DDL)一键变成全栈 REST API。
粘贴建表语句 → 点解析 → 几秒内生成完整的前后端工程。没有样板代码,不需要配置 ORM,不用手写 CRUD。
能生成什么
一份 DDL → 一套完整应用:
| 层 |
可选技术栈 |
包含 |
| 后端 API |
TypeScript (Express) · Python (FastAPI) · Go (Gin) · Java (Spring Boot) |
完整 CRUD 接口、分页、过滤、排序 |
| 前端 |
Vue 3 · React |
列表页、表单页、详情页、外键选择器 |
| 数据库 |
MySQL · PostgreSQL · SQLite · MariaDB |
生成的 init.sql、Docker Compose |
| 部署 |
Docker · Docker Compose |
一条命令启动 |
每个生成接口都自带:
- ✅ REST 端点:每张表的
GET/POST/PUT/DELETE
- ✅ 分页与过滤:
/list?page=1&size=20,可按任意列过滤
- ✅ 唯一列查询:UNIQUE 列自动生成
/by-username/:value
- ✅ 批量操作:
/listByIds、/count
- ✅ 软删除:可开关——记录可恢复,查询自动隐藏
- ✅ 乐观锁:并发更新冲突检测
- ✅ 审计字段:每条记录自动追踪创建与更新时间
- ✅ 字段级权限:按角色控制可见与可编辑
快速开始
1. 安装扩展
从 VS Code Marketplace 下载,或访问 zero-crud.com。
2. 新建项目
Ctrl+Shift+P → Zero-CRUD: New Project
3. 粘贴 DDL
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
email VARCHAR(255) NOT NULL UNIQUE,
role ENUM('admin','manager','user') NOT NULL DEFAULT 'user',
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NULL ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB;
4. 点击「解析 DDL」
Zero-CRUD 自动分析你的结构并完成生成配置。
5. 点击「生成」
选择后端语言(TS/Python/Go/Java)与前端框架(Vue/React)。
6. 运行
cd generated/ts_backend
npm install && npm run dev
http://localhost:3000/api/Users/list
http://localhost:3000/api/Users/1
http://localhost:5173/ (前端)
支持的 DDL
Zero-CRUD 可解析 MySQL、PostgreSQL、SQLite、MariaDB 常见的 CREATE TABLE 语句——覆盖常见数据类型、主键/外键、唯一约束、默认值与自增列。无法识别的写法会给出带严重级别的清晰提示,你可以修正 DDL,或在功能裁剪下继续。
约束徽标
表配置中每列都会显示约束徽标:
| 徽标 |
含义 |
| PK |
主键 |
| AI |
自增 |
| NN |
非空 |
| UQ |
唯一 |
| FK |
外键 |
| DEF |
有默认值 |
| AGUID |
UUID 自动生成 |
| GEN |
生成列 |
| SYS |
系统字段 |
生成后的工程结构
generated/
├── ts_backend/ # TypeScript Express API
│ ├── src/
│ │ ├── dao/ # 数据访问对象
│ │ ├── restApi/ # REST 端点
│ │ ├── routes/ # Express 路由
│ │ ├── schema/ # 列结构定义
│ │ ├── types/ # TypeScript 接口
│ │ ├── auth/ # 认证与权限
│ │ ├── init/ # 数据库连接
│ │ ├── utils/ # DAO 工具(查询构造器等)
│ │ └── app.ts # Express 入口
│ ├── init.sql # 数据库初始化
│ ├── Dockerfile
│ └── package.json
├── vue_frontend/ # Vue 3 前端(可选)
│ ├── src/
│ │ ├── views/ # 列表/表单/详情页
│ │ ├── api/ # API 客户端
│ │ ├── types/ # TypeScript 类型
│ │ └── router.ts # Vue Router
│ └── package.json
├── react_frontend/ # React 前端(可选)
└── docker-compose.yml # 全栈部署
API 参考
每张表生成的端点
| 方法 |
路径 |
说明 |
POST |
/api/:table/list |
分页列表(含过滤、排序) |
POST |
/api/:table/listByIds |
按 ID 批量查询 |
POST |
/api/:table/count |
带过滤计数 |
GET |
/api/:table/:id |
查询单条 |
GET |
/api/:table/by-:col/:val |
按唯一列查询 |
POST |
/api/:table |
新增记录 |
PUT |
/api/:table/:id |
更新记录 |
DELETE |
/api/:table/:id |
删除记录(软/硬删除) |
数据库方言
Zero-CRUD 为每种支持的数据库生成兼容的 init.sql。
| 方言 |
支持 |
| MySQL |
✅ |
| PostgreSQL |
✅ |
| SQLite |
✅ |
| MariaDB |
✅ |
后端语言
| 语言 |
框架 |
| TypeScript |
Express |
| Python |
FastAPI |
| Go |
Gin |
| Java |
Spring Boot |
安装
VS Code 扩展
- 从 VS Code Marketplace 下载
- 或执行
code --install-extension zero-crud-*.vsix
- 需要帮助请访问 zero-crud.com/support
环境要求
- Node.js 18+
- 以下任选其一:Go 1.22+、Python 3.10+、Java 21+;纯 TypeScript 后端只需 Node.js
- 运行生成代码需要 MySQL / PostgreSQL / SQLite
常见问题
生成后的代码可以修改吗?
可以。生成的是标准、可读的源码,不是黑盒框架,你可以像任何普通工程一样修改它。
DDL 有暂不支持的特性怎么办?
Zero-CRUD 会明确指出无法识别的部分,你可修正 DDL,或在功能裁剪下继续使用。
权限怎么做?
在「项目设置」里开启「功能权限」,即可生成基于角色的访问控制与字段级遮蔽。角色通过 X-User-Role 请求头传入。
生成的代码带认证吗?
生成代码内置基于角色的访问中间件(X-User-Role)与用户识别(X-User-Id)。完整的 OAuth/JWT 认证不属于生成范围——请在生成的 auth/ 模块中自行接入。
可以只生成后端、不生成前端吗?
可以。在「项目设置」中取消勾选前端模板,就只生成后端。
支持
发现 Bug 或有功能建议?
许可
Proprietary(专有许可)。个人与评估使用免费。详见 服务条款。