This is a Library Management System built with Streamlit and MySQL. It provides a user-friendly interface for managing books, users, loans, and reviews in a library setting.
- User authentication (login and signup)
- Book management (add, edit, remove books)
- Book borrowing and returning
- Book reviews and ratings
- Book search functionality
- Admin reports (book stats, most borrowed books, overdue books)
- User-specific book recommendations
- Python 3.7+
- MySQL Server
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activateon Windows
virtualenv venv venv\Scripts\activate
-
Install the required packages:
pip install -r requirements.txt
-
Set up your MySQL database:
- Create a new MySQL database
- Update the
.envfile with your MySQL credentials
-
Initialize the database:
python init_db.py
-
Run the Streamlit app:
streamlit run app.py
-
Open your web browser and go to
http://localhost:8501
app.py: Main application file containing the Streamlit interface and core functionalityinit_db.py: Script to initialize the MySQL database and create necessary tables.env: Configuration file for database credentials (not included in the repository)
The system uses the following tables:
users: Stores user informationbooks: Stores book informationcategories: Stores book categoriesloans: Tracks book loansreviews: Stores book reviews and ratings
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.