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.
- 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
- 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
- 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
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 |
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)
git clone https://github.com/kaustav3071/Library-Management-System.git
cd Library-Management-System
- Open SQL Server Management Studio (SSMS)
- Connect to your SQL Server instance:
(localdb)\MSSQLLocalDB
- Create a new database named
LibraryDB
- Execute the database setup script:
-- Execute the file: Database/CompleteSchemaSetup.sql
- Open Visual Studio
- Go to View β SQL Server Object Explorer
- Connect to
(localdb)\MSSQLLocalDB
- Right-click on Databases β Add New Database β Name it
LibraryDB
- Right-click on the new database β New Query
- Copy and execute the contents of
Database/CompleteSchemaSetup.sql
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>
The .env
file contains essential configuration:
ADMIN_EMAIL=admin email
ADMIN_PASSWORD= admin password
- Open
LibraryManagementSystem.sln
in Visual Studio - Restore NuGet Packages: Right-click solution β Restore NuGet Packages
- Build Solution: Press
Ctrl+Shift+B
or Build β Build Solution - Run Application: Press
F5
orCtrl+F5
- Navigate to:
https://localhost:44331/
- Login URL:
/AdminLogin.aspx
- Email:
admin email
- Password:
admin password
- Dashboard: Command Center interface with full system control
- Login URL:
/UserLogin.aspx
- Email:
test@example.com
- Password:
password123
- Features: Full user portal access with borrowing capabilities
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
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
);
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
);
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)
);
- 3 Test Users with different permission levels
- 5 Sample Books across various genres and authors
- Sample Borrowing Records demonstrating system workflows
-
Getting Started
- Visit
/UserRegister.aspx
to create your account - Verify your email and complete profile setup
- Login at
/UserLogin.aspx
with your credentials
- Visit
-
Browsing Books
- Access the catalog at
/BookCatalog.aspx
- Use search filters to find specific books
- View book details, availability status, and author information
- Access the catalog at
-
Borrowing Process
- Click "Borrow Book" on available titles
- Confirm borrowing details and due date
- Track your loans in the personal dashboard
-
Managing Your Account
- View borrowing history at
/UserBorrowings.aspx
- Update personal information and contact details
- Monitor due dates and return status
- View borrowing history at
-
Accessing Admin Portal
- Navigate to
/AdminLogin.aspx
- Use the command center interface design
- Access comprehensive administrative tools
- Navigate to
-
Book Management (
/Books.aspx
)- Add new books to the library inventory
- Edit existing book information (title, author, ISBN)
- Monitor book availability and borrowing statistics
-
Member Management (
/Members.aspx
)- View all registered library members
- Activate or deactivate user accounts
- Search and filter user records
- View individual borrowing histories
-
Transaction Management (
/Borrowings.aspx
)- Monitor all borrowing transactions
- Process book returns
- Track overdue items and generate reports
- Filter transactions by status (active, returned, overdue)
<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>
# 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
- 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
- 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
- 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
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 |
- 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
-
User Journey Testing
- Complete user registration process
- Browse and search book catalog
- Borrow and track books
- View borrowing history
-
Admin Workflow Testing
- Access admin command center
- Manage book inventory
- Monitor user accounts
- Process borrowing transactions
-
Security Testing
- Test input validation and sanitization
- Verify session management
- Check admin access restrictions
- Validate password security
-
Prepare Application
# Publish from Visual Studio Build β Publish β Create Profile β IIS
-
IIS Configuration
- Create Application Pool (.NET Framework 4.7.2)
- Configure bindings and SSL certificates
- Set appropriate permissions for application directory
-
Database Deployment
- Deploy database to production SQL Server
- Update connection strings for production environment
- Run database scripts with production data
-
Create Azure Resources
- Create App Service (.NET Framework 4.7.2)
- Create Azure SQL Database
- Configure connection strings in Application Settings
-
Deploy Application
- Use Visual Studio Azure deployment
- Configure continuous deployment with GitHub Actions
- Set up monitoring and diagnostics
We welcome contributions to improve the Library Management System!
- Fork the repository to your GitHub account
- Clone your fork locally
git clone https://github.com/your-username/Library-Management-System.git
- Create a feature branch
git checkout -b feature/new-feature-name
- Make your changes following our coding standards
- Test thoroughly on multiple browsers and devices
- Commit with descriptive messages
git commit -m "Add: New feature description"
- Push to your fork
git push origin feature/new-feature-name
- Submit a Pull Request with detailed description
- 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
- ASP.NET Web Forms Documentation
- SQL Server Documentation
- Bootstrap 5 Documentation
- Font Awesome Icons
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
Error: Cannot open database "LibraryDB"
Solution: Verify SQL Server LocalDB is running and database exists
Command: sqllocaldb info mssqllocaldb
Issue: Unable to login with correct credentials
Solution: Check .env file configuration and password hashing
Location: Utils/UserAuth.cs and Utils/AdminAuth.cs
Error: Missing NuGet packages
Solution: Restore packages in Visual Studio
Steps: Right-click Solution β Restore NuGet Packages
- Documentation: Check this README and inline code comments
- Issues: Search existing GitHub issues before creating new ones
- Community: Join discussions in the repository's Discussion section
- Direct Contact: Reach out for urgent matters or collaboration
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
This project is licensed under the MIT License - see the LICENSE file for full details.
- β Commercial use allowed
- β Modification and distribution permitted
- β Private use encouraged
β οΈ Must include license and copyright notice- β No warranty or liability provided
Kaustav Das
- GitHub: @kaustav3071
- Repository: Library-Management-System
- LinkedIn: Connect for collaboration opportunities
- 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
- β 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
- π§ 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
- 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!