Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

gorhack/tsr

Repository files navigation

Full CI/CD Security Rating Vulnerabilities

TSR

Track, Synchronize, Reporting Tool

TSR is an event management tool created with the goal of helping military units plan training events. TSR is built to be completely modular; capable of assisting any organization plan and coordinate any kind of event. It is designed for organizations that require collaboration and cross-communication with both internal and external organizations. TSR enables transparency amongst participating organizations that work together to plan and coordinate events.

Setup

TSR is built on Spring and React.

  • Install Docker
  • On Ubuntu or OSX with bash or zsh: run . ./setup.sh.
  • Source your shell and direnv should source your project's .envrc when you enter the project directory

Dependencies Installed:

  • Java 17 (JDK)
  • yarn
  • direnv
  • Docker / docker-compose
  • OSX specific: homebrew

Run

  • Ensure docker is running the required containers (postgres:12.3-alpine and g0rak/tsr-keycloak). ./docker_go.sh will pull and run both containers.
  • ./run.sh will run the full application.
  • Login with user tsr:password at http://localhost:8080. Switch to port 3000 for live reloading.
  • TSR uses Websockets for updating event state.
  • ./pipeline/build.sh will build and package a production TSR application in a jar file within build/libs.

Testing

Created with TDD principles. Run test.sh to run all tests.

  • test.sh will run the tests and build a runnable jar in build/libs without CSP for use without HTTPS.

  • On the backend we use JUnit5 and mockk for mocking.

    • To run the backend tests alone, run gradlew test in the root directory.
  • On the front-end we use react-testing-library, and testdouble / jest for mocking.

    • To run the frontend tests alone, run yarn test in the client directory.

Auth

Currently, TSR uses Keycloak's Oauth2 and Spring Security for authentication. Locally, keycloak runs within docker on port 8081 with tsr realm credentials tsr:tsr. TSR user credentials are tsr:password /and/ tsrAdmin:password, providing regular and admin user roles respectively.

Contribute

TSR is licensed under the GPLv3 license. To contribute: find an issue in the backlog, or add your own issue as a story (user benefit), bug, or chore (developer benefit). Assign yourself to the issue and create a branch with a descriptive name. Make a pull request and commit your work to your branch. If work is incomplete on the pull request, please keep it in a draft until it is ready for review. Request a review from any of the project maintainers. See the TSR's roadmap for a high level overview of my goals for this project.