The Budget Control API is an interface that helps users manage their finances by tracking revenue and expenses, enabling them to generate monthly financial summaries.
- Java 17
- Spring Boot 3.3.4
- PostgreSQL
- Retrieve all revenues:
GET /revenue
- Retrieve a specific revenue by ID:
GET /revenue/{id}
- Create a new revenue:
POST /revenue
- Update an existing revenue by ID:
PUT /revenue/{id}
- Delete a revenue by ID:
DELETE /revenue/{id}
- Retrieve revenues filtered by year and month:
GET /revenue/{year}/{month}
- Retrieve all expenses:
GET /expense
- Retrieve a specific expense by ID:
GET /expense/{id}
- Create a new expense:
POST /expense
- Update an existing expense by ID:
PUT /expense/{id}
- Delete an expense by ID:
DELETE /expense/{id}
- Retrieve expenses filtered by year and month:
GET /expense/{year}/{month}
- Retrieve the financial summary for a specific month:
GET /summary/{year}/{month}
- Register a new user:
POST /auth/signup
- Authenticate user and return JWT token:
POST /auth/login
Before you begin, ensure you have the following installed:
- Java 17
- PostgreSQL 14.5 or higher (optional Docker setup for PostgreSQL)
- Maven for managing dependencies
The project uses PostgreSQL 14.5. To set up using Docker, run the following command:
docker run --name localhost_postgresql -d \
-e POSTGRES_DB=bcontrol \
-e POSTGRES_USER=test \
-e POSTGRES_PASSWORD=r00t \
-p 5432:5432 \
postgres:14.5
To get started, clone the repository by running the following command:
git clone https://github.com/davisaints/budget-control.git
To install all the required project dependencies, navigate to the project directory and run the following command:
mvn dependency:resolve
To start the Spring Boot application, run the following command:
mvn spring-boot:run
Once the application is running, you can access the API documentation via Swagger UI at:
http://localhost:8080/swagger-ui/index.html
This interface provides an easy way to test the API endpoints, view documentation, and interact with the application.