Skip to content

jakubdrobny/speedcubingslovakia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Speedcubing Slovakia

Web app for regular online competitions in rubik's cube solving and a place for Slovak speedcubing community.


Local development (Linux)

Make sure to have Git installed.

Clone this repository. https://github.com/jakubdrobny/speedcubingslovakia.git


Database

  1. Install PostgreSQL with sudo apt-get install postgres.
  2. Create some user, or configure password default user postgres.
  3. Run psql -U postgres and then inside psql run CREATE DATABASE <database_name>; to create the database.
  4. Exit psql with CTRL+D and inside /backend/.env.developement change speedcubingslovakiadb_local to your <database_name>, similarly for username and password.
  5. Populate/initialize the database by running psql -U <username> -d <database_name> -f initialize_db.sql inside the /database directory.

Backend

  1. Install Go 1.22.0.
  2. Run go get <package_name> for packages models, constants, middlewares, main, controllers, utils, cube to install dependencies.
  3. Add SPEEDCUBINGSLOVAKIA_BACKEND_ENV=development to your ~/.profile and run source ~/.profile to realize the changes in current terminal.
  4. Run go run main/main.go in the backend directory to start the server.

Scrambling program

  1. Download Java 11.
  2. Clone official scrambling program TNoodle from https://github.com/thewca/tnoodle.git.
  3. Inside the cloned repository run ./gradlew runBackend to start the scrambling program.

Frontend

  1. Install npm with apt install npm.
  2. Install latest Node.js version with npm i node@lts and then all the dependencies with npm install.
  3. Start the frontend with npm start.

That's it 🥳

You should now be able to have a local instance of the app running :)

Releases

No releases published

Packages

No packages published

Languages