A backend system for managing a library's books, users, and borrowing activities.
The Advanced Library Management System is designed to help librarians and library staff manage their collections of books, users, and borrowing activities efficiently. It leverages modern web technologies to provide a robust and scalable solution.
Redis usage: first request for search
Redis usage: second request faster !!!
Due payment demo (Youtube Video)
Email Verification demo (Youtube Video)
and much more...
Authentication
- JWT-based authentication system
- Role-based access control (Admin/Member)
- Email verification for new users
- Secure password hashing with bcrypt
- CRUD operations for users (Admin only)
- Manage users: Register, update, and remove library users.
Book Management
- Manage books: Add, update, delete, and search for books.
- Borrowing system: Keep track of borrowed books, due dates, and returns.
- Redis for faster retrieve during search.
- Book search functionality with filters Search by title Search by author Search by ISBN
- Real-time book availability tracking
Borrowing System
- Book borrowing with automated due date assignment
- Maximum 3 books per user limit
- Return processing with automatic fine calculation
- Late return fine: $1 per day
Payment System
- Fine payment processing
- HTML invoice generation
- Transaction history tracking
- Payment status monitoring (Pending/Completed/Failed)
Automated Notifications
- Email verification for new accounts
- Due date reminders (3 days before due date)
- Overdue notifications with fine amounts
To install and run the Advanced Library Management System locally, follow these steps:
-
Clone the repository:
git clone https://github.com/abhi9ab/Advanced-Library-Management-System.git cd Advanced-Library-Management-System
-
Install dependencies:
npm install
-
Set up environment variables:
Create a
.env
file in the root directory and add the following variables:PORT=3000 DATABASE_URL= JWT_SECRET= SMTP_HOST="smtp.gmail.com" SMTP_PORT="465" SMTP_USER= SMTP_PASS= RATE_LIMIT_WINDOW="15m" RATE_LIMIT_MAX="100" REDIS_URL=redis://localhost:6379
-
Confiure the database
npx prisma migrate dev
-
Set up your Redis database using docker
docker pull redis/redis-stack
-
Get your JWT_SECRET
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
-
Get your gmail app password
-
Run the application:
npm start
-
Access the application:
Open your postman and go to
http://localhost:3000
.
- Fork the repository
- Create a feature branch
- Commit changes
- Push to the branch
- Create a Pull Request
For any questions or inquiries, please contact:
- Email: abhi9ab