An application for managing access for EVE Online players to external services of an alliance.
Objectives:
- Management of groups for players.
- An API for applications to read these groups (and more).
- Access to ESI data of all members.
- Login via EVE SSO.
For more information, see the doc
directory, including Documentation,
an API overview, and some screenshots.
This project consists of two applications, the Backend and the Frontend.
A preview/demo installation is available at https://neucore.herokuapp.com.
- Visit https://developers.eveonline.com or https://developers.testeveonline.com
- Create a new application (e.g.: Neucore DEV)
- Connection Type: "Authentication & API Access", add the required scopes. Scopes for the backend are configured with the environment variable BRAVECORE_EVE_SCOPES.
- Set the callback to https://your.domain/login-callback
- PHP >=7.1.3 with Composer, see
backend/composer.json
for necessary extensions - Node.js >=8.12.0 with npm (tested with LTS versions 8 and 10, npm 6)
- MariaDB or MySQL Server (tested with MySQL 5.7, 8.0 and MariaDB 10.3, 10.4)
- Apache or another HTTP Server
- Set the document root to the
web
directory. - A sample Apache configuration is included in the Vagrantfile file and there is a .htaccess file in the web directory.
- A sample Nginx configuration can be found here docker-nginx.conf
- Set the document root to the
- Java 8+ runtime (only for openapi-generator)
If your're using the pre-build releases, you only need PHP, a Database and a HTTP Server (not Composer, Node.js or Java).
Clone the repository or download the distribution (the distribution does not require Composer, Node.js or Java).
Copy backend/.env.dist
file to backend/.env
and adjust values or
set the required environment variables accordingly.
Make sure that the web server can write to the log and cache directories, by default
backend/var/logs
and backend/var/cache
.
Please note that both the web server and console user write the same files to the cache directory, so make sure they can override each other's files, e. g. by putting them into each other's group (the app uses umask 0002 when writing files and directories).
If available, the app uses the APCu cache in production mode. This must be cleared during an update (depending on the configuration, restart the web server or php-fpm).
If you downloaded the .tar.gz file, you only need to run the database migrations and seeds and clear the cache.
If you are using a different cache directory, you must first copy or generate the Doctrine proxy cache files:
cp -R backend/var/cache/proxies /path/to/your/cache/proxies
# or
cd backend
vendor/bin/doctrine orm:generate-proxies
Then execute (adjust cache path if necessary)
cd backend
rm -rf var/cache/di
vendor/bin/doctrine-migrations migrations:migrate --no-interaction
bin/console doctrine-fixtures-load
If you have cloned the repository, you must install the dependencies and build the backend and frontend:
./install.sh
# or
./install.sh prod
Set up necessary cron jobs, e. g. 3 times daily (adjust user and paths):
0 4,12,20 * * * neucore /var/app/backend/bin/run-jobs.sh
The output is logged to backend/var/logs.
Read the backend documentation on how to make yourself an admin, then you can navigate to "Admin" -> "Settings" and change texts, links and images that are specific to your installation.
Only tested with Vagrant 2 + libvirt.
vagrant up
creates and configures the virtual machine.- If the Vagrant file changes, run
vagrant provision
to update the VM. vagrant destroy
will completely remove the VM.
Please note that the rsync
synchronization method used is a one-way synchronization from host to virtual
machine that is performed each time vagrant up
or vagrant reload
is executed.
See https://www.vagrantup.com/docs/synced-folders for other methods.
The Vagrant setup will create the file backend/.env
with correct values for the database connection.
The values for the EVE application must be adjusted.
Create the backend/.env
file.
Execute the following to start the containers and build the app:
$ export UID
$ docker-compose up -d
# Install backend
$ docker-compose run composer install
$ docker-compose run composer composer compile
# Generate OpenAPI JavaScript client
$ docker-compose run java /app/frontend/openapi.sh
# Build frontend
$ docker-compose run node npm install
$ docker-compose run node npm run build
# Install Swagger UI
$ docker-compose run node npm install --prefix /app/web
Browse to http://localhost:8080
Stop containers: docker-compose stop
Create database for unit tests
$ docker exec neucore_db sh -c 'mysql -e "CREATE DATABASE IF NOT EXISTS neucore_test" -pneucore'
$ docker exec neucore_db sh -c 'mysql -e "GRANT ALL PRIVILEGES ON neucore_test.* TO neucore@\"%\" IDENTIFIED BY \"neucore\"" -pneucore'
Known problems:
- Unit tests that need the database don't work: "Aborted connection to db" errors.
You can deploy the application on a free Heroku account.
- Create a new app
- Add a compatible database, e. g. JawsDB Maria.
- Add the necessary config vars (see
backend/.env.dist
file) and set the following:- BRAVECORE_LOG_PATH=php://stderr
- Add build packs in this order:
heroku buildpacks:add heroku/java
heroku buildpacks:add heroku/nodejs
heroku buildpacks:add heroku/php
The software was originally developed for the Brave Collective, when CCP shut down the old API and we had to replace our Core system.
This is also where the name "Neucore" comes from.
- neucore-api PHP OpenAPI client
- neucore-api-python Python OpenAPI client
- Neucore connector boilerplate An example application that uses EVE SSO and Neucore groups for access control.
- A TimerBoard (based on the boilerplate).
- Neucore integration with other apps: EVE-SRP, phpBB, Mumble.
If you have any questions or feedback, you can contact Tian Khamez on Tweetfleet Slack (get invites here).
Just a quick reminder to myself of how to generate the tables of contents:
npm install -g markdown-toc
markdown-toc README.md -i
markdown-toc doc/documentation.md -i
markdown-toc doc/API.md -i
markdown-toc backend/README.md -i
markdown-toc frontend/README.md -i