A Java web application for getting the users updated on the current rate of COVID-19 cases and the number of active cases reported worldwide.
The application uses data from a Third Party API (Open Disease Data API) for reliable global disease information.
The application uses the standard MVC architecture. The controller layer consisting of the Spring Controllers receives the client's requests. It then passes the requests to the Service Layer for processing. The Service layer will then give the results to the Controller, which sends it to a templating engine called Thymeleaf Template before being rendered on the screen.
- The app utilizes Open Disease Data API for Covid-19 data which is updated every 10 minutes
- A Home page that displays details regarding worldwide Covid-19 cases
- A list of Continents that links to a specific Continent page
- A Continent Page that displays details regarding Covid-19 infections for that particular continent
- The Continent Page also displays a table of countries with its corresponding details
- A Country Page that displays details such as total cases, new cases, active cases, etc
Exceptions are being handled inside GlobalExceptionHandler class which uses the Spring's @ControllerAdvice annotation to capture exceptions in the application and to be taken accordingly.
The packages below contains the application logic for Covid Watch Web Application.
- client - contains classes for consuming the Open Diseases API
- config - contains the Java Configuration files
- constant - contains Constants class
- controller - contains the Controller classes
- domain - contains the domain objects or POJOs
- enums - contains Java enumeration classes
- exception contains custom java exceptions
- service - contains the Service classes
- utility - contains utility class
The Test Package contains all tests that are used in this project such as the Unit tests, Integration Tests.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
What things you need to install the software and how to install them
GitHub Account
Java 11
IDE (Developed using Netbeans 12.1) or STS for Eclipse or IntelliJ
-
Checkout code from GitHub repository:
https://github.com/medinar/covid-watch.git
-
Open project in your IDE of choice as a maven project.
-
Clean and Build the project so that all required dependencies will be downloaded.
-
Run the project.
-
Open a browser.
-
Copy and paste to the address bar and press enter:
localhost:9001/covid-watch/global
-
On the Project Explorer, select the test files.
-
Right click on the test files then click Test File (Ctrl + F6).
-
Check the results.
- Java - a programming language used to develop enterprise applications
- Spring - a framework which provides a comprehensive programming and configuration model for modern Java-based enterprise applications
- Spring Boot - a tool for developing Spring based Java web applications and APIs faster and easier
- Thymeleaf - an XML/XHTML/HTML5 template engine that is able to apply a set of transformations to template files in order to display data and/or text produced by web applications
- Bootstrap - a CSS Framework for developing responsive and mobile-first websites.
- DataTables - is a powerful Javascript library for adding interaction features to HTML tables
- JUnit - a unit testing framework for Java programming language
- Mockito - is a mocking framework, JAVA-based library that is used for effective unit testing of JAVA applications
- Rommel D. Medina - Profile: medinar