Skip to content

Repository files navigation

📚 Library Management System API (RESTful)

A secure, scalable, and versioned REST API for managing a Library Book Borrowing System built with Laravel 12 + Sanctum Authentication.


This project follows industry-level backend architecture practices including API versioning, service classes, traits, resource transformation, rate limiting, and proper exception handling.


🚀 Features

🔐 Authentication & Security

  • Laravel Sanctum Authentication
  • Login / Registration / Logout
  • Profile management
  • Rate limiting (Throttle protection for auth routes)

🧠 Architecture & Best Practices

  • API Versioning (/api/v1)
  • Custom API Response Trait
  • API Resources for clean JSON output
  • Centralized Exception Handling (app.php)
  • FormRequest validation with custom messages
  • Model Binding (Route Model Binding)
  • Blameable Trait (created_by tracking)

📦 Modules

👨‍🏫 Authors Module

  • CRUD operations
  • Search & filtering
  • Tracks created_by automatically

📖 Books Module

  • CRUD operations
  • Search & filtering
  • Cover image upload using ImageService
  • Tracks created_by

👤 Members Module

  • CRUD operations
  • Search & filtering
  • Tracks created_by

🔄 Borrowing Module

  • Borrow book system (CRUD)
  • Return book system (stock increment)
  • Overdue tracking
  • Returned book status update
  • Search & filtering

📊 Dashboard

  • Total Authors count
  • Total Books count
  • Total Members count
  • Borrowed books count
  • Overdue books count

🔥 Advanced Features Implemented

✅ API Versioning system
✅ Clean JSON responses via Traits
✅ Central exception handling
✅ Secure file upload service (ImageService)
✅ Role-ready architecture design
✅ Borrow/Return stock logic
✅ Overdue tracking system
✅ Seeder & Factory for fake data
✅ Rate limiting for auth protection


🧱 Tech Stack

  • PHP 8+
  • Laravel 12
  • Laravel Sanctum
  • MySQL
  • REST API Architecture
  • Postman (Testing)

Demos : (Postman)


⚙️ Installation Guide

Install Dependencies

  • composer install
  • php artisan install:api

Run Project

  • php artisan migrate
  • php artisan db:seed
  • php artisan serve (On code editor project directory Terminal)

Email : admin@gmail.com
Password : admin

👨‍💻 Author

Md Moinul Islam
GitHub : https://github.com/moinulwebdev

About

A robust, enterprise-ready Library Borrowing System API built with Laravel 12. This API handles complete library workflows including author/book management, member registration, borrowing/returning books, overdue tracking, and insightful dashboard statistics. Designed with scalability, reusability, and clean code practices.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages