Giter Site home page Giter Site logo

zdevelopers / panoptes Goto Github PK

View Code? Open in Web Editor NEW
1.0 5.0 0.0 254 KB

Surveillance des mouvements bancaires

Rust 56.51% Makefile 0.47% Shell 0.04% JavaScript 10.33% HTML 1.91% Vue 25.07% Python 5.67%
minecraft minecraft-prism minecraft-resources-monitoring rust rocket rust-rocket vuejs vuetify

panoptes's Introduction

Panoptès

A Minecraft Prism-based tool to monitor shared in-game resources.

Panoptès (named from the many-eyed giant in the Greek mythology) is a web tool (with a Rust backend) used to monitor players contributions to in-game shared resources, to check if everyone is playing fair.

It requires Prism to be installed in-game and connects to its MySQL database (read-only) to gather usage statistics.

Panoptès backend is built with Rust nightly and Rocket 5.0-dev. Its frontend is built using VueJS 2 and Vuetify.

Install

  1. Install Rust nightly using rustup, and Node 12+.
  2. Run make install to install front-end dependencies.
  3. Create a Panoptes.toml file at the root of the repository, following the template below. At least, add a database DSN.
  4. Create a front/.env.local file with the following content. You can also use a real environment variable.
    VUE_APP_API_URL=[backend url]
    

Translations support

To enable translations support—allowing the display_name key of the /ratios endpoint to contain localized data according to the locale query parameter—you must extract the translation files from an existing Minecraft installation, as distributing these files is forbidden.

To do so, execute make extract-translations. If it does not work, e.g. because your installation is non-standard, see options by executing the underlying script with --help. The default locale can be specified in the configuration file, alongside the folder where translations are stored (default to the translations folder at the root of the application).

Start

make run

The first run will be slow to start, as everything needs to be downloaded and compiled. Subsequent runs will be way faster. You can use make start-back or make start-front to only start one part.

Configure

To configure Panoptès, you can create a Panoptes.toml file with the following content (all parts are optional; only add the ones you want to override). Default values can be found in the back/Rocket.toml file. You can set in this file any native Rocket configuration too.

[global.minecraft_translations]

directory = "../translations"
default_locale = "fr_fr"

[global.areas]

# You can add as many areas as you wish in this section
your_area = { name = "Area name", world = "world", pos1 = [0, 0, 0], pos2 = [400, 256, 800] }

[global.databases.prism]

url = "mysql://user:password@host/database"
pool_size = 2

The location of this file can be modified using the PANOPTES_CONFIG environment variable.

You can also use environment variables, the content being a TOML string, e.g. to configure the database DSN:

PANOPTES_DATABASES='{prism={url="mysql://dsn"}}' 

Read (the manual)

API documentation is available at the / endpoint of the backend server.

Deploy

TODO, but for the front-end part:

npm run build

panoptes's People

Contributors

amaurycarrade avatar coutume avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.