An open API service indexing awesome lists of open source software.

https://github.com/jashjani02/library-management-system

A Flask-based Library Management System that supports CRUD operations on Books and Users, along with Borrow & Return functionality, accessible via REST API and a simple web interface.
https://github.com/jashjani02/library-management-system

bash bash-script curl flask-application html-css python python3 tailwindcss

Last synced: about 2 months ago
JSON representation

A Flask-based Library Management System that supports CRUD operations on Books and Users, along with Borrow & Return functionality, accessible via REST API and a simple web interface.

Awesome Lists containing this project

README

          

# Library Management System

A full-stack Library Management System built with Flask and TailwindCSS for styling.
This project demonstrates server–client separation with both API endpoints (for programmatic access) and a web-based UI (for users and librarians).

## Tech-Stack


  1. Python (Flask)

  2. HTML

  3. CSS (Tailwind)

  4. curl (for API testing)

## Project Structure
```mermaid

graph TD
subgraph Library Management

app.py

subgraph templates/
base.html
home.html

subgraph admin/
dashboard.html
books_admin.html
users_admin.html
end

subgraph user/
user_dashboard.html
books_user.html
end

end

subgraph models/
_init_.py
book.py
user.py
library.py
user_manager.py
end
subgraph services/
__init__.py
book_api.py
book_service.py
user_service.py

end

subgraph routes/
init.py
admin_routes.py
user_routes.py

subgraph api/
__init__.py
books.py
users.py
end
end

subgraph tests/
test_api.sh
end

end

```
### Image of the Project Structure

## Features



    • Book Management
    • Add, view, search, and delete books

    • Track availability (borrowed vs available)




    • User Management
    • Add, view, and delete users

    • Track borrowed books per user




    • Borrow & Return System
    • Users can borrow available books

    • Return borrowed books and free them up for others




    • API-Endpoints
    • REST-style JSON APIs for books and users

    • Tested via curl and test_api.sh script




    • Admin Interface
    • Dashboard with total books and users

    • Manage books and users through forms




    • User Interface
    • User dashboard with profile info

    • Browse available books

    • View borrowed books



## Workflow


  1. Server initialization



    • app.pysets up Flask and configures global singletons:


    • Library manages all the books


    • UserManager manages all the users



  2. Models Layer (models/)


    • Book - represents a single book (title, author, ISBN, etc.)

    • Library – manages a collection of books (add, delete, borrow, return)

    • User – represents a library user (profile + borrowed books)

    • UserManager – manages all users



  3. Routing Layer(routes/)


    • API Routes /api/... - JSON endpoints for programmatic access


      • /api/books - CRUD Operations on books


      • /api/users - CRUD Operations on users & borrow/return actions



    • Admin Routes (/admin/...) – librarian dashboard & book/user management

    • User Routes (/user/...) – user dashboard, profile info, browse/borrow books



  4. Services Layer(services/)


    • Placeholder for integrating external APIs (e.g., Google Books, OpenLibrary)

    • Can extend functionality without touching core models



  5. Frontend(templates/ + static/)

    • Admin UI – dashboards for librarians to manage books and users

    • User UI – dashboards for users to browse and borrow books


  6. Testing(tests/)



    • test_api.sh runs a sequence of curl requests

      • Add users/books

      • Borrow/return flow

      • Check admin and user pages



    • Confirms both API and HTML endpoints are functional


## Future Improvements


  1. Add user authentication & roles (librarian vs user)

  2. Improve UI with Tailwind components (modals, tables, forms)

  3. Extend services with external APIs (Google Books, OpenLibrary)

## TL;DR

A Flask-based Library Management System that supports CRUD operations on Books and Users, along with Borrow & Return functionality, accessible via REST API and a simple web interface.