Short description or introduction to the project.
Hello there, newComers. This project is modified bachelor thesis. Main application is 2 years old, so do not look very precisely.
Main idea is to show one of my features I worked on: Dynamic filtering via Spring Specification and Hibernate Criteria. Main class is CustomSpecification.java and all the magic is around filtering package.
- Project Description
- Main Features
- Getting Started
- Prerequisites
- Installation
- Testing
- Adminer
- Postman
- Configuration
This is a Bachelor Thesis project named FIN (FINances).
- Security for individual users using JWT (JsonWebToken)
- Simple using of REST API
- Scalable Application
- Technologies with likely continued support from developers
- Sorting Wallets by id, name, deposit, and timePeriod (ASC and DESC)
- Sorting Transactions by id, note and amount (ASC and DESC)
- Sorting Transaction Categories by id and name (ASC and DESC)
- Ability to view income or outcome for categories and wallets, separately
- Postman collection, full of possible queries to explore the API
- Simple managing of database by Adminer
Make sure you have the following prerequisites installed:
- Java Development Kit openjdk-18.0.2.1
- Java version 17+
- Gradle build tool version 7.6.1
- Spring Boot version 3.0.6
- Project Lombok
- Mapstruct version 1.5.3.Final
- JWT (jsonwebtoken)
- MySql connector
- Hibernate Validator version 8.0.0.Final
-
Create a project from Version Control in Intellij
https://gitlab.fel.cvut.cz/khomumik/fin_backend.git
-
For next steps yon need to download Docker on you PC to run the application https://www.docker.com/products/docker-desktop/
-
Open docker and run "docker-compose up" in docker-compose.yml by clicking on green services button as on the picture
-
Build the project using Gradle build.gradle:
gradle build
-
Make sure your run configuration is okay and run it
-
The application should now be accessible at http://localhost:8080/api/v1/ but I highly recommend to use Postman for your needs because you have postman collection prepared in postman directory
-
Create a new configuration for your project as on the picture
-
Run the configuration and explore integration testing in FIN
When you have installed the project and successfully run it you can explore the application database with Adminer. Adminer is very simple database manager.
Steps to get in Adminer.
-
Assume, you are successfully running the application.
-
Open this browser link (configured in docker-compose.yml)
http://localhost:4200
-
Complete the form as on picture. Password for database is
fin
-
Now you are in the database your application is using, so you can explore and use it for your purposes
When you have installed the project and successfully run it you can check the features of application by postman. Steps for postman testing:
-
Open Postman and import the FIN.postman_collection.json
-
Set Local environment variable
URL_BASE
-
As first, you have to register new account for application
-
When your account will be registered you will get
token
. Copy it -
Open Fin directory setting -> Authorization: Choose Type: Bearer Token and fill
token
field with your token -
Now you are authenticated, and you have access to FIN REST API. Enjoy your exploring
Open the application.properties file located in application.properties. Configure any necessary settings, such as database connection details.