Git Product home page Git Product logo

mongoui's Introduction

MongoUI: MongoUI (mongoui) is a web (browser) admin interface for MongoDB.

MongoUI is an open-source web and desktop app which allows to administer local and remote MongoDB instances via GUI. No need to type commands in a terminal anymore. Convenient interface will allow to create, update, remove and filter/search documents. You can switch between collections or even databases with just a single click.

Currently a standalone tool (run as an app locally or on your server); desktop app later. This is a brand new v2 of MongoUI. Old version use DerbyJS, then new version uses Webpack, React, React Router, React Bootstrap and of course Express and Node.

MongoUI v2 looks like this (gif):

Here's another short video that shows filtering, editing, and switching collections:


Why

Tired of typing db.users.findOne({_id:ObjectId(...)}) just to look up data structure. Even more typing to modify the data. Not happy with the user experience of other MongoDB admin tools?

Meet MongoUI! Alternative to exprss-mongo and Robomongo.


Installation

npm i -g mongoui
mongoui

Dev Installation

Download MongoUI

SSH:

git clone [email protected]:azat-co/mongoui
npm i

or HTTPS

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

or CURL

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

or WGET

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

Install Dependencies

npm i

Usage

Build and Run MongoUI in Regular Mode

npm start

Then, open http://localhost:3001 in your favorite browser. Enjoy!

Build and Run MongoUI in Development (Hot-Reload) Mode

Front-end development in one terminal:

npm run start-dev

Open http://localhost:3000/ in your favorite browser.

Note: there are two ports, 3001 and 3000. In dev mode you need to go to 3000, in regular mode, navigate to 3001. This is because in dev mode, we are using webpack dev server on 3000 and the API (index.js) is alway on 3001.


Additional Tasks

You'll need MongoDB running for MongoUI to work:

mongod

Front-end build:

npm run build

Configs

Configurations are in the config.json file. Modify as needed (remote databases should work just fine!).

{
  "database": {
    "default": {
      "host": "localhost",
      "port": 27017,
      "name": "mongoui",
      "username": "",
      "password": ""
    }
  }
}

Branches

  • Master โ€” major releases, main branch
  • Develop โ€” current development branch (make your pull requests here)

Contributors

Via git shortlog -s -n:

    83  azat-co
    67  Azat Mardan
    65  Azat Mardanov
    26  Tom2277
    14  cultofmetatron
    12  Will Hart
     1  Sam Tobia
     1  Jan Carlo Viray

TODO

The list is in the GitHub Issues.

How to contribute in the CONTRIBUTING.md

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

License

License is in LICENSE.md

mongoui's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mongoui's Issues

Windows compatibility

It's quite unfriendly to the user in windows since the syntax is linux-only in package.json.

Anyway nice work!

Unable to load completely, stop webpack:///./~/fbjs/lib/warning.js?8a56

warning.js?8a56:36 Warning: Unknown prop alt-text on tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
in img (created by navbarInstance)
in a (created by navbarInstance)
in NavbarBrand (created by navbarInstance)
in div (created by NavbarHeader)
in NavbarHeader (created by navbarInstance)
in div (created by Grid)
in Grid (created by Navbar)
in nav (created by Navbar)
in Navbar (created by Uncontrolled(Navbar))
in Uncontrolled(Navbar) (created by navbarInstance)
in navbarInstance

request.js?a434:117 GET http://localhost:3001/api/dbs net::ERR_CONNECTION_REFUSED

content.jsx?c7f5:24 Uncaught TypeError: Cannot read property 'databases' of undefined(โ€ฆ)

3 error on my Google Chrome console log. No idea how to solve it

Global installation does not work

Hello,

Thanks for this great tool. However, if you try to install it using the global option it does not work

  1. npm i -g mongoui
  2. mongoui
module.js:472
    throw err;
    ^

Error: Cannot find module 'express'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/mongoui/index.js:6:17)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

Could you please take a look?

node version: v7.4.0
OS: mac osx el capitan

If you try to install express, then what fails is body-parser, then compression, then express-handlebars... I don't understand why, seems the dependencies on the package.json are correct.

Thanks and regards

npm WARN [email protected] requires a peer of mongodb@~2.0 but none was installed.

I am just trying to install mongoui, I install it, then run npm i, my package.json looks like this, I've tried the earlier version of mongodb work around but it didn't work either:

`[ec2-user@ip-10-0-0-119 html]$ sudo npm i

npm WARN [email protected] requires a peer of mongodb@~2.0 but none was installed.
GNU nano 2.5.3 File: package.json

{
"name": "lopu",
"version": "1.0.0",
"description": "ai",
"main": "index.js",
"dependencies": {
"mongoui": "^4.0.5",
"mongodb": "^2.0.0"

},
"devDependencies": {},
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"repository": {
"type": "git",
"url": "lopu"
},
"keywords": [
"ai"
],
"author": "lopu",
"license": "ISC"
}

`

