Skip to content
An open source web application for building, managing, and playtesting Magic the Gathering cubes.
JavaScript CSS HTML
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update feature_request.md Aug 16, 2019
__tests__ test fixes Dec 7, 2019
config Swapped to external db, defined in secrets Sep 29, 2019
cubecobrasecrets.example Swapped to external db, defined in secrets Sep 29, 2019
docs add explanation for parsing logic Sep 15, 2019
fixtures Fix tests with respect to card images. Dec 4, 2019
models foils for autocard, setting in modal Dec 5, 2019
one_shot_scripts Apply prettier settings to entire codebase. Nov 20, 2019
public Merge pull request #731 from anderoonies/foil Dec 7, 2019
routes filtering and sorting for filterness Dec 5, 2019
seeds Development (#385) Sep 14, 2019
serverjs test fixes Dec 7, 2019
src beautify Dec 5, 2019
views Fix double-click on dropdowns. Dec 5, 2019
.babelrc babel-jest and fixes to make code babel-compliant, filterjs tests Nov 16, 2019
.bowerrc the first commit Jul 29, 2019
.eslintrc.json inital setup of prettier and eslint using airbnb standards Oct 31, 2019
.gitattributes the first commit Jul 29, 2019
.gitignore add python-version to gitignore for users of pyenv Oct 1, 2019
.jsbeautifyrc move .js-beautify.json to .jsbeautifyrc Sep 17, 2019
.prettierignore
.prettierrc making the print width 120 to keep up with current practices Nov 6, 2019
.travis.yml Make sure same prettier version gets installed. Nov 20, 2019
CONTRIBUTING.md
LICENSE the first commit Jul 29, 2019
README.md Update README.md Oct 18, 2019
app.js Revert debug values Nov 19, 2019
force_update.js Accidentally merged into master, moving to dev (#177) Aug 29, 2019
jest.config.js beautify Nov 16, 2019
nodemon.json
package-lock.json Remove request-promise as dependency. Nov 27, 2019
package.json Remove request-promise as dependency. Nov 27, 2019
populate_analytics.js
rollup.config.js Fix rollup issue. Oct 1, 2019
seed.js misc: run beautify to correct linter complaints Oct 1, 2019
webpack.common.js Created Analytics Script Nov 30, 2019
webpack.dev.js Revert debug values Nov 19, 2019
webpack.prod.js beautify Sep 19, 2019

README.md

CubeCobra

An open source web application for building, managing, and playtesting Magic the Gathering cubes.

Contributing

If you are interested in contributing towards Cube Cobra, please read the Contribution guidelines for this project.

Setup

Install Prerequisites

You will need to install NodeJS, MongoDB, and an IDE of your preference (I recommend Atom). You can find the necessary resources here:

NodeJS: https://nodejs.org/en/download/

MongoDB: https://docs.mongodb.com/manual/installation/

You will need start a MongoDB background process, and create a database titled nodecube. Refer to the official documentation for directions on how to set this up for your OS. Running use nodecube in the mongo CLI is sufficient.

Atom (optional): https://atom.io/

Clone Project

Clone the project into a folder of your choice. Create a symbolic link from ../cubecobrasecrets to cubecobrasecrets.example:

cd CubeCobra/..
ln -s CubeCobra/cubecobrasecrets.example cubecobrasecrets

The resulting directory structure should look like this:

.
├── CubeCobra               # Cloned repository
└── cubecobrasecrets        # link to `CubeCobra/cubecobrasecrets.example`
    └── email.js            # Email secrets file
    └── etc...

Then, run the following commands in the root of the cloned repository:

npm install
npm install nodemon -g
node force_update.js        # Download Scryfall assets.
node seed.js                # Seed the mongo database.

# Linux/OSX users
npm start                   # Start nodemon for backend server and webpack for frontend assets.

# Windows users will need to use 2 terminal instances.
npm nodemon
npm run-script webpack-dev-server

Alternatively, if you are on Windows, you can use bash to mimic the Linux/OSX steps: You will need to make sure you have bash installed somewhere and run the following command [with your bash path in place of the path below].

npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"

Then you can start the program like so:

npm start

You can now open up a browser and connect to the app through: http://localhost:8080. Despite the fact that node says it is running on port 5000, you should use port 8080 to connect.

Nodemon will restart the application anytime there is a change to a source file.

Running tests

To run the test suite, run npm run test

You can’t perform that action at this time.