docker compose up -d
mvn spring-boot:run
No | Endpoints | Auth Requires | Authorize | Information |
---|---|---|---|---|
1 | POST /api/v1/auth/register |
❌ | - | Sign up as a new user |
2 | POST /api/v1/auth/login |
❌ | - | Login and get JWT |
3 | GET /api/v1/users/me |
✅ | (USER, ADMIN, SUPER_ADMIN) | Take authenticated users |
4 | GET /api/v1/users |
✅ | (ADMIN, SUPER_ADMIN) | Take all users have role User |
5 | GET /api/v1/expenses/{idExpense} |
✅ | (USER) | Take detail expenses |
6 | POST /api/v1/expenses |
✅ | (USER) | Add new expenses |
7 | GET /api/v1/expenses |
✅ | (USER) | Take all user expenses |
8 | PUT /api/v1/expenses/{idExpense} |
✅ | (USER) | Edit user expenses |
9 | DELETE /api/v1/expenses/{idExpense} |
✅ | (USER) | Remove user expenses |
{
"email": "string",
"password": "string"
}
{
"email": "string",
"password": "string"
}
Required Header
Authorization: Bearer your token
Take all users with pagination /api/v1/users?size=10&page=0
Required Header
Authorization: Bearer your token
Required Header
Authorization: Bearer your token
Required Header
Authorization: Bearer your token
{
"description": "string",
"amount": "number",
"category": "string"
}
Take all User Expense with pagination and sorting /api/v1/expenses?size=10&page=0&sort=createdAt,desc
Take all filtered User Expense
- last week
/api/v1/expenses?filter=week
- past month
/api/v1/expenses?filter=month
- last 3 month
/api/v1/expenses?filter=3month
Take all Filtered and Pagination Expenses
/api/v1/expenses?filter=week&size=10&page=0&sort=createdAt,desc
Required Header
Authorization: Bearer your token
Required Header
Authorization: Bearer your token
{
"description": "string",
"amount": "number",
"category": "string"
}
Required Header
Authorization: Bearer your token
-
Spring Framework
- Spring Boot Starter Web
- Spring Boot Starter Data JPA
- Spring Boot Starter Validation
- Spring Boot Starter Security
-
Database
- Postgresql
-
Migration Tools
- Flyway
-
JWT
- jjwt api
- jjwt jackson
- jjwt impl
-
Utillities
- Lombok
Menerapkan token based autentikasi JWT dalam aplikasi Spring Boot 3