Repository for Trials Ninja Points
TNP is a website where ninja riders from the game franchise Trials compete based on in-game & opinion-based metrics.
1. Ninja Points are composed of subjective & objective measures for a run on a track
Metric | Type | Description |
---|---|---|
Faults | Objective | The amount of times a player resets to a checkpoint during a run on a track in game. (1-499 faults possible per run) |
Time | Objective | The amount of time a player took to pass a track in game. (<29:59.999 minutes possible) |
Ninja Level | Subjective | The rider's own opinion of how difficult a track feels to them, relative to other tracks that they've played (rated on a scale of {0.5 > x < 9.5}) |
Length | Subjective | The rider's own opinion of how long a track feels to them, relative to other tracks they've played. Thought of based on number of obstacles. (Rated on a likert scale) |
Consistency | Subjective | The rider's own opinion of how consistent a track feels to them, relative to other tracks they've played. Thought of best by how likely a rider is to fault given all obstacles on a given track. (Rated on a likert scale) |
- MySQL Relational Database
- React Frontend App
- Node.js Backend Server
- Prisma object-relational mapper
- Flask micro web framework written in Python
1. Install Node.js (npm -v to check version)
-
Setup for React Frontend App, Node Backend Server & Flask Backend Server
-
Change directory into base directory
cd Trials.com/
-
Install Node Modules
npm install --workspaces
-
Setup .env files using .env.development.sample files
- edit
~Trials.com/react-frontend/.env.development.sample
&~Trials.com/node-server/.env.development.sample
by filling out required environment variables - rename .env.development.sample to .env.development
- edit
-
Run start scripts for node backend & react frontend
npm start --workspace=node-server && npm start --workspace=react-frontend
-
Change directory into flask directory
cd flask-backend
-
Run development/debug script for flask (Python)
./server-debug.sh
# All commands for above steps, to start. # Change directory into base directory cd Trials.com/ # Install node_modules npm install --workspaces # Setup .env files (using nano if on linux) nano node-server/.env.development.sample nano react-frontend/.env.development.sample nano flask-server/.env.sample # Run start scripts for node-server & react-frontend (open two new terminals for this) npm start --workspace=node-server npm start --workspace=react-frontend # Run start script for flask development server cd flask-backend ./server-debug.sh
-
-
Setup MySQL Database
- Install MySQL workbench (optional) & MySQL Server (If on windows, this can be done with the MySQL installer)
- Run init.sql