Skip to content

ujjwal15718/Library-Management-System---Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 Infotech Library Management System

A Backend Node.js + MongoDB-based library management system supporting book rentals, user roles, and borrowing limits.


🗂️ Project Structure

infotech/ ├── config/ ✅ DB setup ├── collections/ ✅ Schema definitions for MongoDB initialization ├── server/ ✅ Express server files │ ├── routes/ ✅ All API route definitions │ ├── controllers/ ✅ Route logic (business flow) │ ├── services/ ✅ DB/service logic layer │ ├── models/ ✅ Mongoose models (optional if using Mongoose later) │ ├── middlewares/ ✅ Auth, error handling etc. │ └── index.js ✅ Main server entry point ├── .env ✅ Environment configuration └── package.json

yaml Copy Edit


🧰 Prerequisites

  • Node.js installed
  • MongoDB installed and running locally

🚀 Installation & Setup

  1. Clone the repository
    git clone <repo-url>
    cd infotech

Install dependencies

bash Copy Edit npm install Setup MongoDB database

Run this command to initialize your MongoDB database with collections:

bash Copy Edit node config/db.js Create a .env file (example content):

ini Copy Edit MONGO_URI=mongodb://localhost:27017 PORT=5000 Start the development server

bash Copy Edit npm run dev 📡 API Overview Base URL: http://localhost:5000

Modules include:

📘 Book rental & return

👤 User registration with role selection

🔒 Borrow limit enforcement

✅ Admin approval for book requests

📌 Notes Book availability is managed via inventory (numberOfCopies)

Borrowing is restricted based on approved and unreturned books only

Admin APIs for approval and management are also available

🛠 Tech Stack Node.js

Express

MongoDB

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors