Introduction
Powerful, lightweight, extensible Entity documentation generation tool with TypeORM.
Why?
- Automatically generate entity documents
- Entity document extend and change using the ETA template engine
- Entity information are to store in JSON file each version that can make to track change history
- Use puppeteer to extract documents to PDF, image formats
Showcase: ER diagram by PNG image
Showcase: Entity specification table by markdown
tbl_user(User)
Database Name | Property Name | Attribute | Type | Nullable | Charset | Comment |
---|---|---|---|---|---|---|
id | id | PK | int | |||
first_name | firstName | varchar(256) | utf8mb4 | user firstname | ||
last_name | lastName | varchar(256) | utf8mb4 | |||
is_active | isActive | boolean | line1\nline2\nline3 | |||
photo_id | photo | FK | int | Nullable |
tbl_photo(Photo)
Database Name | Property Name | Attribute | Type | Nullable | Charset | Comment |
---|---|---|---|---|---|---|
id | id | PK | int | |||
title | title | varchar(512) | utf8mb4 | photo title | ||
description | description | varchar(2048) | utf8mb4 | photo description | ||
width | width | int | ||||
height | height | int |
tbl_license(License)
Database Name | Property Name | Attribute | Type | Nullable | Charset | Comment |
---|---|---|---|---|---|---|
id | id | PK | int | |||
title | title | varchar(512) | utf8mb4 | organization title | ||
description | description | varchar(2048) | utf8mb4 | organization description | ||
expire | expire | datetime | ||||
user_id | user | FK | int | Nullable |
tbl_organization(Organization)
Database Name | Property Name | Attribute | Type | Nullable | Charset | Comment |
---|---|---|---|---|---|---|
id | id | PK | int | |||
title | title | varchar(512) | utf8mb4 | organization title | ||
description | description | varchar(2048) | utf8mb4 | organization description | ||
expire | expire | datetime |
tbl_mtm_license_organization(tbl_mtm_license_organization)
Database Name | Property Name | Attribute | Type | Nullable | Charset | Comment |
---|---|---|---|---|---|---|
license_id | license_id | FK,PK | int | |||
organization_id | organization_id | FK,PK | int |
Getting Started
Installation
- npm
- yarn
- pnpm
npm i -D erdia
yarn add erdia --dev
pnpm add -D erdia
Initialization
Recommand execute init
command. init
command create .erdiarc
configuration file.
npx erdia init