Setup an Admin Dashboard in 5 minutes with Forest Admin using SQL Databases
Nowadays, every software company or every startup needs to measure things and access their data quickly through what we call a "back-office". It is most of the time a piece of software underestimated while building a product and something that entrepreneurs forget to think about when building a product.
Your admin dashboard is most of the time something you build the last with a pretty small budget, ugly and buggy templates.
As I'm tired to see companies struggling with that problem, I will show you in this article how to solve it forever and for free by building an admin dashboard in under 5 minutes using Forest Admin, Javascript, and a relational SQL Database (or No-SQL).
I am personally using Forest Admin on a daily basis for different projects and different clients, I consider it as the SaaS that brings the most to any type of software company at every stage. Forest Admin is now getting more and more popular and they proved it by converting clients like Qonto (Neo-bank) to use it for their operations.
Current situation
You've just finished developing your wonderful application, it's running on production, everything works great, you have your first users signing up, BUT, you cannot manage and see anything in your Database without writing SQL queries or by going on your Database IDE on your local machine which really sucks.
Here are the 6 easy steps to follow that will change your life:
#1 Register on Forest Admin
Forest Admin is a SaaS platform that allows creating internal tools for your operations by simply using the existing structure of your database. It helps to manipulate data very easily and perform CRUD operations like magic.
Forest Admin is fully customizable and you'll also be able to create custom functions to be triggered, but we will not cover this part in this article.
#2 Create a new project
Once you've registered, you will be proposed to create a new project by picking a name of your choice.
#3 Pick a Datasource type and fill DB credentials
After that, you will need to choose the type of database you're using and then type your Database credentials.
⚠️ Don't worry, none of these data are sent to Forest Admin, it is simply used to generate the script we will run later.
#4 Pick an installation method
You will be prompted to pick between a Docker setup or an NPM setup, in this tutorial, we will cover the NPM method.
First thing first, install the forest CLI globally by running the following command:
▶ npm install -g forest-cli@latest -s
Then you can log in:
▶ forest login
Here Forest generated a script just for you that you need to launch with your database credentials, this step will analyze your database structure and generate your Forest Admin data model from your db:
▶ forest projects:create "Tutorial-CodingSamples" --databaseConnectionURL "<Connection String>" --databaseSchema "dbo" --applicationHost "localhost" --applicationPort "3310" --databaseSSL
▶ cd "Tutorial-CodingSamples"
▶ npm install -s
Notice that I used two specific options:
- —databaseSchema "dbo": This option specifies which schema to use on my database, as I'm running a SQL Server Database, the default one is "dbo", on databases like PostgreSQL it will be "public" schema by default.
- —databaseSSL: This option tells Forest CLI to use a secure connection through SSL to connect to your remote database, this option can be skipped if you're running a local Database on your machine.
#5 Launch 🚀
Now to try you're newly created Admin Dashboard, just launch and click the URL prompted in your command line:
npm start
There you go! Your dashboard is ready, you can already navigate through your different tables, relations, filter data, and make all CRUD operations on them 😍
#6 Customize your dashboard
But wait, your tables and columns are probably not structured the way you want! Fortunately, you can customize everything by enabling the layout editor mode:
The layout editor mode will allow you to modify and customize the way you want to see all of your data to meet your business logic properly.
Conclusion
In this article we've covered how to easily set up an admin dashboard for all your operations, in under 5 minutes, that will allow you to make CRUD operations on your database, filter your data, and do a lot more if you dig more into it.
If you want to learn more about Forest Admin features, make sure to check their website and documentation to see all the possibilities they cover for your business.