API service with microservice architecture for sharing things. Provides users, firstly, with the opportunity to tell what things they are willing to share, and secondly, to find the right thing and rent it for some time. The service not only allows you to book an item for certain dates, but also blocks access to it from others during the booking period. In case the required item is not available on the service, users have the opportunity to leave requests. Upon request, it will be possible to add new items for sharing.
Technologies:
- Java 11
- Spring Boot
- Spring Data, Hibernate
- PostgreSQL, SQL
- Maven
- Docker
- Postman
- Lombok
method | path | purpose |
---|---|---|
POST | /users | add new user |
GET | /users/{id} | get user with specified {id} |
PATCH | /users/{id} | update user with specified {id} |
DELETE | /users/{id} | delete user with specified {id} |
GET | /users | get all users |
POST | /items | add new item |
GET | /items/{itemId} | get item with specified {itemId} |
GET | /items | get items of viewer (user) with X_SHARER_USER_ID specified in request header |
GET | /items/search | get items by search text specified in request parameter |
PATCH | /items/{itemId} | update item with specified {itemId} |
POST | /items/{itemId}/comment | add new comment to item with specified {itemId} |
POST | /requests | add new item request |
GET | /requests | get item requests of viewer (user) with X_SHARER_USER_ID specified in request header |
GET | /requests/{requestId} | get item request with specified {requestId} |
GET | /requests/all | get all item requests |
POST | /bookings | add new booking |
GET | /bookings/{bookingId} | get booking with specified {bookingId} |
PATCH | /bookings/{bookingId} | update booking with specified {bookingId} |
GET | /bookings | get bookings of viewer (user) with X_SHARER_USER_ID specified in request header |
GET | /bookings/owner | get bookings of items of viewer (user) with X_SHARER_USER_ID specified in request header |
- mvn package
- docker-compose up
To test the application, you can use the Postman collection.