https://github.com/sujoncoder/library-management-api
Library Management System API - B5A3
https://github.com/sujoncoder/library-management-api
dotenv mongodb mongoose tsx typescript
Last synced: 9 months ago
JSON representation
Library Management System API - B5A3
- Host: GitHub
- URL: https://github.com/sujoncoder/library-management-api
- Owner: sujoncoder
- Created: 2025-06-22T07:33:20.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-06-22T11:20:20.000Z (9 months ago)
- Last Synced: 2025-06-22T11:32:38.129Z (9 months ago)
- Topics: dotenv, mongodb, mongoose, tsx, typescript
- Language: TypeScript
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# 📚 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**
```bash
git clone https://github.com/sujoncoder/library-management-api.git
2. **Install dependensis**
```bash
npm install
3. **Create .env file**
```bash
MONGODB_URI = YOUR_MONGODB_URI_STRING
4. **Run the project**
```bash
npm run dev
---
## Happy codding...😎🧑💻
