The aim of this project is writing a restful application for a loan application system, which will take the loan application requests and return the loan result to the customer according to the relevant criteria, using the Spring Boot framework and optionally developing the frontend side.
Table of Contents
The user's identity number, name-surname, monthly income and telephone information are obtained, the credit score service is assumed to be written with the identity number before, and the credit score of the relevant person is obtained and the credit result is shown to the user according to the following rules. (There may be two options as Approval or Rejection.)
Rules:
- New users can be defined in the system, existing customers can be updated or deleted.
- If the credit score is below 500, the user will be rejected. (Credit result: Rejected)
- If the credit score is between 500 points and 1000 points and monthly income is below 5000 TL, the user's loan application is approved and a limit of 10,000 TL is assigned to the user. (Credit Result: Approved)
- If the credit score is between 500 points and 1000 points and if the monthly income is above 5000 TL, the user's loan application is approved and a limit of 20,000 TL is assigned to the user. (Credit Result: Approved)
- If the credit score is equal to or above 1000 pointsthe user is assigned a limit equal to the result of the MONTHLY INCOME INFORMATION * CREDIT LIMIT MULTIPLIER. (Credit Result: Approved)
- As a result of the conclusion of the loan, the relevant application is recorded in the database. Afterwards, an informative SMS is sent to the relevant phone number and the approval status information (rejection or approval), limit information is returned from the endpoint.
- A completed loan application can only be queried with identification number
Note: The credit limit multiplier is 4 by default.
- Java Spring Boot
- PostgreSQL
- Hibernate
- Maven
- MapStruct
- SLF4J
- JUnit
- Swagger
- JWT
- Mockito
- Postman
- Intellij Idea
- Clone the repo:
$ git clone https://github.com/gozdemogus/credit-app-spring-boot.git
-
Open project in your IDE.
-
A database called
gradProj
must be defined in PostgreSQL. -
In
application.properties
file, configurations for PostgreSQL connection must be done. -
Project is available on port
2020
. -
Notice that the project contains
Spring Security
feature. In order to access the endpoints firstly you need to visit:
Type | Method |
---|---|
POST | http://localhost:2020/login |
Then login with the following credentials:
{
"username" : "user",
"password" : "123"
}
You are free to reach other endpoints with bearer token.
- Thymeleaf
- HTML
- CSS
Two separate applications were developed for admin and applicants.
-
Click: USER is provided for applicants where they can apply for loans and inquire about their applications.
-
Click: ADMIN is designed for CRUD operations on user and credit records.
Applicant
application contains the following pages:
🖥️ Main
page that gives the user options to submit an application or query the outcome of an existing application. 👇
🖥️
Apply
page that allows user to fill the required information for credit inquiry and apply. 👇
In case of user with an existing credit application tries to apply again:
🖥️
Query
page that provides user to get the result of his/her existing application. A completed loan application can only be queried with identification number 👇
If there is not related application 👇
Admin
application contains following pages:
🖥️ The administrator's intervention in the credit result can be disabled according to the scenario. It has been left active to show that insert, delete, update and view operations can be performed here.
🖥️ Admin can also perform CRUD operations with user entity.
Gözdem Oğuş - @Linkedin