erd-generator

star 0

Generate ERD dan database schema (SWEBOK Design, 3NF).

mifdlaldev By mifdlaldev schedule Updated 1/21/2026

name: erd-generator version: 1.0.0 description: Generate ERD dan database schema (SWEBOK Design, 3NF).

๐ŸŽฏ Goal

Buat Entity Relationship Diagram dan normalized schema.

๐Ÿ› ๏ธ Instructions

  1. Identifikasi entities dari requirements
  2. Tentukan relationships (1:1, 1:N, M:N)
  3. Normalisasi ke 3NF minimum
  4. Generate Mermaid ERD diagram
  5. Buat migration scripts

๐Ÿ“ ERD Mermaid Template

erDiagram
    USER ||--o{ ORDER : places
    ORDER ||--|{ ORDER_ITEM : contains
    PRODUCT ||--o{ ORDER_ITEM : "ordered in"

    USER {
        uuid id PK
        string email UK
        string password_hash
        string name
        timestamp created_at
    }

    ORDER {
        uuid id PK
        uuid user_id FK
        decimal total_amount
        string status
        timestamp created_at
    }

    PRODUCT {
        uuid id PK
        string name
        text description
        decimal price
        int stock
    }

    ORDER_ITEM {
        uuid id PK
        uuid order_id FK
        uuid product_id FK
        int quantity
        decimal unit_price
    }

๐Ÿ“ Relationship Types

Type Notation Example
One-to-One ||--|| User - Profile
One-to-Many ||--o{ User - Orders
Many-to-Many }o--o{ Product - Category (via junction)

๐Ÿ“ Normalization Checklist

Form Rule Check
1NF No repeating groups, atomic values โœ“
2NF All non-key attributes depend on full key โœ“
3NF No transitive dependencies โœ“

๐Ÿšซ Constraints

  • WAJIB normalisasi ke 3NF
  • WAJIB index semua foreign keys
  • NEVER use VARCHAR(255) untuk semua fields โ€” pilih tipe data yang tepat
  • WAJIB use UUID atau prefixed ID untuk primary keys
Install via CLI
npx skills add https://github.com/mifdlaldev/antigravity-customize --skill erd-generator
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator