• This repository has been archived on 21/Dec/2022
  • Stars
    star
    872
  • Rank 52,322 (Top 2 %)
  • Language
    JavaScript
  • License
    GNU Affero Genera...
  • Created over 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

State of the art MongoDB IDE

dbKoda [No Longer Maintained]

Note: Unfortunately this project is no longer under active development.

State of the art MongoDB IDE

CQUTesting dependencies devDependencies

dbKoda is a modern (JavaScript/Electron framework), open source IDE for MongoDB. It has features to support development, administration and performance tuning on MongoDB databases. It has a rich feature set, including:

  • Rich text editor with auto-complete, syntax highlighting and code formatting
  • Visual explain plan with indexing advisors
  • A real time performance dashboard
  • Graphical aggregation and command builders
  • One-click access to MongoDB administration commands
  • Disk Storage analysis
  • SQL queries using Apache Drill
  • Data load and unload utilities
  • and a lot of moreโ€ฆ check our blogs and website for details.

Download latest release: v1.1.0 Download latest beta release: v1.1rc9

This repository defines dbKoda's building, user acceptance testing (UAT), launching and packaging workflows.

Requirement

Setup

  1. Make sure dbkoda-ui, dbkoda-controller and dbkoda are sibling folders to each other within a same parent folder, e.g:
root_folder
โ”œโ”€โ”€ dbkoda-ui
โ”œโ”€โ”€ dbkoda-controller
โ””โ”€โ”€ dbkoda
  1. [Important] In dbkoda, run the following command yarn dev:link. This is only needed for the first setup. If you are installing on windows, use yarn dev:link:win.
  2. Run yarn install within all 3 repos.
  3. To build a new the app, yarn run pack. For Windows, use yarn pack:win.
  4. To build a version of the app, run yarn run dist:dev (without compression) and yarn run dist (with normal compression). For Windows, use the command yarn dist:win.
  5. [optional] After you have tried above commands, your dbkoda-controllerโ€™s native modules will be built against electronโ€˜s node version. If you want to go back to 'byo' mode, you need to run yarn dev:rebuild:current to rebuild these native modules against your current node version.
  6. [optional] If you encounter errors or irregularities during any of these steps, you can run rm -rf node_modules within each of the repositories, and then run yarn install again. If you are still having troubles, please check our FAQs or raise a new topic at our support site

Config

You can config dbKoda by putting a config.yml in your dbKoda home folder as follows:

# Note: please use full path for all commands

# Local mongo binary path. dbKoda will detect your mongo binary upon first launch in your login
# shell
mongoCmd: /usr/local/bin/mongo

Docker Config

Please configure docker command if you are using mongo shell through a docker container:

dockerEnabled: true
docker:
  mongoCmd: docker run -it --rm mongo mongo
  mongoVersionCmd: docker run --rm mongo mongo --version

Below configuration is used to run mongo shell through existed docker container:

dockerEnabled: true
docker:
  mongoCmd: docker exec -it CONTAINER_ID mongo
  mongoVersionCmd: docker exec CONTAINER_ID mongo --version

Please configure the mongo os commands if you want to use backup/restore through docker container. You need to specify the mount points for the docker container in order to backup/resore your mongo file. Otherwise, the data you backedup will be wipped after the container exist.

dockerEnabled: true
docker:
  mongoexportCmd: docker run --rm -v OS_PATH:CONTAINER_PATH mongo mongoexport
  mongoimportCmd: docker run --rm -v OS_PATH:CONTAINER_PATH mongo mongoimport
  mongodumpCmd: docker run --rm -v OS_PATH:CONTAINER_PATH mongo mongodump
  mongorestoreCmd: docker run --rm -v OS_PATH:CONTAINER_PATH mongo mongorestore

dbKoda Home Folder

Mac & Linux: ~/.dbKoda/ Windows: c:\Users\<username>\.dbKoda\

Development

In development mode dbKoda has four running modes: byo, super_dev, dev and prod

Bring Your Own (BYO) Dev Mode (byo)

You can separately launch your own copy of dbkoda-ui or dbkoda-controller to be used by dbkoda in this mode. You should unlink dbkoda-ui and dbkoda-controller from dbkoda in this mode to avoid unwanted interference.

Start BYO mode using the commands yarn run byo or yarn byo.

Super Dev Mode (super_dev)

Hot-reloading of dbkoda-ui is enabled in this mode. When app launches, Webpack needs some time to package the UI for the first time, so the launching speed is much slower than other modes.

