A enterprise-grade, modern, full-stack Library Management System built with Node.js, Express.js, TypeScript, PostgreSQL, Sequelize ORM, React 19, Vite, Tailwind CSS, Zustand, React Query, and Multi-LLM Cloud AI Integration (Azure & Gemini).
Designed for educational institutions, public libraries, and digital library management workflows, this platform provides complete book lifecycle management, membership administration, automated borrowing workflows, granular fine tracking, AI-powered book scanner engines, and deep role-based access control (RBAC).
- Deploy URL: https://library-management-system-by-yogeshwaran.vercel.app
- Hosting Platform: Vercel
- API Base URL: https://library-management-system-g9dg.onrender.com
- Hosting Platform: Render (Linux Node.js Container Environment)
- Swagger Portal: https://library-management-system-g9dg.onrender.com/api-docs
The live system enforces strict Role-Based Access Control (RBAC). Use the authorized credentials below to verify corresponding dashboards, permissions, and entity data tables:
| Portal Access Level | Authorized Email Address | Protected Password | System Permissions & Access Scope |
|---|---|---|---|
| π‘οΈ System Administrator | admin@library.com |
Password@123 |
Complete read/write/delete permissions across members, books, global configurations, plans, and metrics. |
| π Librarian / Staff | lib@gmail.com |
Password@123 |
Operational access to issue/return tracking, books catalog search, fine accruals, and manual checkouts. |
The application implements a decoupled client-server architecture built around a Modular Monolith pattern on the backend, ensuring a separation of concerns across logic, access controls, data persistence, and remote cloud cognitive processors.
- Core Engine: React 19 + Vite (Fast Refresh Development Compilation Engine)
- Language Layer: TypeScript (Strict Compilation Matrix)
- State Management Layout: * Zustand: Synchronous client state, persistent sessions, token lifecycles, and UI settings.
- React Query (TanStack): Asynchronous network cache, optimistic queries, invalidation loops, and retry management.
- Network & Validation: Axios HTTP Engine + Zod Request Validation Data Mappings.
- UI Components & Motion: Tailwind CSS + Framer Motion (Fluid Layout Interpolations) + Sonner (Real-time Contextual Toasts).
- Runtime Platform: Node.js Environment (ES Modules / ESM Layout -
"type": "module") - Framework: Express.js utilizing strict middleware pipelines.
- Database Driver / Data Layer: Sequelize ORM mapping strict schemas natively to PostgreSQL instances.
- Middlewares Engine Stack:
- CORS Middleware: Strict Origin Parsing (Enforced prior to body processing to permit Vercel Handshakes).
- Helmet / Rate Limiting: HTTP Header Hardening + Pre-emptive DDOS Request Throttling.
- Zod Layer: Server-side request schema interception before hitting controller scopes.
- Winston Logs: Log rotations logging production events and failures to disk and container outputs.
- Engine: PostgreSQL hosted Serverless via Neon DB Architecture.
- Live Connection Topology: Enforced SSL Handshake Engine Pooling (
sslmode=require). - Connection Pooling Endpoint:
postgresql://neondb_owner:***@ep-late-silence-ao6ovftj-pooler.c-2.ap-southeast-1.aws.neon.tech/neondb?sslmode=require
- JSON Web Tokens (JWT): Short-lived identity access keys paired with safe HTTP-Only cookie strategies.
- Password Hashing: High-entropy encryption powered by
bcrypt. - Route Isolation: Express router-level middleware blocks unauthorized cross-role traversal.
The system automates asset registration using a sequential multi-cloud AI ingestion chain:
- Azure Cognitive Vision (OCR): Extracts text from raw image captures of physical book covers uploaded via
Multer. - Azure AI Translator: Normalizes, parses, and translates foreign language cover elements cleanly into English string sets.
- Google Gemini AI Engine: Processes the structured text array, executing semantic parsing to extract the exact Book Title and Author Name, completely eliminating manual typewriter operations for library inventory registry.
- Lifecycle State Machine: Handles
AvailableβIssuedβOverdueβReturnedtransitions. - Cron Sync Engine: Background jobs running node-cron check the Neon DB cluster nightly to automatically calculate and append overdue financial fine metrics to defaulting member accounts.
server/src/
βββ config/ # Server Portals, Helmet Settings, CORS Origin Matrices, Rate Limiters
βββ controllers/ # Express Layer Request Interceptors & JSON Response Generators
βββ database/ # Sequelize Model Declarations, Static Seeders, Migration Sequences
β βββ associations/ # Primary-Foreign Key Structural Relationship Mapping Definitions
β βββ migrations/ # Version-Controlled Database Schema Scripts
β βββ models/ # Sequelize Class Table Schema Implementations
βββ docs/ # OpenAPI / Swagger Specification Architectures
βββ middlewares/ # Global JWT Hooks, RBAC Policies, Error Boundaries, Cors Interceptors
βββ modules/ # Cohesive Domain Entities (Isolating Controller, Service, and Route Specs)
β βββ admin/ # Administrative Control Matrices
β βββ auth/ # Authenticated Session Lifecycles & Sign-in Handlers
β βββ azureAI/ # Azure Vision OCR & Gemini AI Processor Chains
β βββ books/ # Catalog, Inventory, and Asset Filtering Controls
β βββ categories/ # Structural Metadata & Genre Mapping Definitions
β βββ dashboard/ # Computational Aggregations & Analytical Telemetry Generators
β βββ fines/ # Financial Accrual Processors & Payment Monitors
β βββ issues/ # Physical Checkout & Return Ledger Transactions
β βββ members/ # Subscription Matrices & Consumer Metadata
β βββ plans/ # Tiered Library Access Pricing, Caps, & Durations
β βββ reports/ # PDF Manifest Generators (via jsPDF Modules)
βββ routes/ # Core Endpoint Registry (/api/v1 Global Mount Base Router)
βββ utils/ # Shared Injections (Winston Log Logger Engines, Formatters)
βββ validators/ # Common Reusable Domain Input Validation Schemes
βββ server.ts # Application Cluster Bootstrap Entrypoint
The repository enforces software engineering practices with a deep unit and integration testing suite utilizing Jest and Supertest:
- π§ͺ 133+ System Unit Tests: Validates mock service layers, mock relational models, isolated business logic patterns, error thresholds, and Azure/Gemini AI API edge cases without querying production clusters.
- π§ͺ 102+ API Integration Tests: Spawns live sandbox routing lifecycles to trace network headers, verify Zod schema rejections, test database writes, and evaluate RBAC multi-role access controls across
/api/v1/*endpoints.
Every code mutation pushed to GitHub undergoes rigorous validation via a centralized GitHub Actions Pipeline:
[ Git Push / PR ] β π¦ Install Packages β βοΈ Type-Check Validation (tsc) β π§ͺ Run Unit Suite β π§ͺ Run Integration Suite β π Deploy Approval
This ensures no build-breaking code mutations or type mismatches are ever merged into develop or main.
To initialize local nodes or modify cloud environment targets, construct an active .env file mapping these parameters:
# Runtime Environment Setup
NODE_ENV=production
PORT=5000
# PostgreSQL Neon Serverless Connection Matrix
DATABASE_URL=postgresql://neondb_owner:npg_ZtgV3bqocW0H@ep-late-silence-ao6ovftj-pooler.c-2.ap-southeast-1.aws.neon.tech/neondb?sslmode=require
# Encryption Cryptographical Primitives
JWT_SECRET=your_jwt_secret_hasher_key
# Azure AI Cognitive Cloud Configurations
AZURE_AI_KEY=your_azure_ai_cognitive_services_key
AZURE_AI_ENDPOINT=[https://your-endpoint.cognitiveservices.azure.com/](https://your-endpoint.cognitiveservices.azure.com/)
AZURE_AI_REGION=centralindia
# Google Gemini Large Language Model Key
GEMINI_API_KEY=your_google_gemini_api_key_string
Ensure you have Node.js v24+ and PostgreSQL or a Neon DB sandbox link configured before launching.
git clone [https://github.com/YogeshwaranOfficial/Library-Management-System.git](https://github.com/YogeshwaranOfficial/Library-Management-System.git)
cd Library-Management-System
cd server
npm install
# Execute development watcher using tsx compilation layers
npm run dev
- API Entrypoint:
http://localhost:5000 - Local API Docs:
http://localhost:5000/api-docs
cd ../client
npm install
npm run dev
- Dev Server Entrypoint:
http://localhost:5173
Yogeshwaran S
- GitHub Repository: https://github.com/YogeshwaranOfficial
- Project Tracking Link: Library Management System Git Repo
This architecture framework and its source distribution matrices are open-source software licensed standardly under the terms of the MIT License.
