Skip to content
Bushan Sirgur edited this page Jun 25, 2024 · 6 revisions

About Expense Tracker API

It is a production ready Spring Boot REST API built from the ground up. The simple goal of this API is to track the user's daily spending. If you are interested in building this API, you can take a look at the course here.

Screenshot 2024-06-25 at 11 33 58 AM

Tech Stack

  • Java 17

  • Spring Boot 3+

  • JPA 3+

  • Hibernate 6+

  • Spring Security 6+

  • Maven

  • Lombok

Steps to Run the API Locally

1. Clone the application

git clone https://github.com/scbushan05/expense-manager-api.git

2. Create Mysql database

create database expensetracker

3. Change mysql username and password as per your installation

  • open src/main/resources/application.properties

  • change spring.datasource.username and spring.datasource.password as per your mysql installation

4. Build the app using maven

mvn clean install

A new jar file will be generated at target/expensetrackerapi-1.0.0.jar

5. Run the app using maven

mvn spring-boot:run

Alternatively, you can use Java command to run the application

java -jar target/expensetrackerapi-1.0.0.jar

The app will start running at <http://localhost:8080/ >.

Explore Rest APIs

The app defines the following APIs.

POST /api/v1/register

POST /api/v1/login

POST /api/v1/profile

PUT /api/v1/profile

DELETE /api/v1/deactivate

POST /api/v1/expenses

GET /api/v1/expenses

GET /api/v1/expenses/{expenseId}

PUT /api/v1/expenses/{expenseId}

DELETE /api/v1/expenses?expenseId={expenseId}

POST /api/v1/categories

GET /api/v1/categories

DELETE /api/v1/categories/{categoryId}

You can test them using Postman or any other rest client.

Clone this wiki locally