Skip to content

Noel-Teens/Library_Management_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Library Management System

πŸ—οΈ Architecture

The project is split into two main parts:

  • Backend: A RESTful API built with Express and Mongoose.
  • Frontend: A responsive SPA built with React and Vite.

πŸš€ Features

  • Book Inventory Management:
    • Full CRUD operations (Create, Read, Update, Delete).
    • Search by title, author, or category.
    • Filter by publication year or specific categories (e.g., Fiction).
    • Inventory controls: Update available copies and categories.
    • Deletion safety: Books can only be deleted if stock is zero.
  • Customer Directory:
    • Manage customer profiles (Name, Age, Membership).
    • Search and filter customers.
    • Membership badges (Bronze, Silver, Gold, Platinum).
  • Modern UI/UX:
    • Dashboard-style interface with tabbed navigation.
    • Real-time feedback (loading states, success/error notifications).
    • Responsive design for mobile and desktop.

πŸ› οΈ Tech Stack

Backend

  • Node.js & Express.js (v5.2.1)
  • MongoDB with Mongoose (v9.1.1)
  • CORS for secure frontend-backend communication
  • Dotenv for environment variable management
  • Nodemon for development efficiency

Frontend

  • React (v19)
  • Vite (Build tool)
  • CSS Modules & Modern CSS (Gradients, Flexbox, Grid)
  • Fetch API for backend integration

πŸ“‹ Prerequisites

  • Node.js (v18+ recommended)
  • MongoDB (Local instance or MongoDB Atlas)

⚑ Quick Start

1. Setup Backend

cd Backend
npm install
# Create a .env file and add:
# MONGO_URI=your_mongodb_connection_string
npm run seed  # Optional: Seed sample data
npm run dev   # Runs on http://localhost:3000

2. Setup Frontend

# In a new terminal
cd Frontend
npm install
npm run dev   # Runs on http://localhost:5173

πŸ”Œ API Endpoints Reference

Entity Method Endpoint Description
Books GET /books Get all books
Books POST /books Create new book
Books PATCH /books/:id/copies Update stock quantity
Books DELETE /books/:id Delete book (if copies=0)
Customers GET /customers Get all customers
Customers POST /customers Register new customer

πŸ“ Project Structure

.
β”œβ”€β”€ Backend/                 # Express API
β”‚   β”œβ”€β”€ models/              # Mongoose Schemas
β”‚   β”œβ”€β”€ routes/              # API Route Handlers
β”‚   └── seed.js              # Database Seeder
└── Frontend/                # React Vite App
    β”œβ”€β”€ src/
    β”‚   β”œβ”€β”€ components/      # UI Components (Books/Customers)
    β”‚   └── App.jsx          # Main App Logic

About

A full-stack Library Management System built with React, Node.js, Express, and MongoDB to manage books, customers, and inventory efficiently.

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors