QuadCoach - The digital assistant coach for Quadball
- Docker (https://docs.docker.com/engine/install/ubuntu/)
- Node.js min. v20.5.1 (if you want to run the system without docker)
We use Vite + React as Toolchain for Frontend development and NPM and Nodemon as backend Toolchain for automatically updating the Front- and Backend after updating the Files
To overcome CORS Erros we use the Vite Proxy functionallity and on Production we serve the build Vite React app directly from the Backend.
add a secret.env
file in your root folder and add the ACCESS_TOKEN_SECRET
and REFRESH_TOKEN_SECRET
environment variables.
You can create the Secret with the following command in a "node terminal"
require("crypto").randomBytes(64).toString("hex");
The docker compose will mount the client and server folder as volume so that nodemon and vite can read the changes on the host machine and update the page to make development easy.
Start the development environment with
docker compose -f docker-compose.dev up --build
Go to your Browser and access the Page
docker compose -f docker-compose.dev up --build -d
If you use new Node modules you need to make sure that the image is rebuild completly with
docker compose -f docker-compose.dev down
docker rm quadcoach-backend quadcoach-frontend
docker image rm quadcoach-backend quadcoach-frontend
- For showing errors of eslint while coding using eslint extension Name: ESLint Id: dbaeumer.vscode-eslint Description: Integrates ESLint JavaScript into VS Code. Version: 2.4.2 Publisher: Microsoft VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
In Production Vite will build the React App and then we will copy the data into the docker container.
To build the app without installing all dependencies on the host PC do the following
docker compose -f docker-compose.dev up --build -d
to start the compose in detached mode. Then
docker exec -it quadcoach-frontend /bin/bash
into the container and
npm run build
then again
docker exec -it quadcoach-backend /bin/bash
and
npm run build
to build the App. Due to Volume mounting we now have the build App also in the host machine and can use
bash start_prod.bash
It will be servered from the Backend address and port instead of from the vite development server adress and port. Go to your Browser and access the Page
This Projects Front-End is based on the SoftUI Version 4.0.1 by Creative Tim under MIT LICENSE. The Software was changed, extended and refactored and all changes to the Front-End are Licensed under the Repository License