When the need arises to administer MongoDB
, especially during early development stages and in small projects, you often have to either fiddle with the command line (mongosh
, yet another syntax you don't want to learn), or choose between bulky (and often paid) tools with tons of dependencies.
Existing free solutions like Mongoku from industry giant Hugging Face provide a convenient interface but may lack necessary configurations. When attempting to modify them, you'll inevitably face problems due to outdated technologies like legacy Angular
and decade-old libraries that are no longer maintained. That said, Mongoku
itself isn't bad, but it critically lacks certain features, such as even basic authorization... And so it appeared...
• ▌ ▄ ·. ▐ ▄ ▄▄ • ▄▄▄ ▄▄▄· ▪ ·██ ▐██ ▪▪ •█▌▐█▐█ ▀ █ █·▐█ ▀█ ██ ▐█ ▌▐▌▐█· ▄█▀▄ ▐█▐▐▌▄█ ▀█▄ ▄█▀▄ ▐▀▀▄ ▄█▀▀█ ▐█· ██ ██▌▐█▌▐█▌.▐▌██▐█▌▐█▄▪▐█▐█▌ ▐▌▐█ █▌▐█ ▪▐▌▐█ ▀▀ █ ▀▀▀ ▀█▄▀▪▀▀ █▪·▀▀▀▀ ▀█▄▀▪.▀ ▀ ▀ ▀ ▀▀▀
For one of my projects, I needed a convenient administration system for MongoDB, but I couldn't quickly extend Mongoku
because the source code simply wouldn't build... Long story short, I decided to rewrite this legacy code in React, update dependencies, and add useful features — that's how Mongorai
was born.
As you've obviously guessed, it's based on Mongoku
's functionality, but the frontend was completely rewritten in React, significantly improving the code and development process.
Who will benefit it? Developers and database administrators who need a fast, easy-to-install, and visually intuitive tool for:
— Viewing databases, collections, and documents
— Executing basic queries (currently primitive editing is partially implemented)
— Analyzing data structure (especially relevant for dynamic schemas)
— Testing and debugging on local or staging environments.
Mongorai main page looks like:
Key features
— Optimized code: Redundancy eliminated, project structure improved.
— Simplified build: Installation and launch processes are much faster, codebase is smaller.
— Reduced dependencies: Minimized external packages enhance stability and security.
— Added HTTP Basic Auth
Install & Run
This is the two simple ways Mongoku can be installed:
# Install global with NPM npm install -g mongorai # Then run it from your terminal mongorai start
Other way is just cloning this repo, install deps and run it locally:
npm i npm run server
After install you can also run Mongorai as a daemon, using either PM2 or
Forever.
mongorai start --pm2 # or mongorai start --forever
Options
Run mongorai
with the environment variable MONGORAI_ENABLE_AUTH=true to enable Basic Auth, or just use --auth
option:
mongorai start --auth
If you use basic authentication, don't forget to change the password by setting the variable MONGORAI_PASS, or run with --pass
option:
mongorai start --auth --pass='your_strong_pass'
Development roadmap
— Full edit support
— Remove bootstrap from frontend
— Resolve outdated nedb
issue
— Add convenient export and import
Currently, Mongorai
provides a reliable tool for viewing and navigating MongoDB
data. Full document editing functionality is being debugged and will be added in upcoming releases.
The project is open-source – if you'd like to contribute, you are welcome!
Get it at NPM.
Project GitHub: https://github.com/psychosynthesis/mongorai
Top comments (0)