This was the main project I built while learning full-stack development in SWEN 344. I first modeled a multi-branch library in PostgreSQL and wrote its business logic in Python, then turned the same system into a Flask REST API with users, sessions, book management, and history. It was a useful way to learn how a database, domain layer, and HTTP API fit together.
Building the database first
The first version was a Python library system built directly on a ten-table PostgreSQL database. It handled users, books, physical inventory copies, multiple library branches, checkout history, reservations, returns, overdue lockouts, CSV imports, and reports.
Books and physical copies were kept separate, so several branches could hold copies of the same title. Book history worked like an event log. Returning a book could automatically find the oldest reservation and check that same copy out to the person who had been waiting longest.
Turning it into a REST service
The second phase put Flask-RESTful endpoints in front of the database and business logic. The API could create and update users, log them in and out, search books, check out, return, or reserve a book, and filter borrowing history.
This phase also added session tokens and password hashing. Tests called the running server over HTTP, which gave me practice testing the complete path from a request through the API and Python code into PostgreSQL.
What the course connected
The larger SWEN 344 workspace continued from PostgreSQL to Python data access, Flask APIs, and React clients. I also built a nutrition tracker and a vending-machine interface, but this page stays focused on the library system because it shows the database-to-REST progression most clearly.
