Skip to content

Latest commit

 

History

History
116 lines (70 loc) · 4.09 KB

Learn.md

File metadata and controls

116 lines (70 loc) · 4.09 KB

db-drawer







Table of Contents

  1. Project Description
  2. Project Architechure
  3. Tech Stacks
  4. Building the project in your system
  5. Contributing
  6. db-drawer is a cli tool for visualising your database schemas. db-drawer checks the data model schemas of your project ("./models") folder and visualises by running on localhost in node environment. it attaches to your project as an npm package.

    [ Note: You must have your models inside a "models" folder ]

    Imagine you have so many model files in your project. You need to check every file again and again to see all field names, validations, field types are specified correctly. It becomes painful when you have relationships, cascading among your tables. Think how it would be to see them in a beautiful tabular format, with field names, field types specified along with constraints populated with different colors, arrow lines pointing to relationships etc. It does not only provide you just a view of your model files but also validates that your model files are syntactically corrent.

    It reads the models files inside your project and shows them in a tabular format by spinning up a server on localhost. It actively looks for changes inside your model files and reflects them immediately.

    currently, we have support only for sequelize and mongoose.

    refer to the video link to get a quick glipmse of the project: https://youtu.be/FTxOed97E2A?si=RuxWV1J56LuWdVmA

    Project Architechure

    WhatsApp Image 2024-05-18 at 00 20 55

    Dataset can be downloaded from the mentioned below link:

    To be able to contribute to this project following technolgies you should learn,

    1. JavaScript
    2. EJS(Embedded Javascript)
    3. little Knowledge of Express.js
    4. CSS
    5. Little Knowledge of ORMs like Mongoos, Sequelize, TypeORM etc.
    6. Process Management in JavaScript

    You can start contribute with knowledge of JavaScript and learn others on the go.

    [ Note: The current version of the project works only when you install it globally for development ]

    Use the project:

    I suggest everyone to use the project first.

    1. Have a project have database schemas files inside a "./models" folder.
    2. Install db-drawer with the command "npm install -g db-drawer".
    3. hit the command "db-draw s"(if using sequelize) or "db-draw m"(if using mongoose).
    4. Play around and get familiar.

    Build the project: For building the project in your system follow this steps,

    [ Note: You will need a demo supporting project that has models e.g: demo supporting project ]

    1. Fork the db-drawer repository.
    2. Clone the repository.
    3. cd db-drawer && npm install.
    4. hit npm install -g (this will install db-drawer globally)
    5. Now cd to demo project(which has models) and hit the command "db-draw s"(for sequelize) or "db-draw m"(for mongoose). It will spinup the visualisation server.
    6. Now create a new branch in db-drawer project, make changes and raise PR.

    [ Note: Always create a New Branch for a New PR ]

    refer to CONTRIBUTING.md

    refer to CODE_OF_CONDUCT.md

    🙏 Support

    This project needs a ⭐️ from you. Don't forget to leave a star ⭐️