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

No packages published