This is a Library Management System built using the MERN stack (MongoDB, Express.js, React, Node.js). The system supports multiple user logins, authentication, adding books to a cart, and requesting books.
- User Authentication: Secure login and registration for multiple users.
- Book Management: Add, update, delete, and view books.
- Cart Functionality: Add books to a cart for borrowing.
- Book Requests: Request books that are not currently available in the library.
- User Roles: Different roles for users (e.g., Admin, Member).
- Frontend: React.js
- Backend: Node.js, Express.js
- Database: MongoDB
- Authentication: JWT (JSON Web Tokens)
-
Clone the repository:
git clone https://github.com/yourusername/library-management-system.git cd library-management-system
-
Install dependencies for both frontend and backend:
cd server npm install cd ../client npm install
-
Create a
.env
file in the backend directory and add the following:MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret PORT=your_port
-
Start the development servers:
cd backend npm run dev cd ../frontend npm start
- Register a new user or login with existing credentials.
- Browse the available books and add them to your cart.
- Request books that are not available.
- Admin users can manage the book inventory.
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License..