Remove Database/Collection

Will be good if add possibility to remove Database and Collection in similar way as Collection records.

error

(node:8) UnhandledPromiseRejectionWarning: Error: Exited with code 3
, at Pipe._handle.close (net.js:607:12)
, at Socket.stream.socket.on (internal/child_process.js:389:11)
, at Socket.emit (events.js:198:13)
, at maybeClose (internal/child_process.js:982:16)
, at Object.onceWrapper (events.js:286:20)
, at ChildProcess. (/usr/local/lib/node_modules/mongoui/node_modules/opn/index.js:83:13)
, at ChildProcess.emit (events.js:198:13)
,(node:8) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
,(node:8) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

giving error on live server

Mongoui web app is listening on: 3001
(node:6765) UnhandledPromiseRejectionWarning: Error: Exited with code 3
at ChildProcess. (/usr/local/lib/node_modules/mongoui/node_modules/opn/index.js:83:13)
at Object.onceWrapper (events.js:286:20)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Socket.stream.socket.on (internal/child_process.js:389:11)
at Socket.emit (events.js:198:13)
at Pipe._handle.close (net.js:606:12)
(node:6765) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6765) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Make the filter to accept Boolean, ObejctID, Number

The query (which is a JSON object) for Booleans, ObjectID and Numbers needs to be different in syntax than what we have right now (String).

Try to automatically detect the type with the ability for users to correct the choice via radio buttons.

Requires both FE code and BE code.

Make nested objects work in the Edit mode

Currently there is not deep parsing of objects in the editor. The JSON gets transformed into an array, can be solved by adding recursive call if typeof is object, similar to how JSON.stringify works.

Status

Is this project dead?

Problem Connecting to Replica Sets?

Seems that I can't get the config set correctly to connect to a replica set.

I can properly connect to a local non-replica MongoDB database, however when I put in replica set information it fails with not authorized for query on <db_set_in_config>.system.namespaces

Failing replica config:

{
  "database": {
    "default": {
      "host": "<db1_url>,<db2_url>",
      "port": 27017,
      "name": "<db_set>",
      "username": "<username>",
      "password": "<password>"
    }
  }
}

Working Non-Replica Config:

{
  "database": {
    "default": {
      "host": "localhost",
      "port": 27017,
      "name": "some_database",
      "username": "",
      "password": ""
    }
  }
}

Anyone else run into this issue?

gitignore bundle.js and/or libaries

I included the directory public/js in the gitignore file in a recent merged pull request. The master also has pubic/gen ignored . Was it correct to ignore that entire js directory or is it important to save version controlled static versions of the bootstrap and jquery libraries? Was bundle.js intended to be generated into a directory named public/gen?

change port number

Add ability to change the port number in case port 3001 is not available.

For example:

mongoui --port 3002

unable access database from domain

Hello,
I want to access my domain's database, how can I do it. I tried to put my domain in variable "PUB_API_HOST" but I always get the same error "Connecting to the database...
If nothing happens, check that your database is running and accessible.
For example, with the command "mongod" the database will run on localhost:27017.
See more instructions at https://github.com/azat-co/mongoui" and in the console it still shows me localhost:3001. What should I do to resolve this error?

Translated with www.DeepL.com/Translator (free version)

feature display of query results : enhancement

I've coded a display augmentation for returned records after query.

  1. forced the existing "query-applied" popover to display by default(without hover needed) when an active query has been applied. It feels like when you're seeing a partial list it would be nice to have that information actively displayed.

  2. included the fields and truncated values of queries in the "button" /link previews of returned results below the object._ids currently displayed.

screenshot:

query-values-displayed

Should I make a pull request to master with these display additions , or with tweaks suggested?

Should we have a fresh development branch for this type of feature/suggestion?

Infinite refreshing

As soon as I select the database the page keeps refreshing and never stops.It basically disconnects and re-connects

Screenshots

Add screenshots of v0.2 to the readme.md file

react peer dependency issues

`npm WARN package.json [email protected] No license field.
npm WARN deprecated [email protected]: Not maintained anymore
npm WARN peerDependencies The peer dependency react@^0.14.0 included from redux-devtools will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN optional dep failed, continuing [email protected]
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN optional dep failed, continuing [email protected]
npm ERR! Linux 3.19.0-58-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants react@>=0.14.0
npm ERR! peerinvalid Peer [email protected] wants react@^0.14 || ^15
npm ERR! peerinvalid Peer [email protected] wants react@^15.0.1
npm ERR! peerinvalid Peer [email protected] wants react@^0.14.0 || ^15.0.0-rc.1
npm ERR! peerinvalid Peer [email protected] wants react@^0.14.0
`

baseUrl auto or in config

