Files
pathfinder/README.md
2015-09-22 21:14:54 +02:00

8.5 KiB
Raw Blame History

PATHFINDER

Mapping tool for EVE ONLINE

Beta Information

This project is still in beta phase and is not officially released! Feel free to check the code for security issues.

If you are looking for installation help, please check the wiki (DRAFT). More information will be added once the beta is over and the first stable build is released.

Setup

Backend (PHP)

PATHFINDER is pretty easy to configure! If you are not planning "getting your hands dirty" with programming stuff, you don´t have to change a lot. All configuration files can be found here:

The default configuration should be fine in most cases. Edit all values with caution!

Frontend (JS)

There is no need to change any javascript configuration, except Signature names that can be changed/added

If you found any Signature Names or other information missing in these files, please create an Issue for that! I´ll try to fix it with the next release. If you still want to change anything in here, make sure to run the build process afterwards (see below).

Development Environment

PATHFINDER comes along with a simple, Gulp based, build process. There are two main Gulp tasks that should help you.

  • default task is designed for "continuous development" scenario
  • production task is designed for "production deployment" scenario

If you are not planning to change the codebase, you don´t have to do the following steps!

1. Install Node.js(> v.4.0.1) with npm

2. Copy/Fork this Repo

$ git clone https://github.com/exodus4d/pathfinder.git

3. Install all required node_modules for "continuous development" from package.json (e.g.Gulp)

$ npm install

4. Run Gulp task default with your version tag as param. It will do:

  • clean dist folder (./public/js/x.x.x)
  • init file watcher for *.js changes
  • running jsHint on file change
  • copying raw *.js files from ./js to dist folder on file change
$ gulp default --tag v0.0.10

Production Environment

1. Install all required dependencies (check "Development Environment" steps )

2. Run Gulp task production with your version tag as param. It will do:

  • clean dist folder (./public/js/x.x.x)
  • running jsHint
  • running requireJs Optimizer (see build.js)
    • minify *.js files
    • uglyfy *.js files
    • combine *.js dependencies
    • generate .js source maps
    • copying compressed *.js to dist folder for production deployment
$ gulp production --tag v0.0.10

The production task may take some seconds (30+ seconds)! As a result, you should have all generated *.js files ready for deployment in the dist folder. The unique version tag in this path should ensure that cache busting is working correct.

CSS generation

If you are planning to change/edit any CSS styles, you need to install Compass, in order to build the single *.css file out of the raw *.scss source files.

1. Ruby install

2. Compass install

3. Start Compass file watcher for *.scss changes in project root (see config.rb)

$ compass watch

This will watch all *.scss files for changes and generate a compressed *.css file (./public/css/pathfinder.css). Don´t worry about cache busting. Your current version tag will be added to the final path (e.g. ./public/css/pathfinder.css?v.0.0.10)

Cronjob configuration

PATHFINDER requires some dynamic system data from CCP´s XML APIv2. This data is automatically imported by a Cron-Job into the DB.

Moreover, there are some predefined Cron-Jobs that handle some db maintenance and clean up tasks.

You have to setup a single Cron-Jobs for this, that handles all other Cron-Jobs and works as a "dispatcher".

  • Important: Block access to [YOUR INSTALLATION]/cron (e.g. by .htaccess or edit cron.ini)
  • Trigger [YOUR INSTALLATION]/cron by CLI every minute, e.g create cron.phpx:
exec('wget -qO- /dev/null [YOUR INSTALLATION]/cron &> /dev/null', $out, $result);
echo "start:";
echo "Returncode: " .$result ."<br>";
echo "Ausgabe des Scripts: " ."<br>";
echo "<pre>"; print_r($out);
  • ... or use CURL for this ;)

Project structure

  |-- (0755) app              --> backend [*.php]
      |-- app               --> "Fat Free Framework" extensions
      |-- lib               --> "Fat Free Framework"
      |-- main              --> "PATHFINDER" root
      |-- config.ini        --> config "f3" framework
      |-- cron.ini          --> config cronjobs
      |-- pathfinder.ini    --> config pathfinder
      |-- routes.ini        --> config routes
  |-- (0755) build_js       --> JS build folder and source maps (minified, uglified)
      |-- app               --> "PATHFINDER" core files
      |-- lib               --> 3rd partie extension/library
      |-- build.txt         --> generated build summary
  |-- (0755) js             --> JS source files (raw)
      |-- app               --> "PASTHFINDER" core files (not used for production )
      |-- lib               --> 3rd partie extension/library (not used for production )
      |-- app.js            --> require.js config (!required for production!)
  |-- (0777) logs           --> log files
      |-- ...
  | -- node_modules         --> node.js modules (not used for production) [check "Development Environment"]
      |-- ...
  |-- (0755) public         --> frontend source
      |-- css               --> CSS dist/build folder (minified)
      |-- fonts             --> (icon)-Fonts
      |-- img               --> images
      |-- js                --> JS dist/build folder
      |-- templates         --> templates
  |-- sass                  --> SCSS source (not used for production )
      |-- ...
  |-- (0777) tmp            --> cache folder
      |-- ...
  |-- (0755) .htaccess      --> reroute/caching rules
  |-- (0755) index.php

  --------------------------
  CI/CD config files:
  --------------------------
  |-- build.js              --> "RequireJs Optimizer" config (not used for production )
  |-- config.rb             --> "Compass" config (not used for production )
  |-- gulpfile.js           --> "Gulp" task config (not used for production )
  |-- package.json          --> "Node.js" dependency config (not used for production )
  |-- README.md             --> This file :) (not used for production )

Thanks!

I´m very proud that you are using PATHFINDER!

It took me month of time in development until this project got into the first BETA. If you like it, please help to improve it. (report bugs, find security issues,...)