monovertex / ygorganizer

Source for http://ygorganizer.com
MIT License
8 stars 4 forks source link

YGOrganizer

This web application provides an easy to use interface for Yu-Gi-Oh! players and collectors to manage their card and decks collections.

This repository is meant to streamline any future community efforts in developing the application and also provide issue tracking, in order to follow new features, improvements and bugs with ease.

Installation Instructions

I. Initial setup

This application has only been tested on a Linux distribution (namely Ubuntu Server) and the installation process is intended for a Linux distro. Windows folks, you're on your own, but I disagree with using Windows as a server environment.

You will need to install the following software:

II. Front-end

The front-end uses Require.js to modularize Javascript code and LESS for the styling. While in debug (dev) mode, the R.js modules do not need compilation / optimization, but the LESS files still need to be pre-compiled.

You will have to run npm install inside the source directory. This will install all the required packages from package.json.

You can compile all the files for development mode using the command grunt. In order to auto-compile files while editing them, run grunt watch.

To compile files for the production environment (concatenation, minification), run grunt prod.

III. Back-end

For the back-end, I recommend that you use virtualenv to isolate the development environment for this project. Initialize the virtualenv to your desired location, then activate it. Use pip to install the required packages using the command pip install -r <path/to/source/directory>requirements.txt.

Note: pyquery uses lxml, which might cause problems during installation. If so, start from their installation instructions and see how to properly install it on your distribution.

After everything is install, you should configure all the required settings and configuration / running files. Copy settings.example to settings and start replacing everything between <...> with the relevant data.

Then, head on to the conf folder and do the same thing for the local and prod folders (or only local, if you don't intend to simulate the production environment).

Finally, database. Make sure you completed the correct database credentials in the settings files, create the correct database in your MySQL server and also make sure the virtualenv is activated, then run python manage.py migrate from the source folder. This will create all the tables required.

As data, you can use this MySQL Dump and this media folder archive. If you use the MySQL dump you'll no longer need to run the above migrate command. The media folder contents should go into the media folder path you defined in your Django settings.

Note: The media folder is a huge file (2GB).

All that remains now is to actually run the necessary processes. Use the script conf/local/run.sh. If you want importing and automatic price data fetching to work, also run celery.sh and, optionally, flower.sh for Celery monitorization.

If you wish to simulate the production, you will have to use Supervisor for that or run the commands from supervisord.conf manually.

Optionally, you can also use nginx and link the nginx.conf file in /etc/nginx/sites-enabled. Make sure you get all the ports right. Nginx will serve all static files that exist and upstream every other request to Django.

If you have any question or issue, contact me at contact@ygorganizer.com or post a question in the issues section.

Repository Guidelines

Contributors and important mentions

Thank you,