This project was inspired by the annual posts on cubing time standards from Reddit (i.e. 2024 2023 2022 2019 2017).
- Time Distribution Tables – View distributions for both single solves and average times
- Relative PR Visualizer – Displays how your personal records rank compared to other participants
- Head-to-Head Calculator – Analyze how two cubers stack up against each other based on their times
Before proceeding with the steps below, ensure that Node.js is installed and a MySQL database is set up locally.
- Clone the project.
git clone https://github.com/jwnle31/Cubing-Time-Standard.git
- Navigate to the server directory and install the dependencies. Then, create a .env file and use the sample.env file as a reference.
cd Cubing-Time-Standard/server npm install cp sample.env .env # open .env and add your variables
- Navigate to the client directory and do the same.
cd ../client npm install cp sample.env .env # open .env and add your variables
- Navigate to the root directory. Then, create a .env file and use the sample.env file as a reference.
cd .. cp sample.env .env # open .env and add your variables
- Spin up the containers.
docker compose up
- Update your host file to point cts.localhost and api.cts.localhost to 127.0.0.1.
# add these 2 lines 127.0.0.1 cts.localhost 127.0.0.1 api.cts.localhost
- Add the root.crt file from the Local Caddy Authority to your trust store (so your browser will trust the self-signed TLS certificate). When the containers are running, open the caddy container in Docker desktop, and navigate to the container's file browser. Find the root.crt under the path: /data/caddy/pki/authorities/local/root.crt. Download this file to your desktop, import it into your trust store, then manually trust this certificate. You may need to restart your browser for the changes to take effect.
To build and test the frontend, run the following commands from the client directory:
npm run build
npm run preview
For the backend, run the following from the server directory:
npm run build
cp .env build/.env
npm run start