š Library Management System - Complete Instruction Manual
Table of Contents
- System Overview
- Installation & Setup
- System Features
- User Guide
- Administrative Functions
- Troubleshooting
- Technical Details
- API Integration
- Customization
- Support & Maintenance
šÆ System Overview
The Library Management System is a comprehensive web-based application built with Python, Streamlit, and SQLite3. It provides a complete solution for managing library operations including book inventory, student accounts, lending operations, and comprehensive reporting.
Key Capabilities
- Book Management: Add, edit, delete, and browse books with rich metadata
- Student Management: Create and manage student accounts
- Lending Operations: Track book loans, returns, and overdue items
- ISBN Lookup: Automatic book metadata fetching from free APIs
- Advanced Search: Filter and search books by various criteria
- Reporting: Comprehensive analytics and export functionality
- Dark Mode Support: Modern UI with theme compatibility
- Responsive Design: Works on desktop and mobile devices
š Installation & Setup
Prerequisites
- Python 3.8 or higher
- pip (Python package installer)
- Git (for cloning the repository)
Step 1: Download the project file
extract the zip
cd lms
Step 2: Create Virtual Environment
# Windows
python -m venv venv
venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activate
Step 3: Install Dependencies
pip install -r requirements.txt
Step 4: Run the Application
streamlit run app.py
Step 5: Access the Application
Open your web browser and navigate to:
http://localhost:8501
āļø System Features
š Core Modules
1. Dashboard
- Real-time Statistics: Total books, students, active loans, overdue items
- Quick Actions: Direct access to common functions
- System Overview: Current status and recent activities
2. Book Management
- Add Books: Manual entry or ISBN-based auto-fill
- Browse Books: Single-column display with full details
- Edit Books: Modify existing book information
- Delete Books: Remove books from inventory
3. Student Management
- Student Registration: Create new student accounts
- Student Directory: View and manage all students
- Account Updates: Modify student information
4. Lending Operations
- Lend Books: Process book loans to students
- Return Books: Handle book returns
- Loan History: Track all lending activities
- Overdue Management: Monitor and manage overdue items
5. Reports & Analytics
- Lending Reports: Comprehensive loan statistics
- Book Reports: Inventory and usage analytics
- Student Reports: Student activity and borrowing patterns
- Export Functionality: Download data in CSV format
š User Guide
š Dashboard Navigation
Sidebar Menu
The sidebar provides always-visible navigation with the following sections:
- š Dashboard - Main overview page
- š Book Management - All book-related operations
- š„ Student Management - Student account operations
- š Lending Operations - Loan and return management
- š Reports & Analytics - Data analysis and reporting
Quick Actions
- ā Add New Book - Direct access to book addition
- š¤ Lend Book - Quick loan processing
š Book Management
Adding a New Book
Method 1: Manual Entry
- Navigate to Book Management ā Add Book
- Fill in all required fields:
- ISBN: 10 or 13 digit number
- Title: Book title
- Author: Author name
- Publisher: Publishing company
- Published Date: Publication year
- Pages: Number of pages
- Subjects: Categories or topics
- Cover Image URL: Book cover image link
- Copies: Number of available copies
- Click Add Book to save
Method 2: ISBN Auto-Fill
- Enter the ISBN number
- Click š Lookup ISBN button
- Review fetched metadata
- Click Use This Information to auto-fill the form
- Modify any fields if needed
- Click Add Book to save
Browsing Books
- Navigate to Book Management ā Browse Books
- Use search and filter options:
- Search: Find books by title, author, or ISBN
- Availability Filter: Show all, available, or borrowed books
- Sort Options: Sort by title, author, or date added
- View books in single-column layout with full details
- Use šļø View Complete Details for expanded information
Editing Books
- Navigate to Book Management ā Edit Book
- Select the book to edit from the dropdown
- Modify any fields as needed
- Click Update Book to save changes
Deleting Books
- Navigate to Book Management ā Delete Book
- Select the book to delete from the dropdown
- Confirm deletion by clicking Delete Book
š„ Student Management
Adding Students
- Navigate to Student Management ā Add Student
- Fill in student information:
- Student ID: Unique identifier
- Name: Full name
- Email: Email address
- Phone: Contact number
- Department: Academic department
- Click Add Student to register
Managing Students
- Navigate to Student Management ā View Students
- View all registered students
- Use search to find specific students
- Download student list as CSV if needed
š Lending Operations
Lending Books
- Navigate to Lending Operations ā Lend Book
- Select student from dropdown
- Select book from dropdown
- Set loan period (default: 14 days)
- Click Lend Book to process
Returning Books
- Navigate to Lending Operations ā Return Book
- Select the loan record to return
- Click Return Book to process
Viewing Loans
- Navigate to Lending Operations ā View Loans
- See all active and completed loans
- Filter by status (Active, Overdue, Returned)
- Search by student or book
š Reports & Analytics
Available Reports
- Lending Summary: Overview of all lending activities
- Overdue Books: List of overdue items with days overdue
- Student Activity: Individual student borrowing patterns
- Book Usage: Most and least borrowed books
Exporting Data
- Navigate to any report section
- Click Download CSV button
- Save the file to your local system
š ļø Administrative Functions
Database Management
- Automatic Schema Updates: System automatically migrates database schema
- Data Backup: Export functionality for data backup
- Sample Data: Initial setup includes sample books and students
System Configuration
- Page Layout: Wide layout for better data display
- Sidebar State: Always expanded for easy navigation
- Theme Support: Compatible with light and dark themes
š§ Troubleshooting
Common Issues & Solutions
1. "Please fill in all required fields!" Error
Problem: Form submission fails after auto-fill
Solution:
- Ensure all required fields have values
- Check that ISBN is valid (10 or 13 digits)
- Verify cover image URL is accessible
2. ISBN Lookup Not Working
Problem: API calls fail to fetch book data
Solution:
- Check internet connection
- Verify ISBN format (remove hyphens)
- Try alternative ISBN if available
- Wait a few minutes and retry (API rate limiting)
3. Image Display Issues
Problem: Book covers not showing
Solution:
- Verify image URL is accessible
- Check if URL requires authentication
- Use placeholder images for missing covers
4. Performance Issues
Problem: Slow loading or unresponsive interface
Solution:
- Clear browser cache
- Restart the Streamlit application
- Check database size and optimize if needed
5. Database Errors
Problem: SQLite database corruption or errors
Solution:
- Delete the
library.db file
- Restart the application (will recreate database)
- Restore from CSV exports if available
Error Messages Reference
| Error Message | Cause | Solution |
|---|
| "ISBN must be 10 or 13 digits" | Invalid ISBN format | Enter valid ISBN number |
| "Email too short" | Invalid email format | Use valid email address |
| "Phone number too short" | Invalid phone format | Enter complete phone number |
| "Book already exists" | Duplicate ISBN | Use different ISBN or edit existing book |
| "Student not found" | Invalid student selection | Select valid student from dropdown |
š¬ Technical Details
Architecture
- Frontend: Streamlit web interface
- Backend: Python business logic
- Database: SQLite3 with automatic migrations
- APIs: OpenLibrary and Google Books integration
File Structure
lms/
āāā app.py # Main application file
āāā requirements.txt # Python dependencies
āāā database/
ā āāā models.py # Database schema and management
ā āāā operations.py # Business logic and CRUD operations
āāā utils/
ā āāā helpers.py # Utility functions and UI components
āāā README.md # Project documentation
āāā INSTRUCTION_MANUAL.md # This manual
Database Schema
- books: Book inventory with metadata
- students: Student account information
- loans: Lending transaction records
- users: System user accounts (if implemented)
API Integration
- OpenLibrary API: Primary book metadata source
- Google Books API: Fallback metadata source
- Timeout: 10 seconds for API calls
- Fallback Strategy: Automatic fallback between APIs
š API Integration
ISBN Lookup Process
- Input Validation: Clean ISBN (remove hyphens/spaces)
- Primary API: Try OpenLibrary API first
- Fallback API: Use Google Books if OpenLibrary fails
- Data Processing: Extract and format metadata
- Auto-fill: Populate form fields automatically
Supported Metadata Fields
- Title, Author(s), Publisher, Published Date
- Number of Pages, Subjects/Categories
- Cover Image URL, ISBN, Data Source
API Limitations
- OpenLibrary: Free, no API key required
- Google Books: Free tier with rate limits
- Cover Images: Quality may vary between sources
šØ Customization
UI Customization
- CSS Styling: Modify
utils/helpers.py CSS section
- Color Schemes: Update color variables in CSS
- Layout: Adjust column widths and spacing
- Fonts: Modify typography settings
Functionality Extensions
- New Fields: Add database columns and form fields
- Additional APIs: Integrate more book data sources
- Custom Reports: Create new analytics views
- Export Formats: Add PDF or Excel export options
Configuration Options
- Loan Periods: Modify default lending duration
- Search Filters: Add new search criteria
- Validation Rules: Customize input validation
- Notification Settings: Configure alert preferences
š Support & Maintenance
Regular Maintenance
- Database Backups: Export data regularly using CSV export
- Log Monitoring: Check application logs for errors
- Performance Monitoring: Monitor response times and resource usage
- Update Dependencies: Keep Python packages updated
Backup Procedures
- Data Export: Use built-in CSV export for all tables
- Database File: Copy
library.db file
- Configuration: Document any custom settings
- Regular Schedule: Weekly or monthly backups
Update Procedures
- Backup Data: Export all data before updates
- Update Code: Pull latest changes from repository
- Install Dependencies: Update Python packages
- Test Functionality: Verify all features work correctly
- Restore Data: Import data if database was reset
Getting Help
- Documentation: Refer to this manual and README.md
- Code Comments: Check inline code documentation
- Error Logs: Review Streamlit error messages
- Community Support: Streamlit and Python communities
š Quick Reference
Keyboard Shortcuts
- Ctrl+R: Refresh page
- Ctrl+F: Find in page
- F5: Reload application
Common Operations
- Add Book: Book Management ā Add Book
- Lend Book: Lending Operations ā Lend Book
- Search Books: Book Management ā Browse Books ā Search
- View Reports: Reports & Analytics
- Export Data: Click Download CSV buttons
System Requirements
- Minimum: Python 3.8, 4GB RAM, 1GB storage
- Recommended: Python 3.9+, 8GB RAM, 2GB storage
- Browser: Modern web browser (Chrome, Firefox, Safari, Edge)
š Contact & Support
For technical support or feature requests:
- Repository: Check the project repository for issues
- Documentation: Refer to this manual and README.md
- Community: Engage with Streamlit and Python communities
This manual covers version 2.0 of the Library Management System. For updates and additional information, refer to the project repository and documentation.