Skip to content

nomaan5541/library_full_project_AI_

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 Modern Library Management System

Python Flask HTML5 CSS3 JavaScript SQLite

A full-featured, modern web application for managing a library's collection and members, complete with an integrated AI assistant powered by the Gemini API.

This project is a comprehensive, user-friendly platform built with Python Flask on the backend and a dynamic, responsive interface on the frontend. It provides a seamless and intuitive experience for both library members and administrators, featuring a sleek dark/light mode UI, robust user management with secure authentication, and intelligent search capabilities. The application is designed to be both lightweight and powerful, making it an ideal solution for managing a small to medium-sized library.


✨ Key Features

  • 👤 Full User Authentication: A complete and secure registration and login system for members, featuring password hashing to ensure user data is always protected.
  • 👮 Role-Based Access Control: The application distinguishes between regular users and administrators, providing a tailored interface and a separate set of powerful permissions for each role.
  • 📚 Complete Book Management (Admin): Administrators have full control over the library's catalog. Through an intuitive interface, admins can add, edit, and delete books, including rich details like external cover image URLs, genres, and detailed descriptions.
  • 👥 Member Management (Admin): The admin dashboard includes a comprehensive view of all registered members, giving administrators the authority to manage the user base and remove user accounts as needed.
  • 🔍 Powerful Search & Filtering: Users can effortlessly search the entire catalog by book title or author. Additionally, they can filter the collection by genre, making it easy to discover new books.
  • 📖 Book Detail Pages: Every book has its own dedicated page that displays its cover image, a full description, publication year, genre, and its current borrowing status, providing a rich browsing experience.
  • 🙋‍♂️ User Profiles: Each user gets a public profile page that showcases their chosen bio and a complete, detailed history of all the books they have borrowed, both past and present.
  • 🤖 Live AI Assistant: An integrated chatbot, directly connected to the Gemini API, can answer any user question in real-time, providing a smart and interactive way to get help or explore topics.
  • 💾 Persistent Chat History: The AI assistant remembers your entire conversation using browser storage. You can leave the page and return later to find your chat history exactly as you left it.
  • 🎨 Dual-Theme UI: A beautiful and modern interface with a convenient toggle for both dark and light themes. The user's preference is automatically saved in their browser for a consistent experience on return visits.
  • ⚙️ Comprehensive Settings: Users have full control over their account. They can update their profile information (username, email, bio), change their password through a secure form, and permanently delete their own account.

🛠️ Tech Stack

  • Backend: Python with the Flask framework, chosen for its lightweight nature and flexibility, making it perfect for building fast and scalable web applications.
  • Database: SQLite, a self-contained, serverless database engine that is simple to set up and manage, with all data stored in a single .db file. All database interactions are handled through the powerful SQLAlchemy ORM.
  • Frontend: Standard and reliable HTML, CSS, and Vanilla JavaScript are used to create a responsive and interactive user experience without the need for heavy frontend frameworks.
  • Authentication: Flask-Login is used to manage user sessions, handle logins and logouts, and protect routes that require authentication.
  • AI Integration: Live API calls are made to Google's Gemini API using the requests library, providing state-of-the-art AI capabilities directly within the application.

🚀 Getting Started

To get a local copy up and running, follow these simple steps.

Prerequisites

Make sure you have Python 3 installed on your system. You can check this by running python --version. It's also highly recommended to use a virtual environment to manage project dependencies.

Installation

  1. Clone the repository:

    git clone [https://github.com/nomaan5541/library_full_project_AI_](https://github.com/nomaan5541/library_full_project_AI_)
    cd your-library_full_project_AI_
  2. (Recommended) Create and activate a virtual environment:

    # For Windows
    python -m venv venv
    .\venv\Scripts\activate
    
    # For macOS/Linux
    python3 -m venv venv
    source venv/bin/activate
  3. Install the required Python packages:

    pip install Flask Flask-SQLAlchemy Flask-Login Werkzeug requests
  4. Run the application:

    python app.py

    The first time you run the script, it will automatically create the library.db file and populate it with a default admin user and some sample books.

  5. Open in your browser: Navigate to http://127.0.0.1:5000 to see the application live. The default admin credentials are admin / admin123.


📸 Screenshots

Login Page All Books Page
![Login](image
) ![All Books](image
)
AI Assistant Book Details
![Chatbot](image
) ![Book Detail](image
)

✒️ Design Credit

This project was designed and developed by VIRUS.

About

This project is a comprehensive, user-friendly platform built with Python Flask on the backend and a dynamic, responsive interface on the frontend. It provides a seamless and intuitive experience for both library members and administrators, featuring a sleek dark/light mode UI, robust user management with secure authentication, and intelligent sea

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors