Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>CRUDGenNew to Visual Studio Code? Get it now.
CRUDGen

CRUDGen

surajpatidar

|
5 installs
| (0) | Free
Generate Express + MySQL CRUD or Auth controllers & routes from a MySQL CREATE TABLE statement.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CRUDGen

🚀 Generate Express + MySQL CRUD controllers and routes instantly from a MySQL CREATE TABLE statement.

CRUDGen helps backend developers quickly scaffold REST APIs without writing repetitive boilerplate code.


✨ Features

  • 📥 Paste a MySQL CREATE TABLE statement
  • 📂 Choose target folder (existing project supported)
  • ⚡ Auto-generate:
    • controllers/<table>.controller.js
    • routes/<table>.routes.js
  • 🔍 Automatically detects PRIMARY KEY
  • 🧠 Smart SQL parsing (supports common MySQL syntax)
  • 🛠 Works inside existing Express projects

🖥 How To Use

  1. Open your backend project folder in VS Code
  2. Press:

Ctrl + Shift + P

  1. Run:

CRUDGen: Generate CRUD from Pasted SQL (MySQL + Express)

  1. Paste your MySQL CREATE TABLE statement
  2. Select the target folder
  3. Done 🎉 — Controllers and routes are generated automatically

🧾 Example Input

CREATE TABLE users (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(100),
email VARCHAR(100),
password VARCHAR(255),
PRIMARY KEY (id)
);
📁 Generated Output
controllers/users.controller.js
routes/users.routes.js

The generated controller includes:

create

getAll
getById
updateById
deleteById
All using mysql2/promise.

⚙ Requirements

Your project should include:

Node.js
Express
mysql2

Example db.js (ES Modules):

import mysql from 'mysql2/promise';

const db = mysql.createPool({
  host: 'localhost',
  user: 'root',
  password: 'password',
  database: 'your_database'
});

export default db;
🧠 Supported SQL Features

INT, BIGINT
VARCHAR, TEXT
DECIMAL
DATETIME / TIMESTAMP
BOOLEAN
ENUM
PRIMARY KEY
FOREIGN KEY (ignored in controller generation)

🚀 Roadmap

 TypeScript output option
 Service layer generation
 Model generation
 Multi-table generation
 Input validation scaffolding
 OpenAPI/Swagger generation

🛡 License

MIT License

👨‍💻 Author

Suraj Patidar
GitHub: https://github.com/surajpatidar1

If you find this extension helpful, consider giving it a ⭐ on GitHub.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft