Book Catalog & Booking API
Summary
A book catalogue is easy. The lending rules are where this kind of system gets interesting, and where the small ones usually fall over.
This is a FastAPI backend for a library: a catalogue you can search, and a booking engine that enforces the rules rather than trusting the user to follow them.
How it works
Anyone can search by title or author. Signed-in users get the full filters, which are genre, year and availability, and can book up to three books at a time for a maximum of seven days.
Admins have full CRUD over the catalogue and can update booking statuses by hand, which is what happens when a book comes back. Returning a book recursively increments stock, so the availability numbers stay honest without anyone recounting the shelf.
Auth is JWT, validation is Pydantic, and the data lives in PostgreSQL behind SQLAlchemy.
Tech
Python, FastAPI, PostgreSQL, SQLAlchemy, JWT, Pydantic, uv.
What I would change
It is an API with no frontend, so everything is exercised through the docs and the tests rather than through a screen. That kept the scope honest. It also means a librarian could not use it as it stands, which is worth being clear about.
Source
The code is public: https://github.com/rasyidev/booking-book