Software Design Studio Project III
Welcome to SchichtPlaner, a Java-based web-app delivered through React for the front-end and supported on Springboot + MariaDB for backend functionality.
This application is currently being designed and built through a CI/CD workflow enabled by an external server, so all deployments are done here, via GitHub Actions workflows.
This README is a guide to the repository, where you'll find the following folders and helping sections:
The application running on server can be accessed through here! http://138.199.161.219:3000/login
- The frontend is running currently thanks to:
- REACT
- Node.js * - v18.20.6 (on server)
- npm * - v. 10.8.2 (on server)
- The backend is running currently thanks to:
- Java - v.21 *
- Apache Maven - v.3.6.3 *
- SpringBoot - v.3.3.5
- MariaDB - v.11.6.2
- For deployments and containerization, the app's setup is being delivered by:
- GitHub Actions
- Perform deployments, purge & stop containers
- Docker Daemon - v.27.5.1 *
- Containerization, overall app being served by the platform on a separate server running containers
- GitHub Actions
Schichtconfig - /schichtconfig
Here, you'll find relevant docker setup files and scripts which help ease-out the deployment process.
Under the /docker
folder, there's a pertinent README with details on what's in the docker compose and helpful commands to check logs, bring down containers and perform other relevant tasks on the server.
Regarding the scripts, only build-n-run-local.bat
/ build-n-run-local.sh
is intended to be used outside the server environment Which basically does a clean maven install of the packages and deploys the MariaDB container along with the application's backend & front-end containers to check locally for updates.
./schichtconfig/automation-scripts/
folder
- For deployment on Linux / MacOS:
$ chmod +x ./build-n-run-local.sh
$ ./build-n-run-local.sh
chmod
permissions to the maven wrapper, so it is only needed to give it once to this script.
- For deployment on Windows:
./build-n-run-local.bat
Whenever running locally, to check the front-end, once the application is built and running, access the site through: http://localhost:3000
On the server end, the GitHub Workflows described above take charge in all the deployment operations.
To deploy on production follow these next steps:
- Open the repository, through this link
- Head to the
Actions
tab from the repository menu - To deploy...
- All containers:
- Click on the workflow titled
CI/CD Pipeline - All Containers
- Click on the
Run workflow
button, and thenRun workflow
again. - Done! The application will be deployed.
- Click on the workflow titled
- A specific container:
- Click on the workflow titled
CI/CD Pipeline - Specific Container
- Click on the
Run workflow
button - You will be prompted to enter the 'Name of the container', please make sure the container's name matches with its name on the docker-compose
- Once written the name of the cotnainer, click on
Run workflow
again. - Done! The specified container will be deployed.
- Click on the workflow titled
- All containers:
The remaining scripts are to be used by the containers themselves or to connect to the server.
.Github - /.github
Here you'll find the Github workflow files which are in charge of the CI/CD deployment process (specifically at pipeline-cicd.yml
& at re-reploy-container.yml
)
Also with it, two more helping workflows, stop-alles.yml
and purge-containers.yml
which as their name establish, they either stop the running containers or purge the unused files and data by the Docker Daemon.
Planner-Backend - /planner-backend
Here, you'll find all the Java files that support the backend.
According to the current architecture design, the backend of the application is divided into different modules or containers.
The modules divide as follows:
Container Name | Java Module Name |
---|---|
planner-logic-gate | logicGate |
planner-scheduler | scheduler |
planner-auth | auth |
Coming Soon! | - |
To run the full backend, it is sufficient to simply go back to ./schichtconfig/automation-scripts/ and run ./no-front-buildnrun-loc.sh
/ ./no-front-buildnrun-loc.bat
depending of your OS.
$ cd schichtconfig/automation-scripts
$ chmod +x ./no-front-buildnrun-loc.sh (if on linux)
$ ./no-front-buildnrun-loc.sh
To exclusively install dependencies or build the backend, it is sufficient to...
$ cd schichtconfig/automation-scripts/
:: To install dependencies
$ chmod +x ./clean-install.sh (only if on linux)
$ ./clean-install.sh
:: To build and package
$ chmod +x ./build-local.sh (only if on linux)
$ ./build-local.sh
or...
$ cd planner-backend/
$ chmod +x ./mvnw (if on linux)
:: To install dependencies
$ ./mvnw clean install
:: To build and package
$ ./mvnw clean package
chmod +x <script-name.sh>
permission to any script you'd like to run.
Planner-Frontend - /planner-frontend
Here, you'll find all the files corresponding to the front-end.
The front-end is currently running based on React, which is in one container, built from a single Dockerfike
To the front-end exclusively on local, it is sufficient to...
$ cd planner-frontend/
$ npm install
:: To run in dev mode
$ npm start
:: To run in build version:
$ npm install -g serve
$ npm run build
$ serve -s build