Git-Leon/spring.anonyvote

★ 0Forks 0JavaGitHub ↗Compare

README

My First Monolith

  • Objective - To create a full-stack monolithic application
  • Purpose - To gain familiarity with connecting a web service to a front end application
  • Description
    • Run this application by executing the main application class.
    • Navigate to the server port specified in the application.properties file. By default, the port number is 8080
    • If your application cannot run because something is occupying a port, execute this command from Git Bash with the respective port number specified:
      • kill -kill `lsof -t -i tcp:8080`
    • Navigate to localhost/8080 from a browser (Chrome, or Firefox)
    • Take note of the functionality for each button that is available on the webpage.
    • Modify the functionality of the create button which fetches data from the DOM, and persists it in our database.

Part 1 - Clone the project

  • Begin by forking this project into a personal repository.
    • To do this, click the Fork button located at the top right of this page.
  • Navigate to your github profile to find the newly forked repository.
  • Clone the repository from your account into your ~/dev directory.
  • Open the newly cloned project in a code editor (IntelliJ, for example).

Running tests & coverage

To run the unit tests and generate a JaCoCo coverage report locally:

mvn test jacoco:report

The JaCoCo XML report will be generated at target/site/jacoco/jacoco.xml and an HTML report at target/site/jacoco/index.html which you can open in a browser.

We've also added a GitHub Actions workflow (.github/workflows/ci.yml) which runs the Maven verify lifecycle and uploads the JaCoCo XML as a build artifact for pull-requests and pushes to the main/master branches.

Status

CI and coverage badges for this repository:

CI JaCoCo report (Pages)

The JaCoCo Pages badge links to the published static HTML coverage report. If the Pages site is not yet available (HTTP 404 due to propagation), use the raw fallback link in the "JaCoCo coverage report (published)" section below.

Note: The project serves server-rendered Thymeleaf templates as the canonical root pages. A small UI (poll creation + poll listing) has been merged into src/main/resources/templates/index.html. There are no longer competing static index.html files in the resources/static/ folder.

Monitoring

This repository includes a scheduled monitor workflow that checks the public /health endpoint of the deployed app and uploads debug artifacts when the check fails. If you see monitor failures, check the monitoring PR and issue for diagnostic logs:

  • Diagnostic PR with monitoring changes: #5
  • Active Issue tracking the current TLS/SNI problem: #9

If you are responsible for the hosting/CDN configuration, please ensure the deployed hostname (for example, spring.anonyvote.onrender.com) is added as a custom domain on your hosting provider and that HTTPS is provisioned for it. The monitor collects curl/OpenSSL debug output to help diagnose TLS issues.

JaCoCo coverage report (published)

The JaCoCo HTML report has been published to GitHub Pages for this repository.

If the Pages site is not immediately available (HTTP 404), wait a minute and reload — GitHub sometimes needs a short moment to serve the new Pages content. The full HTML report is also available as a workflow artifact from the CI debug run if you need to download it manually.

Contributors

azrasgdcGit-Leon

Issues