PostgresSQL database reader made for Ruby on Rails applications.
Clone or download
mikallwilsonn Merge pull request #59 from MonetizeDesignTeam/remove-logs
Cleaned up unneccessary console logs left from previous commit
Latest commit f109853 Apr 24, 2018

README.md

Phantdom - Rails Database Manager

http://www.phantdom.com/

Version: 0.0.4.beta

PostgresSQL database reader made for Ruby on Rails applications.


JavaScript Style Guide


Style Guide


#018dfd

#d85965

#262c36

#f6f8fa

All logos can be found in app/assets/images and for release builds inside the build folder.

We will try to use "native" UI for each operating system. Default is Mac: http://photonkit.com/components/


Run App 🤯

To run the app you must first have Node installed on computer and NPM.

Install dependencies: npm install or npm i

Blank Screen / Node Version Rebuild

Rebuilds native Node.js modules against the version of Node.js that your Electron project is using.

npm run npm-rebuild-electron

This is the electron version of running npm rebuild to make sure all node modules are compiled under same version.

Start App

Run app: npm start

While the app is running you have access to the Chrome Developer tools. Right click > Inspect Element. Best to have it detached rather than docked.


App Structure 😃

  • package.json
  • main.js
  • app/application.html
  • app/renderer.js

The app is loaded in that order, the package.json for Node modules and then the main.js file loads the main window for the app which is the app/application.html file which loads up HTML and makes all global variables then loads up renderer.js.

All the events such as Click, Change, etc are handled inside of the renderer.js file. Each section of the app has it's own directory inside of app/javascripts which will have a corresponding events.js file. This is the point of entry after an event into the code for that section.

Example: Once a postgreSQL database table is clicked in sidebar, the renderer file triggers that event on click and then checks events file in app/javascripts/postgres/table/events.js which then sets up a module/function in another file. In this case it would be app/javascripts/postgres/table/connect.js


Run Tests 🤩

To run the tests, make sure to learn Mocha, Chai & WebDriver.

  • You need PostgreSQL running on machine.
  • You need Ruby + Ruby on Rails on machine.

Run npm run build-rails inside of app directory. This will setup the rails app in which the tests run on.

Run tests with npm test in terminal.


Build for Mac 😐

Run npm run build to run using Electron-Builder


Release for Auto-Updater 😑

Run npm run release to run using Electron-Builder + Upload to S3 which should provide users with new update.


Hound + ESLint 😶

Use an eslint plugin for Atom or Visual Studio code.


Update README.md File 🤓

If you add a new function or global variable add it to list in .eslintrc

If you add new NPM modules make sure to run npm run readme to generate new list in README.md file.

  • Install new NPM Packages
  • Scripts (build, test, readme, etc)
  • Launch status + versions

Scripts 😎

  • npm run start : electron .
  • npm run test : export MOCHA=true; DEBUG=true mocha tests --no-timeouts --bail; unset MOCHA
  • npm run eslint : eslint './'
  • npm run npm-rebuild-electron : electron-rebuild
  • npm run build-rails-db : cd ruby_on_rails; rake db:create; rake db:migrate; cd ../
  • npm run readme : node ./node_modules/.bin/node-readme
  • npm run build : electron-builder
  • npm run release : build
  • npm run circleci-test : mocha tests --reporter mocha-multi-reporters --reporter-options configFile=.mocha-config.json --no-timeouts --bail
  • npm run nyan : export MOCHA=true; DEBUG=true mocha tests --no-timeouts --bail --reporter nyan; unset MOCHA

Dependencies 🤠

Automatically monitored for updates by Dependabot.

Package Version Dev
anchorme ^1.1.2
bootstrap ^4.1.0
capitalize ^1.0.0
country-codes 0.0.3
datatables ^1.10.13
datatables.net-buttons ^1.5.1
dotenv ^5.0.1
electron-context-menu ^0.9.1
electron-drag ^1.2.0
electron-is-dev ^0.3.0
electron-store ^1.3.0
electron-tooltip ^1.1.5
electron-updater ^2.21.8
exec ^0.2.1
fix-path ^2.1.0
jquery ^3.3.1
jquery.terminal ^1.14.0
moment ^2.22.1
mousetrap ^1.6.1
noty ^3.2.0-beta
npm ^5.8.0
numeral ^2.0.6
perfy ^1.1.2
pg-native ^2.2.0
pluralize ^7.0.0
popper.js ^1.14.3
shelljs ^0.8.1
squel ^5.12.1
chai ^4.1.2
devtron ^1.4.0
electron 2.0.0-beta.7
electron-builder ^20.10.0
electron-publisher-s3 ^20.9.0
electron-rebuild ^1.7.3
eslint ^4.19.1
eslint-config-standard ^11.0.0
eslint-plugin-import ^2.11.0
eslint-plugin-node ^6.0.1
eslint-plugin-promise ^3.7.0
eslint-plugin-standard ^3.0.1
mocha ^5.1.1
mocha-junit-reporter ^1.17.0
mocha-multi-reporters ^1.1.7
mocha-reporter ^0.1.1
node-readme ^0.1.9
spectron ^3.8.0
standard ^11.0.1

Contributors 🤑


Wynter Jones
commits

Michael Wilson
commits

Matthew Carmody
commits

Copyright 2018 Wynter Jones - https://www.monetizedesign.com

View the License here: https://github.com/MonetizeDesignTeam/phantdom/blob/master/LICENSE.md