yarn run super or yarn super

Dev Mode (dev)

yarn run dev or yarn dev

Devtron

Devtron is an Electron DevTools extension to help you inspect, monitor, and debug your app, to install Devtron, follow the steps below.

  1. yarn add -D devtron
  2. Run require('devtron').install() in Chrome DevTools. In either BYO or Super Dev mode, you should run this in DevTools of splash screen window. You can kill dbkoda-ui, and create a new window (cmd+n) in electron, so a new splash screen window will keep shown. This step is only needed for first time installation.

React DevTools

React component tree inspector extension for Chrome DevTools

  1. yarn add -D electron-react-devtools
  2. Run require('electron-react-devtools').install() in Chrome DevTools. In either BYO or Super Dev mode, you should run this in DevTools of splash screen window. You can kill dbkoda-ui, and create a new window (cmd+n) in electron, so a new splash screen window will keep shown. This step is only needed for first time installation.

Transpiling ES6 Code

yarn run build or yarn build

Cleaning up Transpiled ES6 Code

yarn run clean

Packaging into App (prod)

yarn run pack

To Pack for windows yarn run pack:win

Packaging into Installer (prod)

With normal compression (around 3 min):

yarn run dist or yarn dist

Fow Windows: yarn run dist:win or yarn dist:win

Without compression (fastest, around 1 min):

yarn run dist:dev or yarn dist:dev

Testing

Following commands will run all test suites under tests. To run a particular test suite, e.g. example1.test.js and example2.test.js with jest:dev command:

yarn jest:dev "example[1,2].test.js"

Development (byo)

This will run eslint and jest against unpacked app

yarn test or yarn test:dev

Production (prod)

This will run eslint then jest against packed app

yarn test:prod

Jest only (byo)

This is spectron based UAT

yarn jest:dev

Jest only (prod)

Similar to previous one, but run jest against packed app

yarn jest:prod

Run only

Run jest against previously packed app

yarn jest:prod:runonly

UAT Test

Set up below environment variables for UAT testing:

  • EC2_SHARD_CLUSTER_HOSTNAME
  • EC2_SHARD_CLUSTER_USERNAME
  • EC2_SHARD_CLUSTER_PASSWORD
  • ATLAS_SERVER_HOSTNAME
  • ATLAS_SERVER_USERNAME
  • ATLAS_SERVER_PASSWORD

More Repositories

1

dbkoda-data

Sample data for MongoDB
JavaScript
58
star
2

dbkoda-ui

dbKoda UI built with state of the art React stack
JavaScript
23
star
3

proofable-image

Build trust into your image by creating a blockchain certificate for it
Go
17
star
4

dbkoda-controller

dbKoda Controller built with state of the art Feathers stack
JavaScript
16
star
5

mongoblock-proof

JavaScript
14
star
6

provendocs

Provendocs is a blockchain enabled document storage service built on ProvenDB.
JavaScript
12
star
7

provendb-verify

ProvenDB Open Source Verification CLI
Go
12
star
8

provenlogs

Continuously Prove Your Server Logs on Blockchain with ProvenDB to Verify Their Ownership and Existence
Go
11
star
9

provendb

Take MongoDB, add Blockchain, stir.
JavaScript
9
star
10

proofable

General purpose proving framework for certifying digital assets to public blockchains
Go
9
star
11

provendb-docker-compose

Docker Compose to run ProvenDB services together
JavaScript
4
star
12

dbkoda-linux

dbKoda for Linux
JavaScript
3
star
13

dbkoda-mac

dbKoda for Mac
JavaScript
3
star
14

provendb-sdk-go

The ProvenDB SDK for Go.
Go
3
star
15

provendb-sdk-node

The ProvenDB SDK for Node.
JavaScript
2
star
16

provendb-node-driver

NodeJS driver for ProvenDB.
JavaScript
2
star
17

dbkoda-win

dbKoda for Windows
JavaScript
2
star
18

provendb-cs-tests

Integration tests for provendb-cs
JavaScript
1
star
19

test-utils

Test utils classes for test cases.
JavaScript
1
star
20

provendb-oracle

Oracle connector for ProvenDB, adding Blockchain to the existing database.
JavaScript
1
star
21

photo-mosaic

Write a Mosaic generator in Javascript
JavaScript
1
star
22

provendb-helm

Helm charts to run ProvenDB database service in a K8S cluster
Mustache
1
star