Skip to content

A comprehensive web-based Library Management System built with ASP.NET Web Forms targeting .NET Framework 4.7.2. This application provides a complete solution for managing library operations including book cataloging, user management, borrowing transactions, and administrative oversight.

Notifications You must be signed in to change notification settings

kaustav3071/Library-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Library Management System

A comprehensive web-based Library Management System built with ASP.NET Web Forms targeting .NET Framework 4.7.2. This application provides a complete solution for managing library operations including book cataloging, user management, borrowing transactions, and administrative oversight.

Library Management System .NET Framework SQL Server Bootstrap

🌟 Features Overview

πŸ‘₯ User Portal

  • User Registration & Authentication - Secure account creation and login
  • Book Catalog Browsing - Search and explore the complete book collection
  • Book Borrowing System - Request and manage book loans
  • Personal Dashboard - Track borrowing history and current loans
  • Profile Management - Update personal information and preferences

πŸ›‘οΈ Administrative Portal

  • Command Center Login - Professional, security-focused admin interface
  • Book Management - Complete CRUD operations for book inventory
  • User Management - Monitor and manage registered library members
  • Borrowing Management - Track, approve, and process book returns
  • Analytics Dashboard - Comprehensive statistics and reporting
  • System Configuration - Manage library policies and settings

🎨 Design & User Experience

  • Responsive Design - Optimized for desktop, tablet, and mobile devices
  • Professional UI - Modern, clean interface with intuitive navigation
  • Dark Admin Theme - Sophisticated command center aesthetic for administrators
  • Accessibility Compliant - WCAG guidelines implementation
  • Interactive Elements - Smooth animations and real-time feedback

πŸ› οΈ Technology Stack

Component Technology Version
Backend Framework ASP.NET Web Forms .NET Framework 4.7.2
Database Microsoft SQL Server LocalDB/SQL Server Express
Frontend Framework Bootstrap 5.3.0
Styling CSS3 Custom Professional Themes
JavaScript ES6+ Vanilla JavaScript
Icons Font Awesome 6.4.0
Typography Inter, Segoe UI Google Fonts
Development IDE Visual Studio 2019/2022

πŸ“‹ Prerequisites

Before setting up the Library Management System, ensure you have:

  • Operating System: Windows 10/11 or Windows Server 2016+
  • Development Environment: Visual Studio 2019/2022 (Community, Professional, or Enterprise)
  • .NET Framework: 4.7.2 or higher
  • Database: SQL Server LocalDB (included with Visual Studio) or SQL Server Express/Standard
  • Web Server: IIS Express (for development) or IIS (for production)
  • Browser: Modern web browser (Chrome, Firefox, Edge, Safari)

πŸš€ Installation & Setup

1. Clone the Repository

git clone https://github.com/kaustav3071/Library-Management-System.git
cd Library-Management-System

2. Database Configuration

Option A: Using SQL Server Management Studio

  1. Open SQL Server Management Studio (SSMS)
  2. Connect to your SQL Server instance: (localdb)\MSSQLLocalDB
  3. Create a new database named LibraryDB
  4. Execute the database setup script:
    -- Execute the file: Database/CompleteSchemaSetup.sql

Option B: Using Visual Studio

  1. Open Visual Studio
  2. Go to View β†’ SQL Server Object Explorer
  3. Connect to (localdb)\MSSQLLocalDB
  4. Right-click on Databases β†’ Add New Database β†’ Name it LibraryDB
  5. Right-click on the new database β†’ New Query
  6. Copy and execute the contents of Database/CompleteSchemaSetup.sql

3. Connection String Configuration

Verify the connection string in Web.config:

<connectionStrings>
  <add name="LibraryDBConnection"
       connectionString="Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=LibraryDB;Integrated Security=True;Connect Timeout=30;MultipleActiveResultSets=True"
       providerName="System.Data.SqlClient" />
</connectionStrings>

4. Environment Variables Setup

The .env file contains essential configuration:

ADMIN_EMAIL=admin email
ADMIN_PASSWORD= admin password

5. Build and Run

  1. Open LibraryManagementSystem.sln in Visual Studio
  2. Restore NuGet Packages: Right-click solution β†’ Restore NuGet Packages
  3. Build Solution: Press Ctrl+Shift+B or Build β†’ Build Solution
  4. Run Application: Press F5 or Ctrl+F5
  5. Navigate to: https://localhost:44331/

πŸ” Access Credentials

Administrator Access

  • Login URL: /AdminLogin.aspx
  • Email: admin email
  • Password: admin password
  • Dashboard: Command Center interface with full system control

Test User Account

  • Login URL: /UserLogin.aspx
  • Email: test@example.com
  • Password: password123
  • Features: Full user portal access with borrowing capabilities

πŸ“ Project Architecture

LibraryManagementSystem/
β”œβ”€β”€ πŸ“„ Global.asax                   # Application lifecycle events
β”œβ”€β”€ πŸ“„ Site.Master                   # Master page template
β”œβ”€β”€ πŸ“„ Web.config                    # Application configuration
β”œβ”€β”€ πŸ“„ .env                          # Environment variables
β”‚
β”œβ”€β”€ 🏠 Landing & Welcome/
β”‚   └── πŸ“„ Welcome.aspx              # Home page with navigation
β”‚
β”œβ”€β”€ πŸ‘€ User Interface/
β”‚   β”œβ”€β”€ πŸ“„ UserLogin.aspx            # User authentication
β”‚   β”œβ”€β”€ πŸ“„ UserRegister.aspx         # New user registration
β”‚   β”œβ”€β”€ πŸ“„ BookCatalog.aspx          # Browse and search books
β”‚   └── πŸ“„ UserBorrowings.aspx       # Personal dashboard
β”‚
β”œβ”€β”€ πŸ›‘οΈ Admin Interface/
β”‚   β”œβ”€β”€ πŸ“„ AdminLogin.aspx           # Admin command center login
β”‚   β”œβ”€β”€ πŸ“„ Books.aspx                # Book inventory management
β”‚   β”œβ”€β”€ πŸ“„ Members.aspx              # User account management
β”‚   └── πŸ“„ Borrowings.aspx           # Transaction oversight
β”‚
β”œβ”€β”€ πŸ—‚οΈ Data Access Layer (DAL)/
β”‚   β”œβ”€β”€ πŸ“„ BookDAL.cs                # Book database operations
β”‚   β”œβ”€β”€ πŸ“„ UserDAL.cs                # User account operations
β”‚   β”œβ”€β”€ πŸ“„ BorrowingDAL.cs           # Borrowing transaction logic
β”‚   └── πŸ“„ MemberDAL.cs              # Legacy member support
β”‚
β”œβ”€β”€ πŸ”§ Utilities/
β”‚   β”œβ”€β”€ πŸ“„ UserAuth.cs               # User session management
β”‚   β”œβ”€β”€ πŸ“„ AdminAuth.cs              # Admin authentication
β”‚   └── πŸ“„ EnvReader.cs              # Environment configuration
β”‚
β”œβ”€β”€ 🎨 Content & Styling/
β”‚   β”œβ”€β”€ πŸ“„ admin-professional.css    # Command center styling
β”‚   β”œβ”€β”€ πŸ“„ auth-layout-fixed.css     # Authentication pages
β”‚   β”œβ”€β”€ πŸ“„ welcome-professional.css  # Landing page design
β”‚   └── πŸ“„ [various theme files]     # Component-specific styles
β”‚
β”œβ”€β”€ πŸ“š Database Scripts/
β”‚   β”œβ”€β”€ πŸ“„ CompleteSchemaSetup.sql   # Full database initialization
β”‚   β”œβ”€β”€ πŸ“„ CreateUserTables.sql      # User system setup
β”‚   └── πŸ“„ FixBorrowingsTable.sql    # Database maintenance
β”‚
└── πŸ“¦ Dependencies/
    β”œβ”€β”€ πŸ“ Scripts/                  # JavaScript libraries
    β”œβ”€β”€ πŸ“ Content/                  # CSS frameworks
    └── πŸ“ packages/                 # NuGet packages

πŸ—ƒοΈ Database Schema

Core Tables

Users Table

CREATE TABLE Users (
    Id INT IDENTITY(1,1) PRIMARY KEY,
    Name NVARCHAR(100) NOT NULL,
    Email NVARCHAR(100) NOT NULL UNIQUE,
    Phone NVARCHAR(20),
    PasswordHash NVARCHAR(255) NOT NULL,
    CreatedDate DATETIME NOT NULL DEFAULT GETDATE(),
    IsActive BIT NOT NULL DEFAULT 1
);

Books Table

CREATE TABLE Books (
    Id INT IDENTITY(1,1) PRIMARY KEY,
    Title NVARCHAR(255) NOT NULL,
    Author NVARCHAR(255) NOT NULL,
    ISBN NVARCHAR(50) NOT NULL
);

Borrowings Table

CREATE TABLE Borrowings (
    Id INT IDENTITY(1,1) PRIMARY KEY,
    UserId INT NULL,
    MemberId INT NULL,                  -- Legacy support
    BookId INT NOT NULL,
    BorrowDate DATETIME NOT NULL DEFAULT GETDATE(),
    DueDate DATETIME NULL,
    ReturnDate DATETIME NULL,
    FOREIGN KEY (UserId) REFERENCES Users(Id),
    FOREIGN KEY (BookId) REFERENCES Books(Id)
);

