This project is crafted in Kotlin, leveraging the Spring Boot Framework, and using PostgreSQL as the primary database. Additionally, TimescaleDB is used for optimized time-series data management, facilitating efficient storage and querying of monthly statistics. The application also integrates Spring's scheduling capabilities for automated tasks such as periodic data updates and statistical aggregations.
- Endpoint:
POST /auth/register
- Description: Registers a new user.
- Request Body:
RegistrationRequest
- Response:
AuthenticationResponse
- HTTP Response Code: 201 (Created)
Example:
POST /auth/register
Content-Type: application/json
{
"name": "Renato",
"email": "[email protected]",
"password": "password"
}
- Endpoint:
POST /auth/login
- Description: Authenticates a user.
- Request Body:
AuthenticationRequest
- Response:
AuthenticationResponse
- HTTP Response Code: 200 (OK)
Example:
POST /auth/login
Content-Type: application/json
{
"email": "[email protected]",
"password": "password"
}
- Endpoint:
GET /budgets/remaining
- Description: Retrieves the remaining budget.
- Response:
RemainingBudgetDto
- HTTP Response Code: 200 (OK)
Example:
GET /budgets/remaining
- Endpoint:
GET /settings
- Description: Retrieves user settings.
- Response:
SettingsDtoOut
- HTTP Response Code: 200 (OK)
Example:
GET /settings
- Endpoint:
POST /settings
- Description: Adds new settings.
- Request Body:
CreatingSettingsDto
- Response:
SettingsDtoOut
- HTTP Response Code: 204 (No Content)
Example:
POST /settings
Content-Type: application/json
{
"monthlyBudgetValue": 5000
}
- Endpoint:
PUT /settings
- Description: Updates user settings.
- Request Body:
CreatingSettingsDto
- Response:
SettingsDtoOut
- HTTP Response Code: 200 (OK)
Example:
PUT /settings
Content-Type: application/json
{
"monthlyBudgetValue": 6000
}
- Endpoint:
GET /transactions
- Description: Retrieves a paginated list of all transactions.
- Parameters:
Pageable
(for pagination) - Response: Paginated list of
TransactionOutDto
- HTTP Response Code: 200 (OK)
Example:
GET /transactions?page=0&size=10
- Endpoint:
GET /transactions/{transactionId}
- Description: Retrieves a transaction by its ID.
- Path Variable:
transactionId
(Transaction ID) - Response:
TransactionOutDto
- HTTP Response Code: 200 (OK)
Example:
GET /transactions/<UUID>
- Endpoint:
POST /transactions
- Description: Creates a new transaction.
- Request Body:
TransactionInDto
- Response:
TransactionOutDto
- HTTP Response Code: 204 (No Content)
Example:
POST /transactions
Content-Type: application/json
{
"amount": -150.50,
"category": "ENTERTAINMENT",
"description": "Nintendo Switch Black Friday"
}
- Endpoint:
DELETE /transactions/{transactionId}
- Description: Deletes a transaction by its ID.
- Path Variable:
transactionId
(Transaction ID) - Response:
Void
- HTTP Response Code: 204 (No Content)
Example:
DELETE /transactions/<UUID>
- Endpoint:
GET /transactions/summary/monthly
- Description: Retrieves a monthly summary of transactions.
- Parameters:
category
(optional) - Response: List of
TransactionMonthlySummaryDto
- HTTP Response Code: 200 (OK)
Example:
GET /transactions/summary/monthly?category=FOOD