Skip to content

javsort/SchichtPlaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SchichtPlaner

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:

⚠️! For deployment instructions, head down to the Schichtconfig section below

Live Application Access

The application running on server can be accessed through here! http://138.199.161.219:3000/login

Tools currenly used:

⚠️! - The tools marked with a '*' are the ones needed at your local machine before deployment

- Frontend

  • The frontend is running currently thanks to:
    • REACT
    • Node.js * - v18.20.6 (on server)
    • npm * - v. 10.8.2 (on server)

- Backend

  • 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

- DevOps

  • 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

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.

Local Deployment

⚠️! - Remember to run these scripts directly from the ./schichtconfig/automation-scripts/ folder

  • For deployment on Linux / MacOS:
$ chmod +x ./build-n-run-local.sh

$ ./build-n-run-local.sh

⚠️! - build-n-run-local.sh already gives the 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

Production Deployment

On the server end, the GitHub Workflows described above take charge in all the deployment operations.

To deploy on production follow these next steps:

  1. Open the repository, through this link
  2. Head to the Actions tab from the repository menu
  3. To deploy...
    • All containers:
      1. Click on the workflow titled CI/CD Pipeline - All Containers
      2. Click on the Run workflow button, and then Run workflow again.
      3. Done! The application will be deployed.
    • A specific container:
      1. Click on the workflow titled CI/CD Pipeline - Specific Container
      2. Click on the Run workflow button
      3. 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
      4. Once written the name of the cotnainer, click on Run workflow again.
      5. Done! The specified container will be deployed.

The remaining scripts are to be used by the containers themselves or to connect to the server.

⚠️! - Whenever running access to the servers you still need a password to login, so only do it if you have that.

.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

⚠️! - If on Linux, remember to give the 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

About

Software Design Studio Project III

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •