Skip to content

Latest commit

 

History

History
183 lines (134 loc) · 5.83 KB

File metadata and controls

183 lines (134 loc) · 5.83 KB

📚 Library Management System (MERN Stack)

MERN Stack Live Demo

A complete Library Management System built with MongoDB, Express.js, React.js, and Node.js. Features role-based access control with three user types (Admin, Librarian, Student), book management with Cloudinary image uploads, issue/return tracking, and automated fine calculations.

🌐 Live Demo

Check out the live demo of the project:https://library-management-app-karan.vercel.app/

Test Credentials:

✨ Key Features

👨‍🎓 Student Features

  • ✅ User registration & login with JWT authentication
  • 🔍 Browse and search available books with images
  • 📥 Request book issuance
  • 📤 Submit return requests
  • ⏳ View due dates and pending fines
  • 📊 Personal dashboard with borrowing history

📚 Librarian Features

  • ✔️ Approve/reject book issue requests
  • ✔️ Manage return requests
  • ➕ Add/Edit/Remove books with image uploads (Cloudinary)
  • 👀 View all issued books
  • 📊 Dashboard for Real-time Activity & Analytics

👨‍💼 Admin Features

  • 👥 Manage all user accounts
  • 🛡️ Assign librarian privileges
  • 📊 System analytics dashboard

🛠️ Technology Stack

Frontend

React React Router Bootstrap Axios Cloudinary React Toastify

  • Core: React.js (v18.2) with Functional Components & Hooks
  • Routing: React Router v6
  • UI Framework: React Bootstrap v5.2 + Custom CSS
  • HTTP Client: Axios for API communication
  • Image Management: Cloudinary React SDK
  • Notifications: React Toastify
  • Icons: React Icons library
  • Form Handling: React Hook Form
  • State Management: Context API

Backend

Node.js Express MongoDB JWT Nodemailer

  • Runtime: Node.js v18.x
  • Framework: Express.js v4.18
  • Database: MongoDB Atlas (Cloud) with Mongoose ODM
  • Authentication: JWT with Bcrypt password hashing
  • Email Service: Nodemailer for OTP/password reset
  • File Uploads: Multer + Cloudinary Node SDK

Development & Testing

Thunder Client Hopscotch

  • API Testing: Thunder Client (VS Code extension)
  • API Documentation: Hopscotch
  • Version Control: Git + GitHub

Deployment

Render Vercel MongoDB Atlas

  • Frontend: Vercel (Edge Network)
  • Backend: Render (Node.js Environment)
  • Database: MongoDB Atlas (Cloud)
  • Media Storage: Cloudinary CDN

🛠️ Installation

1. Clone the repository

Clone the project repository to your local machine using the following command:

git clone https://github.com/KaranMehta1806/Library-Management.git

2. Install Dependencies

Navigate to the frontend and backend directories, and install dependencies:

Backend (API)

1. Navigate to the api directory:
cd backend
2. Install backend dependencies:
npm install

Frontend (Client)

1. Navigate to the client directory:
cd frontend
2. Install frontend dependencies:
npm install

3. Set Up Environment Variables

Create a .env file in api and add the following environment variables:

BACKEND .env file

EMAIL_USER=your_email_address
EMAIL_PASS=your_email_password
EMAIL_SERVICE=your_email_service
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
CLOUD_NAME=your_cloud_name
CLOUD_API_KEY=your_cloud_api_key
CLOUD_API_SECRET=your_cloud_api_secret

FRONTEND .env file

VITE_BACKEND_URL=https://your-backend-url.onrender.com

4. Start the Development Server

Once the dependencies are installed and the .env file is set up, you can start the development server with the following command:

Backend

Start the backend server by navigating to the backend directory and running the following command:

nodemon index.js

Frontend

Start the frontend server by navigating to the frontend directory and running the following command:

npm run dev

📞 Contact

Feel free to connect with me through the following platforms:

LinkedIn GitHub Email