Skip to content

brakenium/niumside-poptracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Niumside Population Tracker

This is a population Tracker for PlanetSide 2. It stores population in this format (world > zone > faction > loadout) into a Postgres database. The database still has some empty tables and is designed in a way that I can integrate other modules into it. These modules eventually will replace my old Discord bot, which was also my first ever coding project.

Runtime dependencies

Installation

This project is still in development and not ready for production. Either use the development environment setup or make sure you do the following:

  • Install the runtime dependencies.
  • Install Rust nightly.
  • Override the configuration by copying config/default.yaml to config/local.yaml.
    • We copy the default configuration to a local configuration to allow local changes to be independent of the default configuration.
  • Initialize the database with the schema in niumside-database.sql.
  • Run the application by using any of the options below.
    • Without compilation:

      cargo run --release
    • With compilation (Executable will be different depending on your platform):

      cargo build --release
      ./target/release/niumside-population-tracker

Development

Environment

Credentials

Credentials can be found in the docker-compose.yaml file. The default credentials are:

Application Username Password
Postgres postgres P@ssw0rd
PGAdmin4 [email protected] P@ssw0rd

When changing, these have to be changed in docker-compose.yaml and config/local.yaml (read below for configuration setup) as well as .env.

Usage

In order to use the development environment you have to run the following commands for a basic setup after installing the dependencies:

mkdir niumside
git clone https://github.com/brakenium/niumside-poptracker.git
git clone https://github.com/brakenium/auraxis-rs.git
cd niumside-poptracker
cp example.sqlx.env .env
# Edit .env to your liking. The default values are setup for docker-compose.yaml.
nano .env
cp config/default.yaml config/local.yaml
# Edit config/local.yaml to your liking. The commented values are setup for docker-compose.yaml. You will have to edit census.service_id with your own service_id.
nano config/local.yaml
# Run Docker compose. Depending on the setup sudo may be required and in the case of the standalone install the command might be `docker-compose` instead.
docker compose up -d

After changes to the database you have to run the following command to update the schema:

docker compose stop db
docker compose rm db
docker compose up -d db

Database

Database Schema

This project uses a Postgres database which has been configured with PGAdmin4. The generated schema can be found in niumside-database.sql. The PGAdmin4 project can be found in niumside-database.pgerd and be opened with PGAdmin4 Desktop or a server install like the docker-compose.yaml sets up at localhost:8080. The local install will add the development server to the application, however the password will have to be entered manually.

The database is designed to be modular. This means that it can be extended with other modules. The current modules are:

  • Population Tracker

Possible future modules are:

  • Outfit Tracker
  • Session Tracker
  • Discord Bot

3rd party code

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages