Project Overview
The Library Management System in MERN Stack is a full-stack web application developed by UPDATEGADH to simplify daily library operations through a centralized digital platform. Built using MongoDB, Express.js, React.js, and Node.js, it provides tools for managing library collections, members, borrowing transactions, reservations, fines, and reports.
The system includes separate Admin and Librarian roles, database-driven dashboard statistics, interactive charts, searchable tables, and reporting tools. It helps libraries maintain accurate inventory records, monitor book circulation, and organize administrative activities efficiently.
Available Features
- Admin and Librarian Dashboard: Display database-driven statistics for books, available copies, borrowers, active loans, overdue books, and fines. View popular books, recent transactions, borrowing trends, and activity.
- Book Management: Add, view, update, and search book records. Maintain ISBN, title, author, category, publisher, publication year, shelf location, quantity, and description. Upload cover images and filter books by availability and stock status.
- QR Code Generation: Generate QR codes containing book ISBN information to support book identification.
- Author and Category Management: Create, edit, view, and search authors and categories. Associate books with the relevant records and prevent deletion of records referenced by existing books.
- Borrower Management: Register library members, maintain member IDs and contact information, manage membership status and expiry dates, and review borrowing activity. Generate member ID QR codes.
- Book Issue and Return: Issue books to eligible borrowers, record issue dates and due dates, process returns, update available inventory, and maintain transaction history.
- Loan Renewal: Renew eligible loans according to configured rules and prevent duplicate active loans of the same book for a borrower.
- Reservations and Waiting Lists: Reserve unavailable books, manage waiting lists, mark reservations ready when copies become available, hold reserved copies for a configurable period, and expire uncollected reservations.
- Fine Management: Calculate late-return fines using overdue days and configurable daily rates. Support optional maximum fine limits, record fine payments, manage approved waivers, and track outstanding fines.
- Reports and Notifications: Generate inventory, overdue-loan, active-borrower, popular-book, and borrowing-trend reports. Export reports in CSV and PDF formats and generate in-app notifications for upcoming due dates, overdue books, ready reservations, and low stock.
- User Management and Security: Manage administrator and librarian accounts, support profile management and password changes, maintain activity logs, and protect API routes using JWT authentication and role-based permissions.
User Roles
Administrator
The administrator manages staff accounts, library settings, books, authors, categories, borrowers, reports, and activity logs. Administrator-only permissions include eligible record deletion and fine waivers.
Librarian
The librarian manages books, borrowers, authors, categories, book issues, returns, renewals, reservations, fine payments, and reports. Actions restricted to administrators remain unavailable to librarians.
Borrowers are managed as library members by staff. The application provides Admin and Librarian login roles rather than a separate borrower login portal.
Technology Stack
- Frontend: React.js and Vite
- UI Library: Ant Design
- Backend: Node.js and Express.js
- Database: MongoDB
- Database Modeling: Mongoose
- Authentication: JWT
- Password Security: bcryptjs
- Charts: Recharts
- PDF Reports: PDFKit
- QR Codes: QRCode
Software and Tools Required
- Node.js 18 or later
- npm package manager
- MongoDB Community Server or MongoDB Atlas
- Visual Studio Code
- A modern web browser
Project Benefits
- Centralizes library inventory and member records.
- Organizes book circulation, renewals, and reservations.
- Calculates late-return fines using configurable rules.
- Provides real database-driven statistics and reports.
- Supports PDF and CSV exports and QR code generation.
- Demonstrates full-stack development using the MERN stack.
More Details and Full Documentation
For complete project details, screenshots, features, and installation instructions, visit the original UPDATEGADH project page.
More Details and Full Documentation
- Install Node.js 18 or later, npm, MongoDB Community Server or MongoDB Atlas, and Visual Studio Code.
- Extract library-mern.zip and open the extracted project folder in Visual Studio Code.
- Open the terminal and navigate to the backend directory: cd backend
- Install backend dependencies: npm install
- Create the backend environment file: copy .env.example .env
- Open backend/.env and configure the following variables: PORT=5000, MONGO_URI=mongodb://127.0.0.1:27017/library_mern, JWT_SECRET=your_generated_secret, JWT_EXPIRES_IN=7d, CLIENT_URL=http://localhost:5173, ADMIN_NAME=System Admin, ADMIN_EMAIL=admin@library.local, ADMIN_PASSWORD=your_strong_admin_password, LIBRARIAN_NAME=Head Librarian, LIBRARIAN_EMAIL=librarian@library.local, LIBRARIAN_PASSWORD=your_strong_librarian_password.
- Generate a secure JWT secret using: node -e "console.log(require('crypto').randomBytes(48).toString('hex'))"
- Replace the example passwords with strong passwords and keep the .env file private.
- Ensure MongoDB is running and the configured database connection is valid.
- From the backend directory, create the initial accounts: npm run seed:admin
- To load optional sample books, authors, borrowers, transactions, reservations, and other library records, run: npm run seed
- Start the backend from the backend directory: npm run dev
- Open a second terminal and navigate to the frontend directory: cd frontend
- Install frontend dependencies: npm install
- Start the frontend development server: npm run dev
- Open http://localhost:5173 in your browser and sign in using the administrator credentials configured in backend/.env.
- To create a production frontend build, run npm run build from the frontend directory.
- To start the production backend, navigate to the backend directory and run npm start.
Stuck while running it? Chat with us on WhatsApp for free installation help.
No reviews yet. Be the first to review this project.