Sample Data Included

  • 3 Test Users with different permission levels
  • 5 Sample Books across various genres and authors
  • Sample Borrowing Records demonstrating system workflows

🎯 User Guide

For Library Members

  1. Getting Started

    • Visit /UserRegister.aspx to create your account
    • Verify your email and complete profile setup
    • Login at /UserLogin.aspx with your credentials
  2. Browsing Books

    • Access the catalog at /BookCatalog.aspx
    • Use search filters to find specific books
    • View book details, availability status, and author information
  3. Borrowing Process

    • Click "Borrow Book" on available titles
    • Confirm borrowing details and due date
    • Track your loans in the personal dashboard
  4. Managing Your Account

    • View borrowing history at /UserBorrowings.aspx
    • Update personal information and contact details
    • Monitor due dates and return status

For Library Administrators

  1. Accessing Admin Portal

    • Navigate to /AdminLogin.aspx
    • Use the command center interface design
    • Access comprehensive administrative tools
  2. Book Management (/Books.aspx)

    • Add new books to the library inventory
    • Edit existing book information (title, author, ISBN)
    • Monitor book availability and borrowing statistics
  3. Member Management (/Members.aspx)

    • View all registered library members
    • Activate or deactivate user accounts
    • Search and filter user records
    • View individual borrowing histories
  4. Transaction Management (/Borrowings.aspx)

    • Monitor all borrowing transactions
    • Process book returns
    • Track overdue items and generate reports
    • Filter transactions by status (active, returned, overdue)

βš™οΈ Configuration Guide

Web.config Settings

<system.web>
  <!-- Session Configuration -->
  <sessionState mode="InProc" timeout="60" cookieless="false" />
  
  <!-- Authentication -->
  <authentication mode="Forms">
    <forms timeout="60" />
  </authentication>
  
  <!-- Security -->
  <httpCookies httpOnlyCookies="true" requireSSL="false" />
</system.web>

Environment Variables (.env)

# Admin Credentials
ADMIN_EMAIL=admin email
ADMIN_PASSWORD=admin password

# Database Configuration (optional)
# DB_CONNECTION_STRING=your_custom_connection_string

# Application Settings (optional)
# APP_NAME=Library Management System
# APP_VERSION=1.0.0

Security Configuration

  • Password Hashing: SHA-256 encryption
  • Session Management: Secure session handling with 60-minute timeout
  • SQL Injection Protection: Parameterized queries throughout
  • Input Validation: Client and server-side validation
  • Admin Authentication: Separate authentication system for administrators

🎨 Theme Customization

