ReadBooks is a full-stack library management web application designed for a school environment. It allows users to browse books by category, borrow and return books, and manage the library collection through an intuitive interface. Built with React, Node.js, Express, MongoDB, and Firebase authentication, it ensures seamless functionality with a clean and responsive design.
🔗 Live Site URL: https://readbooks-app.netlify.app
🔗 Client GitHub Repo: github.com/yourusername/readbooks-client
🔗 Server GitHub Repo: github.com/yourusername/readbooks-server
To create a responsive, secure, and user-friendly Library Management System that allows:
- Easy book browsing and categorization
- Book borrowing and returning functionality
- Admin functionality to add/update books
- Real-time database sync and authentication
- 🔐 Protected Routes using Firebase Authentication + JWT
- 📚 Book CRUD Operations (Add, Update, View, Borrow, Return)
- ⭐ Rating System using
react-rating-stars-component - 📊 Card/Table Toggle View on All Books page
- 🔎 Filter Available Books functionality
- ⛔ Prevent Multiple Borrowing and limit to 3 books
- 🧾 Borrowed Books Tracking with Return Date
- ✅ Form Validation with React Hook Form
- 📦 Responsive UI for mobile, tablet, and desktop
- 🎡 Swiper Slider on Home Page
- ✨ Framer Motion Animations
- 🔄 Dynamic Document Titles per route
⚠️ 404 Page and Global Loading Spinners- 📬 Email + Google Auth support
- ✅ Secure Environment Config using
.envfor Firebase & MongoDB - 🔐 JWT Authorization with token verification
reactreact-routerfirebasereact-toastifyreact-rating-stars-componentswiperreact-hook-formframer-motionaxiosaxios-auth-refresh(for interceptors)dotenv
expresscorsmongoosejsonwebtokendotenvcookie-parser
src/ ├── components/ │ ├── Navbar.jsx │ ├── Footer.jsx │ └── BannerSlider.jsx ├── pages/ │ ├── Home.jsx │ ├── AllBooks.jsx │ ├── BookDetails.jsx │ ├── AddBook.jsx │ ├── UpdateBook.jsx │ ├── BorrowedBooks.jsx │ ├── Login.jsx │ ├── Register.jsx │ └── NotFound.jsx ├── routes/ │ ├── PrivateRoute.jsx ├── context/ │ ├── AuthProvider.jsx ├── utils/ │ ├── axiosSecure.js │ ├── setTitle.js ├── App.jsx └── main.jsx
POST /api/books→ Add BookPUT /api/books/:id→ Update BookGET /api/books→ All Books (with filters)GET /api/books/:id→ Book DetailsPATCH /api/books/borrow/:id→ Borrow Book ($inc: { quantity: -1 })PATCH /api/books/return/:id→ Return Book ($inc: { quantity: +1 })POST /api/borrowed→ Track borrowed booksGET /api/borrowed/:email→ Get borrowed books by userDELETE /api/borrowed/:id→ Return a book (remove record)POST /api/jwt→ Create JWT Token
🧪 How to Run Locally
- Clone the project:
git clone https://github.com/fariya-sultana/read-books.git
- Navigate to the project folder:
cd your-repo-name
- Install dependencies:
npm install
- Create a .env file in the root directory and add your Firebase config:
VITE_apiKey=your_api_key VITE_authDomain=your_auth_domain VITE_projectId=your_project_id VITE_storageBucket=your_storage_bucket VITE_messagingSenderId=your_messaging_sender_id VITE_appId=your_app_id
- Start the development server:
npm run dev
👨💻 Author Name: [Fariya Sultana] Email: fariyasultana802@gmail.com