https://roadmap.sh/projects/expense-tracker-api
- In root directory run
./gradlew clean build -x test - Run the docker file to run the database and the Spring boot project using
docker compose up --build
Server is hosted on: http://localhost:8080
To call the Auth endpoints no JWT token is required.
-
Sign up:
POST /auth/signupRequest Body:
{ "email": "EMAIL_HERE", "password": "PASSWORD_HERE", "fullName": "FIRST_NAME LAST_NAME" } -
Login:
POST /auth/loginRequest Body:
{ "email": "EMAIL_HERE", "password": "PASSWORD_HERE" }Response Body:
{ "token": "JWT_TOKEN", "expiryTime": XXXXXX }
When calling the following endpoints below a JWT_TOKEN must be passed into the headers as a Bearer Token.
-
Create Expense:
POST /expense/createRequest Body:
{ "amount": XXX, "expenseType": "EXPENSE_TYPE" } -
Update Expense:
PUT /expense/update/{id}Request Body:
{ "amount": XXX, "expenseType": "EXPENSE_TYPE" } -
Update Expense:
DELETE /expense/delete/{id}