A credit system was created, in which the user is registered and the credit result is returned according to the user's information. Credit information is sent as SMS after a user is registered. These users are listed in a table in the interface and editing and deletion operations have been added. In addition, records were queried according to tc number and birthdate. The interface was developed simply with React.
Java 11 is used in this project. Also Maven
was used as the Java management tool in this project. So to inject the dependencies,
first reload the project in Maven, then clean and install it.
PostgreSql
was used as database. The Hibernate (JPA)
ORM library was used to transform Java classes
into database tables.
Backend side works on 8080
port.
Note: In order for the application to work, the necessary db configuration settings must be made from the application.properties
file.
Swagger
was used for API documentation. The user's get, delete, post and put operations, as well as querying the credit
service by TC number and date of birth, displaying users' credit details and returning a user's credit score can be tested.
A simple interface was made with React
. Bootstrap and basic level css were used for the design.
Run this command to download the required dependencies:
npm i
Run the following command to start the project:
npm start
Frontend side works on 3000
port.
Users can be registered in the database according to the project requirements. As a result of the user information entered, the credit limit and credit result are saved in the database. The following video shows the credit limit and credit result of a registered user:
Screen.Recording.2022-01-30.at.17.52.21.mov
The credit score was simply calculated according to the tc number. According to the
first scenario, users whose last 3 digits of the Turkish Republic are less than 500
were assigned a credit limit of 0 TL and a RED
response was returned. Since the last
3 digits of the first user's TC were greater than 500, the credit score was also returned
as greater than 500 and was assigned as ONAY
.
Registered users can be updated from the table. According to the updated information, the user's credit result is recalculated and this result is updated. In the video below, it is seen that the credit result of a user whose information has been updated is recalculated.
Screen.Recording.2022-01-30.at.18.06.13.mov
When a user is deleted from the table, the credit result of that user is also deleted from the table. The video below shows the deletion process.
Screen.Recording.2022-01-30.at.20.38.49.mov
User can be searched according to TC number and birthday. If the date of birth and the tc number do not match, it gives a "User not found" error. The video below shows a search process from the table.
Screen.Recording.2022-01-30.at.20.46.55.mov
After the user is registered, an SMS is sent to the relevant phone number. The transaction is carried out with a Twilio trial account.
Note: Since I use a Twilio trial account, sms can only be sent to the phone numbers defined in the dashboard.
The following message is for the first registered user:
The following message is for the second registered user: