dbdocs.io is a free, simple tool to create web-based documentation for your database. This guide will help you set up and start using dbdocs in less than 5 minutes.
Make sure NodeJS and NPM have been installed on your computer before the installation.
Run the following command in the terminal:
Note that in some cases, you need to add sudo to your command so npm can install dbdocs globally.
Execute dbdocs command to check that it has already been installed and preview some commands.
To work with dbdocs, define your database schema using DBML - a simple and open-source DSL language. We recommend you use Visual Studio Code as you can install DBML Language Support package that comes with it, but any other editors will work just as fine.
Before generating dbdocs view, you need to login by executing the following command
A login page will appear in your browser. It requires you to login with your GitHub account, click Continue with GitHub, then copy and paste your token to the terminal where it asks "Please input your authentication token".
Open the folder which contains your dbml file in terminal, then generate dbdocs view by the following command.
You will receive a warning that password is not set for your project, read the privacy instruction below to know how to protect your project.
The last step provides you with a link to visit your database documentation. In our example, visit: https://dbdocs.io/khanh-tran-quoc/Ecommerce to take a look.
Your dbdocs project is set to be public by default. However, you can follow the following command to protect it with a password.
Or you can build your project with password by using build command with --password
Now your project is protected, only the one who have your password can access your project.
Remove password from your project to make it public
You can simply remove your project by remove command
By now, you've successfully set up dbdocs.io . A few things we'd suggest you do as the next steps: