- Introduction
- Modules
- Diagrams
- Project Folder Structure
- System Requirements
- Running the project with Eclipse Che
- Running the project with VS Code
Money Spender is a multifaceted application built on a four-module structure, aligning with a three-tier architecture that distinctively separates core logic, user interface (UI), data storage, and server communication. Managed by Maven, the project ensures a smooth integration of these modules, facilitating effective collaboration between the core logic, UI, data handling, and server interactions. This strategic arrangement of modules in Money Spender offers users an all-encompassing tool for efficient financial management.
Money Spender is designed following a robust three-tier architecture:
-
Core: This layer houses the foundational logic and data structures critical to the application's functionality.
-
Restapi Managing data storage and user authentication, this layer plays a pivotal role in securely storing and retrieving essential information.
-
Persistence: Managing data storage and user authentication, this layer plays a pivotal role in securely storing and retrieving essential information.
-
User Interface (UI): Responsible for the user-facing components and interactions, the UI layer ensures a seamless and intuitive user experience.
You can access comprehensive diagrams illustrating the project's architecture by navigating to the following directory: gr2358/docs/diagrams. These diagrams offer valuable insights into the interplay among various components and the data flow within the system. Below are direct links to view these diagrams:
- Architecture diagram
- Class diagram for Core
- Class diagram for Persistence
- Class diagram for Restapi
- Class diagram for UI
- Package diagram
- Sequence diagram
-
Core Logic Code:
- Location:
gr2358/money-spender/core/src/main/java/core
- Testing:
gr2358/money-spender/core/src/test/java/core
- Location:
-
Restapi:
- Location:
gr2358/money-spender/restapi/src/main/java/restapi
- Testing:
gr2358/money-spender/restapi/src/test/java/restapi
- Location:
-
Persistence:
- Location:
gr2358/money-spender/persistence/src/main/java/persistence
- Testing:
gr2358/money-spender/persistence/src/test/java/persistence
- Location:
-
User Interface:
- Location:
gr2358/money-spender/ui/src/main/java/ui
- Testing:
gr2358/money-spender/ui/src/test/java/ui
- Location:
Our project employs Maven, a robust build automation tool, to manage dependencies and streamline the build process. Specifically, the following Maven plugins are utilized:
-
maven-compiler-plugin: This plugin manages the compilation of Java source code, ensuring that it is compatible with the specified Java version.
-
maven-surefire-plugin: This plugin is responsible for executing unit tests, aiding in validating the correctness of our codebase.
-
javafx-maven-plugin: To facilitate the use of JavaFX within the project, this plugin provides essential configuration and support for JavaFX applications.
-
junit: JUnit is a unit testing framework for Java. It is used to write and run repeatable tests.
-
jacoco-maven-plugin: We implemented jacoco to generate code coverage reports. This helps us to see how much of our code is covered by tests and find areas that need better testing. You can find the reports in the folder target/site/jacoco in every module after building the project or
mvn verify
. -
maven-checkstyle-plugin: We implemented Checkstyle for ensure that our code follows a set of coding standards. This helps us to write code that is easier to read and maintain. The standard we use is the eclipse-java-google-style.xml. We added this file in config foldere in money-spender folder. When we run the command mvn verify, checkstyle will check if our code follows the rules in this file. We will get warnings and violations if our code does not follow the rules.
-
spotbugs-maven-plugin: We implemented SpotBugs to our project to help us catch mistakes and problems in our code. When we run the
mvn verify
command, SpotBugs checks our code for errors. If it finds any, it tells us about them during the building process. This makes our code more reliable and secure by spotting common mistakes and security problems. -
spring-boot-maven-plugin: The Spring Boot Maven Plugin provides Spring Boot support in Apache Maven. It allows us to run Spring Boot applications, generate build information and start your Spring Boot application prior to running integration tests.
Before running this project, please ensure that you have the following softwares and versions installed on your system:
- Java: We recommend using
Java version 17.0.8-tem
for optimal compatibility and performance. You can check your Java version by running the following command in your terminal:
java --version
- Maven: Make sure you have
Maven version 3.9.4
or a higher version installed to effectively manage dependencies and facilitate the building process. You can check your Maven version by running the following command in your terminal:
mvn -version
1 Open the project in Eclipse Che
by clicking on the badge above.
2 Navigate to endpoints
in the bottom left corner in Eclipse Che to view the server logs.
3 Open public and copy the link to the port with name: 6080-tcp-desktop-ui (6080/http)
.
4 Open a new tab in your browser and paste the link + press enter. The virtual machine should now start.
5 Go back to Eclipse Che
.
6 Open the terminal
.
7 Run the following command:
cd money-spender/
8 Install dependencies and compile:
mvn clean install -DskipTests
9 Start the restapi server:
mvn spring-boot:run -f restapi/pom.xml
10 Open a new terminal
11 Run the following command:
cd money-spender/
12 Test the application:
mvn test
13 Run the application:
mvn javafx:run -f ui/pom.xml
14 Run spotbugs and checkstyle:
mvn verify
Make sure you are in the correct directory (gr2358/money-spender/
) before running these commands to ensure they execute correctly.
1 Press the badge above to clone the project to VS Code
.
2 Select a folder to clone the project to.
3 Open the folder in VS Code
.
4 Open the terminal
.
5 Run the following commands:
cd money-spender/
6 Install dependencies and compile:
mvn clean install -DskipTests
7 Start the restapi server:
mvn spring-boot:run -f restapi/pom.xml
8 Open a new terminal
9 Run the following command:
cd money-spender/
10 Test the application:
mvn test
11 Run the application:
mvn javafx:run -f ui/pom.xml
12 Run spotbugs and checkstyle:
mvn verify
Make sure you are in the correct directory (gr2358/money-spender/
) before running these commands to ensure they execute correctly.
Please make sure you have compiled with maven.
1 Navigate to ui folder
cd ui
2 Use this command inside ui folder
mvn javafx:jlink -f ./pom.xml
3 Use this command inside ui folder
mvn jpackage:jpackage -f ./pom.xml
4 drag the application to your local desktop or other folder.
5 Before you can run the application from desktop, you need to start the spring-boot server
: Follow this guide