Please, do not hardcode the baseurl

let baseUrl = 'http://localhost:3001'

use relative url or at least, a config file.
Thx

Test coverage

Add tests and integrate with Travis. Put an icon in readme.md

  • seed data
  • call method and/or make a request
  • check for the date
  • modify date
  • check for the updated data

Collections named with "." missing full name

If you have a collections that contain "." the collection selection dropdown only renders the name upto the "." char.

For example, if I have a collections named :

  • Foo.Bar
  • Foo.Baz

The collection drop down lists :

  • Foo
  • Foo

Failed at the [email protected] start script 'node node_modules/nodemon/bin/nodemon.js index.js'.

Hello,
I am having an issue with Mongoui, I cannot seem to get it started up. Do see below my error message from the npm log, I am not quite sure what is going on though. I have apt-get upgraded my npm and have nodejs installed, I also symlinked nodejs to node, etc on Ubuntu 16. Any help would be appreciate!

Thanks,

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 silly lifecycle [email protected]
prestart: no script for prestart, continuing
7 info lifecycle [email protected]start: [email protected]
8 verbose lifecycle [email protected]
start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]start: PATH: /usr/share/npm/bin/node-gyp-bin:/usr/local/lib/node_modules/mongoui/node_modules/.bin:/usr/local/lib/node_modules/.bin:/root/bin:/root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
10 verbose lifecycle [email protected]
start: CWD: /usr/local/lib/node_modules/mongoui
11 silly lifecycle [email protected]start: Args: [ '-c', 'node node_modules/nodemon/bin/nodemon.js index.js' ]
12 silly lifecycle [email protected]
start: Returned: code: 1 signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: node node_modules/nodemon/bin/nodemon.js index.js
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/usr/share/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at EventEmitter.emit (events.js:172:7)
14 verbose stack at ChildProcess. (/usr/share/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at ChildProcess.emit (events.js:172:7)
14 verbose stack at maybeClose (internal/child_process.js:821:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid [email protected]
16 verbose cwd /usr/local/lib/node_modules/mongoui
17 error Linux 4.4.0-36-generic
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
19 error node v4.2.6
20 error npm v3.5.2
21 error code ELIFECYCLE
22 error [email protected] start: node node_modules/nodemon/bin/nodemon.js index.js
22 error Exit status 1
23 error Failed at the [email protected] start script 'node node_modules/nodemon/bin/nodemon.js index.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the mongoui package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node node_modules/nodemon/bin/nodemon.js index.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs mongoui
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls mongoui
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

startup errors after installation

Hello,
I did the following:
git clone [email protected]:azat-co/mongoui
npm install
Copy config_default.json file as config.json
node index.js

I get:

daslicht@vps58220:~/mongoui$ node index.js

module.js:340
    throw err;
          ^
Error: Cannot find module 'connect/lib/middleware/session/cookie'
  at Function.Module._resolveFilename (module.js:338:15)
  at Function.Module._load (module.js:280:25)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/home/daslicht/mongoui/node_modules/derby/node_modules/racer/lib/session/session.Store.js:2:14)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/home/daslicht/mongoui/node_modules/derby/node_modules/racer/lib/session/index.js:1:80)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at plugin (/home/daslicht/mongoui/node_modules/derby/node_modules/racer/lib/racer.server.js:123:10)
  at EventEmitter.module.exports.use (/home/daslicht/mongoui/node_modules/derby/node_modules/racer/lib/plugin.js:41:7)
  at Object.<anonymous> (/home/daslicht/mongoui/node_modules/derby/node_modules/racer/lib/racer.js:31:9)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/home/daslicht/mongoui/node_modules/derby/lib/derby.js:1:75)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/home/daslicht/mongoui/index.js:23:13)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Function.Module.runMain (module.js:497:10)
  at startup (node.js:119:16)
  at node.js:902:3

daslicht@vps58220:~/mongoui$ 

What am I missing ?

API host/port does not correctly configure

Maybe I am missing something here, but it looks like the config options to set the API base host doesn't take effect. I know the settings file is being picked up because it correctly connects to my remote Mongo DB, but the UI bindings still show localhost. In my web browser I get a connection refused showing that the UI is trying to call localhost:3001/api/dbs when I've set public.api.host in the settings file to some other value.

NPM Warnings...

Hi, I just executed npm install, using lates source on master branch,
and I get the following npm warnings

npm WARN deprecated [email protected]: deprecated, use lowercase '[email protected]' from now on
npm WARN deprecated [email protected]: Package not maintained. Recent browserify uses https://github.com/feross/buffer

Regards.

Mongo authentication (for project collab)

Hello currently working on FastyAPI and the following is required for me to apply mongoui in the project :
Add some sort of authentication (login page)
In order or my users to login with their admin user and easily view their mongodb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.