BookNest is an E-Library Management System developed by Suprit Raj. It provides a robust platform for managing books, borrowing/returning books, handling Previous Year Questions (PYQs), and sending email notifications. The system is designed for both users and administrators, offering distinct functionalities for each role.
BookHive Manager is a full-stack web application that simplifies library management. It includes:
- User Features: Borrow/return books, view/download PYQs, and track borrowing history.
- Admin Features: Manage books, users, and PYQs, and track overdue books with fines.
- Automation: Automated notifications for overdue books and account verification cleanup.
This project follows the MVC architecture for scalability and modularity.
- Authentication: Secure login and registration using JWT.
- Borrowing/Returning Books: Track borrowed and returned books.
- PYQ Management: View and download Previous Year Questions.
- Chatbot: Integrated chatbot for user assistance.
- Book Management: Add, update, and delete books.
- User Management: Manage registered users and admins.
- PYQ Upload: Upload and manage PYQs.
- Overdue Management: Track overdue books and calculate fines.
- Email Notifications: Notify users about overdue books or account-related updates.
- Responsive Design: Optimized for both desktop and mobile devices.
- Real-time Updates: Dynamic updates using React state management.
- React.js: For building the user interface.
- Tailwind CSS: For styling.
- Redux Toolkit: For state management.
- Node.js: Server-side runtime.
- Express.js: Web framework for building APIs.
- MongoDB: NoSQL database for storing user, book, and borrowing data.
- JWT (JSON Web Tokens): For secure user authentication.
- Cloudinary: For file uploads (e.g., user avatars, PYQs).
- Nodemailer: For sending email notifications.
- Node-Cron: For scheduled tasks like overdue notifications.
- Node.js (v16 or higher)
- MongoDB (local or cloud instance)
- Cloudinary account (for file uploads)
-
Clone the Repository
git clone https://github.com/supritR21/BookNest.git cd booknest -
Backend Setup
cd server npm install -
Create a
.envfile in theconfigdirectory with the following variables:PORT=4000 FRONTEND_URL=http://localhost:5173 MONGO_URI=<your-mongodb-uri> JWT_SECRET_KEY=<your-jwt-secret> CLOUDINARY_CLIENT_NAME=<your-cloudinary-name> CLOUDINARY_CLIENT_API=<your-cloudinary-api-key> CLOUDINARY_CLIENT_SECRET=<your-cloudinary-secret>
-
Start the backend server
npm run dev
-
Frontend Setup
cd ../booknest npm install npm run dev -
Open http://localhost:5173 in your browser.
BookHive/
βββ src/
β βββ components/ # React components (e.g., UserDashboard, AdminDashboard)
β βββ layout/ # Layout components (e.g., Header, SideBar)
β βββ pages/ # Page components (e.g., Home, Login, Register)
β βββ popups/ # Popup components (e.g., AddBookPopup, UploadPDFPopup)
β βββ store/ # Redux slices and store configuration
β βββ App.jsx # Main application component
β βββ main.jsx # Entry point for React
β βββ index.css # Global styles
βββ public/ # Static assets
βββ vite.config.js # Vite configuration
βββ README.md # Project documentation
server/
βββ controllers/ # API controllers (e.g., authController, bookController)
βββ models/ # Mongoose models (e.g., User, Book, Borrow)
βββ routes/ # API routes (e.g., authRouter, bookRouter)
βββ middlewares/ # Custom middlewares (e.g., error handling)
βββ utils/ # Utility functions (e.g., fineCalculator)
βββ config/ # Configuration files (e.g., config.env)
βββ app.js # Express application setup
βββ server.js # Server entry point
POST /api/v1/auth/register: Register a new user.POST /api/v1/auth/login: Login a user.POST /api/v1/auth/logout: Logout a user.
GET /api/v1/book/all: Fetch all books.POST /api/v1/book/admin/add: Add a new book (Admin only).
POST /api/v1/borrow/record-borrow-book/:id: Record a borrowed book (Admin only).PUT /api/v1/borrow/return-borrowed-book/:bookId: Return a borrowed book (Admin only).
GET /api/v1/pyq/all: Fetch all PYQs.POST /api/v1/pyq/add: Add a new PYQ (Admin only).
- Navigate to the Book Management section.
- Select a book and click Record Borrow.
- Enter the userβs email and confirm.
- Navigate to My Borrowed Books.
- View the list of borrowed books and their due dates.
- Navigate to PYQ Management.
- Click Add New PYQ and upload the file.
We welcome contributions! Please follow these steps:
-
Fork the repository.
-
Create a new branch:
git checkout -b feature-name
-
Commit your changes:
git commit -m "Add feature-name" -
Push to your branch:
git push origin feature-name
-
Open a pull request.