This is the backend for the budgeting website. It should provide for the majority of processing and logic for the website. Users should be able to create secure accounts, store income and expense records, categorize those records into bucket, and budget their finances. Statistics should also be provided, such as net income over time.
Currently, several databases are intended to be supported. They include MySQL, PostgreSQL, MariaDB, SQLite, and H2. For testing, H2 is being used.
The project-specific configurations you can set in the YAML file you'll provide to the program.
database-url <String>
- the url to the database.
admin-username <String>
- the username of the admin account to be autogenerated.
admin-password <String>
- the password of the admin account to be autogenerated.
max-username-length <Integer>
- the maximum length to allow for usernames.
The schema for initializing the database can be found at src/main/resources/schema.sql.
POST
/account/{uuid}Creates a new account with the provided username and password.
{
username: String,
password: String
}
AUTH:Basic
DELETE
/account/{username}Delete an existing account based on the provided username. Will return 401 if the provided credentials does not correspond to an account with the admin role or is not the same account that is being deleted.
AUTH:Basic
PUT
/account/passwordUpdate the password of authenticated account.
{
password: String
}
AUTH:Basic
Permited:ADMIN
PUT
/account/{username}/rolesUpdate the roles of the account of the provided username. The roles should be comma-delimited. They are case-sensitive. The allowed roles are USER and ADMIN.
{
roles: String
}
AUTH:Basic
POST
/bucketCreate a new bucket.
{
name: String,
share: Double
}
AUTH:Basic
DELETE
/bucket/{uuid}Delete the bucket associated with the provided UUID.
AUTH:Basic
PUT
/bucket/{uuid}Update the bucket associated with the provided UUID.
{
name: String,
share: Double
}
AUTH:Basic
GET
/bucketGet the authenicated user's buckets.
{
[
{
uuid: String,
created: LocalDateTime,
updated: LocalDateTime,
owner: String,
name: String,
share: Double,
amount: Long
},
...
]
}
AUTH:Basic
POST
/record/incomeAdd an income record.
{
amount: Integer,
year: Integer,
month: Integer,
day: Integer,
category: String,
description: String
}
uuid: String
AUTH:Basic
POST
/record/expenseAdd an expense record.
{
amount: Integer,
year: Integer,
month: Integer,
day: Integer,
category: String,
description: String,
bucket: String
}
uuid: String
AUTH:Basic
DELETE
/record/income/{uuid}Delete an income record.
AUTH:Basic
DELETE
/record/expense/{uuid}Delete an expense record.
AUTH:Basic
GET
/record/incomeGet income records in the time range. Month and day values start at 1. So, January 1st, 2024, would be ...startYear=2024&startMonth=1&startDay=1...
startYear: String
startMonth: String
startDay: String
endYear: String
endMonth: String
endDay: String
AUTH:Basic
GET
/record/expenseGet expense records in the time range. Month and day values start at 1. So, January 1st, 2024, would be ...startYear=2024&startMonth=1&startDay=1...
startYear: String
startMonth: String
startDay: String
endYear: String
endMonth: String
endDay: String
AUTH:Basic
PUT
/record/income/{uuid}Update an income record.
{
amount: Integer,
year: Integer,
month: Integer,
day: Integer,
category: String,
description: String
}
AUTH:Basic
PUT
/record/expense/{uuid}Update an expense record.
{
amount: Integer,
year: Integer,
month: Integer,
day: Integer,
category: String,
description: String,
bucket: String
}