Skip to content

sujoncoder/Library-Management-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 Library Management API

A RESTfull API to manage a library management system built using Express, Typescript, Mongodb ,Mongoose this project coverd all assignment requiredments.


🚀 Features

✅ Create, update, delete and fetch books

✅ Borrow books with business rules

✅ Filter & sort books by genre, date, etc

✅ Aggregated summary of borrowed books
✅ Error handling with structured response
✅ Mongoose static methods & middleware used
✅ Clean and scalable project structure

🛠️ Tech Stack

  • Node.js + Express.js
  • TypeScript
  • MongoDB with Mongoose
  • Postman for testing

🔗 API Endpoints

📚 Book APIs

Method Endpoint Description
POST /api/books Create a new book
GET /api/books Get all books (with filter, sort, limit)
GET /api/books/:bookId Get a book by ID
PUT /api/books/:bookId Update book info
DELETE /api/books/:bookId Delete a book

📖 Borrow APIs

Method Endpoint Description
POST /api/borrow Borrow a book
GET /api/borrow Get summary of borrowed books

🔗 Importants Links

Github Link : https://github.com/sujoncoder/Library-Management-API

Live Link : https://library-management-api-nine-plum.vercel.app/

Video Link : https://drive.google.com/file/d/1G6FB4CDyNpMwIUjtzeMuWsiW9RMZABZ6/view?usp=sharing


⚙️ How to Run Locally

  1. Clone the repository
    git clone https://github.com/sujoncoder/library-management-api.git
    
  2. Install dependensis
    npm install
    
  3. Create .env file
    MONGODB_URI = YOUR_MONGODB_URI_STRING
    
  4. Run the project
    npm run dev
    

Happy codding...😎🧑‍💻

alt text

About

Library Management System API - B5A3

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published