How to build a MongoDB admin panel 
Tags: mongodb, webdev, javascript, mongoose
Published: 2022-02-16 15:24:49

MongoDB doesn’t come with a comprehensive admin panel out of the box. There is Compass, the GUI built by — and for — MongoDB that is made for querying, optimizing, and analyzing data, but it won’t meet every business logic. Building a MongoDB admin panel from scratch is always possible but it does require a lot of dev, product, and UX work.

If you found this article, chances are you’re looking for a low-code admin panel solution to avoid spending long hours on development and maintenance. The good news is that you’re in the right place! I’ll show you how to create a robust and user-friendly admin panel that can be used to interact with customers, manage orders and refunds, monitor transactions, or do whatever your business requires. Here is how it can look like:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mk8zqd4l4u2m0tcjtign.png)

_The KYC solution that can be built on top of a MongoDB database. Visit the [KYC live demo](https://www.forestadmin.com/usecases/kyc?utm_source=referral&utm_medium=devto&utm_campaign=blog-mongodb-admin-panel&utm_content=blog-mongodb-admin-panel) and check how it works._


![Image description](https://s3-eu-west-1.amazonaws.com/blog.forestadmin.com/2022/02/mongodb-gui-fleet-management--1-.png)
_The fleet management solution that can be built on top of a MongoDB database. Visit the [fleet management live demo](https://www.forestadmin.com/usecases/fleet-management?utm_source=referral&utm_medium=devto&utm_campaign=blog-mongodb-admin-panel&utm_content=blog-mongodb-admin-panel) and check how it works._


![Image description](https://s3-eu-west-1.amazonaws.com/blog.forestadmin.com/2022/02/mongodb-gui-transactions-dashboard--1-.png)

_A dashboard for transactions monitoring that can be built on top of a MongoDB database. Visit the [transactions monitoring and fraud management live demo](https://www.forestadmin.com/usecases/transactions-monitoring?utm_source=referral&utm_medium=devto&utm_campaign=blog-mongodb-admin-panel&utm_content=blog-mongodb-admin-panel) and check how it works._


## How to build a MongoDB admin panel: Forest Admin & alternatives

Once you’ve made the decision that you don’t want to allocate 30% of the dev time on building and maintaining back-office tools, it’s time to choose the perfect solution. In fact, you have a few possibilities:

- Pick one of the [admin panel templates](https://blog.forestadmin.com/5-reasons-for-more-than-admin-panel-templates/?utm_source=referral&utm_medium=devto&utm_campaign=blog-mongodb-admin-panel&utm_content=blog-mongodb-admin-panel) that are easy to find online. They are often free and very easy to install, but they come with limitations. The idea behind them is to fit the most common needs and there is very little or no customization available.
- Take advantage of open-source admin frameworks and libraries. Their pros? Much more flexibility and customization compared to the templates, they’re also free to use. Cons? Setting them up and making edits still requires quite a lot of dev work, even if less than budding a back-office solution from scratch. They can’t be customized by non-tech team members.
- Try Forest Admin as it gives you the best of both worlds: The fundamental features, like CRUD operations, search, filters, dashboards, or export, are available out-of-the-box, but you can code functionalities that are advanced or specific to your business.

But what makes Forest Admin truly special is [the hybrid architecture](https://blog.forestadmin.com/a-deep-dive-into-forest-admins-architecture-and-its-benefits-for-the-developers-who-trust-it/?utm_source=referral&utm_medium=devto&utm_campaign=blog-mongodb-admin-panel&utm_content=blog-mongodb-admin-panel) that consists of four components: the database and admin backend, the Forest Admin API Server, and the Forest Admin UI Server. Once you create an account and choose a MongoDB or a MongoDB Atlas as a data source, Forest Admin will create a Node.js server for you. Alternatively, if you have an Express application with the Mongoose ORM, Forest Admin will be installed directly into your app. Only the frontend is managed on Forest Admin servers, which gives you the flexibility of a no-code SaaS tool without compromising on data security. And that, contrary to the majority of open source solutions like [React Admin](https://blog.forestadmin.com/forest-admin-vs-react-admin/?utm_source=referral&utm_medium=devto&utm_campaign=blog-mongodb-admin-panel&utm_content=blog-mongodb-admin-panel) or [Django Admin](https://blog.forestadmin.com/forest-admin-vs-django-admin/?utm_source=referral&utm_medium=devto&utm_campaign=blog-mongodb-admin-panel&utm_content=blog-mongodb-admin-panel), allows non-technical team members to manage the tools and dashboards they rely on every day.

![Image description](https://s3-eu-west-1.amazonaws.com/blog.forestadmin.com/2022/02/forest-architecture.png)
_Forest Admin architecture consists of four components: the database, the admin backend, the Forest Admin API server, and the Forest Admin UI server._

And finally, guess what? Forest Admin is perfectly scalable, so you don’t need to worry about  what happens with internal tools when your company grows from a few to thousands of employees – many of our rapidly growing users can prove that!

To build a MongoDB admin panel with Forest Admin, you need:

- 15 minutes of your time.
- Basic knowledge of JavaScript.
- Web browser (we recommend Chrome and Firefox).
- Your favorite code editor.
- A MongoDB database or an Express application with the Mongoose ORM.


##Getting started with Forest Admin for MongoDB

First of all, sign up on ForestAdmin.com and create a free account and choose a name for your project. If you have a MongoDB database, there are 2 options:

Choose MongoDB if you have a MongoDB/MongoDB Atlas database. Forest Admin will create a Node.js server for you.
Then follow the onboarding instructions. You will be able to copy and paste the code when you log in to the app.


![Image description](https://s3-eu-west-1.amazonaws.com/blog.forestadmin.com/2022/02/datasources-mongodb.png)
![Image description](https://s3-eu-west-1.amazonaws.com/blog.forestadmin.com/2022/02/Mongodb-setup.png)

We recommend installing with npm. You will be able to copy and paste the code when you log in to the app.

![Image description](https://s3-eu-west-1.amazonaws.com/blog.forestadmin.com/2022/02/mongodb-install-npm.png)



Alternatively, choose Express/Mongoose if you have an Express application with the Mongoose ORM. Forest Admin will be installed directly into your app.

![Image description](https://s3-eu-west-1.amazonaws.com/blog.forestadmin.com/2022/02/datasources-mongoose.png)

Then follow the onboarding instructions.

![Image description](https://s3-eu-west-1.amazonaws.com/blog.forestadmin.com/2022/02/mongoose-setup.png)

![Image description](https://s3-eu-west-1.amazonaws.com/blog.forestadmin.com/2022/02/mongoose-setup2.png)

![Image description](https://s3-eu-west-1.amazonaws.com/blog.forestadmin.com/2022/02/mongoose-setup3.png)


You will be able to copy and paste the code when you log in to the app. Read more about [how to configure Express packages here](https://docs.forestadmin.com/documentation/reference-guide/how-it-works/developing-on-forest-admin/express-packages). And if you need any assistance, the [Forest Admin developer community forum](https://community.forestadmin.com/) is there to help.


Once you have your back office up and running, it is time to customize your admin panel, deploy to production, and invite team members because the more the merrier!



##Try it yourself with our demo MongoDB database

We want to give you the possibility to try Forest Admin for MongoDB in a read-only mode in a few moments, even before you connect it to your own database. Use these demo credentials and follow the above-mentioned steps and see it for yourself how easy to set up and use are internal tools built in Forest Admin.

After creating a project, and picking MongoDB as a datasource, paste the following information and follow the instructions:

![Image description](https://s3-eu-west-1.amazonaws.com/blog.forestadmin.com/2022/02/mongodb-demo-setup-3.png)

Host: prod-howtobuildamongodb.x4fxi.mongodb.net

User: article

Password: CAx3jRn%gx4Y3kts**VHBVYZRSx@

database: sample_analytics

And don’t forget to tick Use SRV in the advanced settings.


Then, follow the instructions like in the example above. We also recommend installing Forest Admin for MongoDB with npm.

![Image description](https://s3-eu-west-1.amazonaws.com/blog.forestadmin.com/2022/02/mongodb-demo-setup2-2.png)

That’s all! Now you can play around with Forest Admin in a read-only mode. The next step? Create a new project and build a MongoDB admin panel with your own data.

If you don’t have an account yet, [sign up for free](https://app.forestadmin.com/signup?utm_source=referral&utm_medium=devto&utm_campaign=blog-mongodb-admin-panel&utm_content=sign-up-page) and join thousands of innovative companies.