A simple Expense tracker REST API
Screen.Recording.2024-03-10.at.12.31.24.PM.1.mov
An API for expense management. This project is built with Java, Spring Boot.
The API main URL /expenses
.
This API provides HTTP endpoint's and tools for the following:
- Create an expense:
POST/expenses
- Update an expense:
PUT/expenses/{id}
- Delete an expense (by id):
DELETE/expenses/{id}
- Find a unique expense by id:
GET/expenses/{id}
- Get all expenses:
GET/expenses
- Filter expense
- By Name :
GET/expenses/name?name={name}
- By Category :
GET/expenses/category?category={category}
- By Date :
GET/expenses/date?startDate={startDate}&endDate={endDate}
- By Name :
- Pagination and Sorting
Expense Tracker API Documentation
This project was developed with:
- Java 17
- Spring Boot 3.2.2
- Maven
- Mysql
The API also was developed to run with an jar
. In order to generate this jar
, you should run:
mvn package
This command will clean, compile and generate a jar
at target directory, e.g. expensetrackerapi-0.0.1-SNAPSHOT.jar
This project uses Mysql database.
- Create databse
Create database expensetracker
. - Run Spring boot app it will automatically create table
In order to run the API, run the jar as following:
java -jar expensetrackerapi-0.0.1-SNAPSHOT.jar --spring.profiles.active=dev
or
To test the application import `src/main/resources/templates/Expense Manager - REST API CRUD.postman_collection.json` file on Postman App
- Adding security using spring security
- User specific expenses
- Made with ❤
- Don't forget to star it 🌟