Finguard is a backend application for finance management. This project consists of the backend implementation for the finance management service, built with Java, Spring Data JPA, Spring Boot, and Microservices. Postman is used for front-end validation.
FinGuard is designed to help users manage their finances efficiently. It includes features for user registration, budget management, transaction processing, investment analytics, and more.How to run Fingaurd
1. Run this command to clone the repo
git clone https://github.com/Krishnann-s/FinGuard.git
cd Fingaurd
2. Set Up Lombok:
- Intellij IDEA: Install Lombok as an extension.
- Eclipse or Spring Tool Suite: Download Lombok and set the IDE Path.
3. Configure the Database
- Open the
application.propertiesfile. - Update the database URL, username, password to match your database configuration.
4.Run the application
- Use your IDE to run the application or execute the following command
./mvnw spring-boot:run
FinGuard is a Spring Boot project (version 3.3.4) that requires Lombok configuration. It uses various dependencies like Spring Gateway and Spring Validation. Dependencies for each microservice are listed in detail in the Mircoservices section.
The database used is Oracle Database, but you can change this by updating the database URL, username, and password in the application.properties file.
Each microservice has its own port number. The API Gateway, running on port 8086, is used to navigate through the microservices. All microservices, including the API Gateway, are registered in the Eureka server.
User-Service consist of the user registration and login business logic. The JWT-Token is generated during the Login stage. It runs in port 8000.
Dependencies Needed
- Spring-boot-starter-validation
- Springfox-boot-starter
- spring-boot-devtools
- lombok
- spring-boot-starter-data-jpa
- spring-cloud-starter-netflix-eureka-client
- spring-cloud-starter-openfeign
- jjwt-api
- jjwt-impl
- jjwt-jackson
- Spring-boot-starter-mail
- spring-boot-starter-security
| Definition | REST APIs |
|---|---|
| Register user: | POST - /finguard/user/register |
| Login User: | POST - /fingaurd/user/login |
| Get All User(only Admin can access): | GET - /fingaurd/users |
| Get User by Id: | GET - /finguard/user/{userId} |
| Update User by Id: | PUT - /finguard/user/{userId} |
| Update User wallet by User Id: | PUT - /finguard/user/wallet/{userId} |
| Delete User by Id(Both user and Admin have access): | DELETE - /finguard/user/{userId} |
This microservice handles sending emails when a new user registers. Below is a detailed explanation of the components and dependencies used.
Dependencies Used
| Definition | REST APIs |
|---|---|
| Send Account creation mail | POST - /notification/sendEmail |
The Finance Management Service handles budget management and transaction processing. It includes functionalities for creating, updating, and deleting budgets, as well as managing transactions, debts, and portfolio investments.
Dependencies Needed
| Definition | REST APIs |
|---|---|
| Create a new Budget | POST - /api/budgets |
| Get a budget by ID | GET - /api/budgets/{budgetId} |
| Update a Budget by ID | PUT - /api/budgets/{budgetId} |
| Delete a Budget by ID | DELETE - /api/budgets/{budgetId} |
| Get all budgets for a user | GET - /api/budgets/user/{userId} |
| Get remaining amount in budget | GET - /api/budgets/{budgetId}/remaining |
| Get budget report | GET - /api/budgets/report/{userId}/{startDate}/{endDate} |
| Definition | REST APIs |
|---|---|
| Create a new transaction | POST - /transactions |
| Get a transaction by ID | GET - /transactions/{id}/{userName} |
| Get transactions by user ID | GET - /transactions/user/{userId} |
| Make a transaction | POST - /transactions/user/txn |
| Portfolio transaction | POST - /transactions/user/portfolio |
| Debt transaction | POST - /transactions/user/debt |
The Investment Analytics Service provides functionalities for managing and analyzing investment portfolios. It includes endpoints for adding, viewing, updating, and deleting portfolios, as well as generating various financial reports.
Dependencies Needed
| Definition | REST APIs |
|---|---|
| Add a new portfolio | POST - /api/Portfolio |
| View a portfolio by ID | GET - /api/Portfolio/{portfolioId} |
| Update a portfolio | PUT - /api/Portfolio/{portfolioId} |
| Delete a portfolio | DELETE - /api/Portfolio/{portfolioId} |
| View all portfolios for a user | GET - /api/Portfolio/portfolio/{userId} |
| Definition | REST APIs |
|---|---|
| Get debts report | GET - /api/reports/financereport/{userId} |
| Get income and expense report | GET - /api/reports/incomexpensereport/{userId} |
| Get budget report | GET - /api/reports/budgetreport/{userId}/{startDate}/{endDate} |
| Get portfolio report | GET - /api/reports/portfolioreport/{userId} |
The API Gateway handles role-based authentication and routes requests to the appropriate microservices. It uses JWT for authentication and supports role-based access control.
Dependencies Needed
If you have any questions, suggestions, or feedback, feel free to reach out: