All projects
Overview
A library system for a university context, built with Java, JSF and JPA on PostgreSQL. It manages loans and reservations for library resources while guaranteeing that a resource is never promised to two people at once.
Reservations enter a queue and move through explicit states, with automatic expiration so an unclaimed reservation frees the resource for the next person.
What I built
- Built a loan and reservation system that prevents overbooking through inventory validation rules.
- Implemented a reservation queue with a state machine and automatic expiration handling.
- Designed a layered architecture enforcing transactional integrity and domain invariants.
Design and architecture
- Inventory validation runs before every loan or reservation, which is what prevents overbooking.
- Reservation lifecycle is a state machine with automatic expiry handling.
- Layered architecture keeps transactions and domain rules in the service layer, away from the JSF views.