Admin Command Center Theme

  • Color Palette: Dark navy (#1a1a2e) with red accents (#e94560)
  • Typography: Inter font family with professional styling
  • Components: Security-focused icons and military-inspired design elements
  • Layout: Command center aesthetic with sophisticated controls

User Portal Theme

  • Color Palette: Light, friendly colors with blue accents
  • Typography: Readable fonts optimized for extended reading
  • Components: Library and book-focused iconography
  • Layout: Welcoming, intuitive design promoting ease of use

πŸ“± Responsive Design

The application adapts seamlessly across all device types:

Device Type Screen Size Features
Desktop 1200px+ Full feature set with expanded layouts
Laptop 992px - 1199px Optimized interface with all functionality
Tablet 768px - 991px Touch-optimized with stacked navigation
Mobile < 768px Streamlined interface with gesture support

πŸ§ͺ Testing Guide

Automated Testing Checklist

  • User registration with validation
  • User and admin authentication flows
  • Book catalog search and filtering
  • Book borrowing and return processes
  • Admin CRUD operations for books and users
  • Database integrity and constraints
  • Responsive design across devices
  • Security measures and input validation

Manual Testing Scenarios

  1. User Journey Testing

    • Complete user registration process
    • Browse and search book catalog
    • Borrow and track books
    • View borrowing history
  2. Admin Workflow Testing

    • Access admin command center
    • Manage book inventory
    • Monitor user accounts
    • Process borrowing transactions
  3. Security Testing

    • Test input validation and sanitization
    • Verify session management
    • Check admin access restrictions
    • Validate password security

πŸš€ Deployment Options

IIS Deployment (Recommended for Production)

  1. Prepare Application

    # Publish from Visual Studio
    Build β†’ Publish β†’ Create Profile β†’ IIS
  2. IIS Configuration

    • Create Application Pool (.NET Framework 4.7.2)
    • Configure bindings and SSL certificates
    • Set appropriate permissions for application directory
  3. Database Deployment

    • Deploy database to production SQL Server
    • Update connection strings for production environment
    • Run database scripts with production data

Azure App Service Deployment

  1. Create Azure Resources

    • Create App Service (.NET Framework 4.7.2)
    • Create Azure SQL Database
    • Configure connection strings in Application Settings
  2. Deploy Application

    • Use Visual Studio Azure deployment
    • Configure continuous deployment with GitHub Actions
    • Set up monitoring and diagnostics

🀝 Contributing

We welcome contributions to improve the Library Management System!

Development Workflow

  1. Fork the repository to your GitHub account
  2. Clone your fork locally
    git clone https://github.com/your-username/Library-Management-System.git
  3. Create a feature branch
    git checkout -b feature/new-feature-name
  4. Make your changes following our coding standards
  5. Test thoroughly on multiple browsers and devices
  6. Commit with descriptive messages
    git commit -m "Add: New feature description"
  7. Push to your fork
    git push origin feature/new-feature-name
  8. Submit a Pull Request with detailed description

Coding Standards

  • Follow C# naming conventions (PascalCase for methods, camelCase for variables)
  • Add XML documentation comments for public methods
  • Write meaningful commit messages
  • Include unit tests for new functionality
  • Ensure responsive design compatibility
  • Maintain consistent code formatting

πŸ“š Documentation

Additional Resources

API Documentation

The system includes comprehensive data access layer documentation:

  • BookDAL: Book management operations
  • UserDAL: User account management
  • BorrowingDAL: Transaction processing
  • Authentication: User and admin session management

πŸ› Troubleshooting

Common Issues and Solutions

Database Connection Issues

Error: Cannot open database "LibraryDB"
Solution: Verify SQL Server LocalDB is running and database exists
Command: sqllocaldb info mssqllocaldb

Authentication Problems

Issue: Unable to login with correct credentials
Solution: Check .env file configuration and password hashing
Location: Utils/UserAuth.cs and Utils/AdminAuth.cs

Build Errors

Error: Missing NuGet packages
Solution: Restore packages in Visual Studio
Steps: Right-click Solution β†’ Restore NuGet Packages

πŸ“ž Support & Contact

Getting Help

  1. Documentation: Check this README and inline code comments
  2. Issues: Search existing GitHub issues before creating new ones
  3. Community: Join discussions in the repository's Discussion section
  4. Direct Contact: Reach out for urgent matters or collaboration

Bug Reports

When reporting bugs, please include:

  • Steps to reproduce the issue
  • Expected vs actual behavior
  • Screenshots or error messages
  • Browser and operating system details
  • Relevant log files or database state

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for full details.

MIT License Summary

  • βœ… Commercial use allowed
  • βœ… Modification and distribution permitted
  • βœ… Private use encouraged
  • ⚠️ Must include license and copyright notice
  • ❌ No warranty or liability provided

πŸ‘¨β€πŸ’» Author & Acknowledgments

Project Author

Kaustav Das

Acknowledgments

  • Microsoft - For the robust .NET Framework and development tools
  • Bootstrap Team - For the excellent responsive UI framework
  • Font Awesome - For the comprehensive icon library
  • Visual Studio Team - For the outstanding development environment
  • Open Source Community - For inspiration and best practices

πŸ”„ Version History & Roadmap

Current Version: 1.0.0

  • βœ… Complete user registration and authentication system
  • βœ… Professional admin command center interface
  • βœ… Comprehensive book catalog and borrowing system
  • βœ… Responsive design across all devices
  • βœ… Database-driven architecture with SQL Server

Planned Features (Future Releases)

  • πŸ“§ Email notifications for due dates and overdue books
  • πŸ“Š Advanced reporting and analytics dashboard
  • πŸ” Enhanced search with filters and categories
  • πŸ“± Mobile app development
  • 🌐 Multi-language support
  • πŸ” Two-factor authentication
  • πŸ“– Digital book support (PDF viewer)
  • πŸ’³ Online payment integration for fines

πŸŽ‰ Getting Started Checklist

  • Clone the repository
  • Set up SQL Server LocalDB
  • Run database setup script
  • Configure connection strings
  • Build and run the application
  • Test with provided credentials
  • Explore both user and admin interfaces
  • Customize themes and configuration as needed

Ready to manage your library efficiently? πŸš€πŸ“š


For the latest updates and releases, please check the GitHub repository and star ⭐ the project if you find it useful!

About

A comprehensive web-based Library Management System built with ASP.NET Web Forms targeting .NET Framework 4.7.2. This application provides a complete solution for managing library operations including book cataloging, user management, borrowing transactions, and administrative oversight.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published