- ➕ Add books — title, author, genre, year, status
- 📋 View all books in a clean, sortable table
- ✏️ Edit any book's details
- 🗑️ Delete books with a confirmation prompt
- 🔍 Search by title, author, or genre
- 🏷️ Status badges — Available / Borrowed
- 💾 Persistent SQLite database (no setup needed)
- 📱 Responsive design
library-book-manager/
├── app.py # Flask routes & app config
├── database.py # SQLite CRUD functions
├── requirements.txt # Python dependencies
├── .gitignore
├── README.md
├── templates/
│ ├── base.html # Shared layout
│ ├── index.html # Book list + search
│ ├── add_book.html # Add book form
│ └── edit_book.html # Edit book form
└── static/
└── css/
└── style.css # All styling
git clone https://github.com/YOUR_USERNAME/library-book-manager.git
cd library-book-managerpython -m venv venv
# Windows
venv\Scripts\activate
# macOS / Linux
source venv/bin/activatepip install -r requirements.txtpython app.pyOpen your browser at http://127.0.0.1:5000
The SQLite database (
library.db) is created automatically on first run.
| Layer | Technology |
|---|---|
| Backend | Python 3, Flask |
| Database | SQLite (built-in) |
| Frontend | HTML5, CSS3 |
| Templates | Jinja2 (Flask) |
| Route | Description |
|---|---|
/ |
All books + search |
/add |
Add a new book |
/edit/<id> |
Edit a book |
/delete/<id> |
Delete (POST only) |