MongoUI: Real-Time MongoDB Admin Web Interface (a la phpMyAdmin in Node.js)

MongoUI: Real-Time MongoDB Admin Web Interface is Your Life Ring

MongoUI is a real-time web interface for Node.js and MongoDB written with DerbyJS—a real-time full-stack web framework. It’s a app that can be run locally and on the server. Similarly, you can view and manipulate data in a local or remote database. The MongoUI project is in beta so use caution, and please contribute your feedback.

MongoUI on NPM: https://www.npmjs.org/package/mongoui

MongoUI on GitHub: https://github.com/azat-co/mongoui

MongoUI description (this page): http://webapplog.com/mongoui

MongoUI features include:

  • Switch databases and collections
  • Search by field value (string, number, ObjectId)
  • Save search / filter results as a bookmark (each URL has a query)
  • Edit any fields’ values in a real-time editor
  • Get raw JSON objects

Here’s a one-and-a-half-minute video that shows filtering, editing, and switching collections:

Direct link to the YouTube video: http://youtu.be/l8Rfpow0f9A.

Why

Tired of typing db.users.findOne({_id:ObjectId(...)}) just to look up data structure. Even more typing to modify the data. Can’t find Node.js implementation (not true any more, there is express-mongo).

Screenshots

Here’s a one and a half minute video that shows filtering, editing, and switching collections:

mongoui rocks!

Select a database from the local server (can be remote server):

Select a collection from the dropdown menu:

Collection view with a single element (if there’s only one element, it can be edited):

Edit an item (if there’s only one element, it can be edited):

Editing text property (if there’s only one element, it can be edited):

Server logs (real-time updates as you type):

Filter/find based on property(ies):

How to Use

Installation

git clone git@github.com:azat-co/mongoui

or

git clone https://github.com/azat-co/mongoui.git

or

curl -O https://github.com/azat-co/mongoui/archive/master.zip

or

wget https://github.com/azat-co/mongoui/archive/master.zip
unzip master.zip
cd mongoui-master

or

mkdir node_modules
npm install mongoui
cd node_modules/mongoui

Configs

Copy config_default.json file as config.json:

$ cp config_default.json config.json

Modify as needed (remote databases should work just fine!).

Running the app

Assuming that MongoDB is running ($ mongod), to start the server run:

$ node .

or:

$ node index.js

or

$ node index

Using

Open http://localhost:3000/ in your favorite browser. If you use Chrome, there is a nice extension for viewing raw json: Chrome extension.

Optional: Download and install JSONView Chrome extension to view JSON in a human readable format.

Contributors

Via git shortlog -s -n:

61  Azat Mardan
14  cultofmetatron
 1  Jan Carlo Viray

TODO

The list is in the GitHub Issues.

Contributing

Pull requests are always welcome as long as an accompanying test case is
associated.

This project is configured to use git
flow
and the following conventions
are used:

  • develop – represents current active development and can possibly be
    unstable.
  • master – pristine copy of repository, represents the currently
    stable release found in the npm index.
  • feature/** – represents a new feature being worked on

If you wish to contribute, the only requirement is to:

  • branch a new feature branch from develop (if you’re working on an
    issue, prefix it with the issue number)
  • make the changes, with accompanying test cases
  • issue a pull request against develop branch

Although I use git flow and prefix feature branches with “feature/” I
don’t require this for pull requests… all I care is that the feature
branch name makes sense.

Pulls requests against master or pull requests branched from master will
be rejected.

Examples

Examples of good branch names:

  • 12-amd-support
  • feature/12-amd-support

Running Tests

In order to run the tests which are in test folder, you will need:

  • Node.js
  • NPM

With those installed, running npm install and ‘‘npm test’’ will run the tests.

Non-Node.js Alternatives

  • Mac OS X app: MongoHub
  • .NET based app: MongoVUE](http://www.mongovue.com/)

Author: Azat

Techies, entrepreneur, 20+ years in tech/IT/software/web development expert: NodeJS, JavaScript, MongoDB, Ruby on Rails, PHP, SQL, HTML, CSS. 500 Startups (batch Fall 2011) alumnus. http://azat.co http://github.com/azat-co

4 thoughts on “MongoUI: Real-Time MongoDB Admin Web Interface (a la phpMyAdmin in Node.js)”

  1. Thank you for being a student. Yes. Mongoose is NOT a beginner course. You should read mongoui readme. It has everything explained step-by-step. Good luck. If you think instructions are lacking, then feel free to submit a pull request with a better instructions.

  2. Hello!
    It would be great sometime to see a video tutorial on how you setup MongoUI.
    These instructions are a bit vague to say the least. I’m on MacOSX.

    Where do you exactly create the node_modules directory?
    What exactly goes into the config.json file?
    Do I run my own index.js app or the index.js file in the node_modules directory?
    Do I simply view http://localhost:3000/ ?

    In your tutorials I often see the following:
    http://localhost:3000/host/localhost/dbs/app-development/collections/posts

    Is that a redirect? Is that type into the browser?

    Is this explained better anywhere in any of your online tutorials? I’m in the Mongoose one on Udemy, but that doesn’t explain at all about MongoUI other then rehashing the install on this blog. Would your Node Program on Udemy or any of your books have more clear insight into how you go about such installations? Thanks.

    In your courses you jump right in and assume everyone has this installed. I’m definitely enjoying your courses, but they are definitely not for beginners. Thanks and I’ll continue to plug away at your tutorials which I find very useful, however at times like with MongoUI, I’m pulling my hair out trying to track down what you’re doing….laugh. It’s a fun challenge.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.