Skip to content

Librarian Portal for managing books, students, and book issues, and a Student Portal for registration, book searching, and managing issued books.

Notifications You must be signed in to change notification settings

MdMirajAnsari/LibraryManagement.WEB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

65 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Library Management System

A modern, full-featured library management web application built with Angular 18 and Angular Material. This system provides separate interfaces for librarians and students to manage books, track borrowing, and handle library operations efficiently.

πŸš€ Features

For Librarians

  • Dashboard: Overview of library statistics and recent activities
  • Book Management: Add, edit, and manage book inventory
  • Student Management: Register and manage student accounts
  • Book Issuance: Issue books to students with due date tracking
  • Book Returns: Process book returns and manage overdue items
  • Notifications: Send and manage notifications to students
  • Settings: Configure system settings and user preferences

For Students

  • Dashboard: Personal library overview and recent activities
  • Book Search: Search and browse available books
  • Issued Books: View currently borrowed books and due dates
  • Profile Management: Update personal information
  • Notifications: Receive and view library notifications

Authentication & Security

  • JWT-based Authentication: Secure login/logout functionality
  • Role-based Access Control: Separate interfaces for librarians and students
  • Password Management: Forgot password and reset functionality
  • Route Guards: Protected routes based on user roles

πŸ› οΈ Technology Stack

  • Frontend Framework: Angular 18
  • UI Components: Angular Material
  • Authentication: JWT (JSON Web Tokens)
  • Routing: Angular Router with Guards
  • State Management: RxJS Observables
  • Styling: SCSS
  • Testing: Jasmine & Karma

πŸ“ Project Structure

LibraryManagement.WEB/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ auth/                          # Authentication Module
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.guard.ts             # Route protection guard
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.service.ts           # Authentication service
β”‚   β”‚   β”‚   β”œβ”€β”€ login/                    # Login component
β”‚   β”‚   β”‚   β”œβ”€β”€ register/                 # Registration component
β”‚   β”‚   β”‚   β”œβ”€β”€ forgot-password/          # Password recovery
β”‚   β”‚   β”‚   └── reset-password/           # Password reset
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ librarian/                    # Librarian Module
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/                # Librarian dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ manage-books/             # Book management interface
β”‚   β”‚   β”‚   β”œβ”€β”€ add-book/                 # Add new books
β”‚   β”‚   β”‚   β”œβ”€β”€ edit-book/                # Edit existing books
β”‚   β”‚   β”‚   β”œβ”€β”€ manage-students/          # Student management
β”‚   β”‚   β”‚   β”œβ”€β”€ add-student/              # Add new students
β”‚   β”‚   β”‚   β”œβ”€β”€ issue-book/               # Book issuance
β”‚   β”‚   β”‚   β”œβ”€β”€ return-book/              # Book returns
β”‚   β”‚   β”‚   β”œβ”€β”€ notifications/            # Notification management
β”‚   β”‚   β”‚   └── settings/                 # System settings
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ student/                      # Student Module
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/                # Student dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ search-books/             # Book search interface
β”‚   β”‚   β”‚   β”œβ”€β”€ issued-books/             # View borrowed books
β”‚   β”‚   β”‚   β”œβ”€β”€ profile/                  # Profile management
β”‚   β”‚   β”‚   └── notifications/            # Student notifications
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ shared/                       # Shared Resources
β”‚   β”‚   β”‚   β”œβ”€β”€ components/               # Reusable UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ models/                   # TypeScript interfaces
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ book.model.ts         # Book data structure
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ student.model.ts      # Student data structure
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ book-issue.model.ts   # Book issue tracking
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ notification.model.ts # Notification structure
β”‚   β”‚   β”‚   β”‚   └── index.ts              # Model exports
β”‚   β”‚   β”‚   └── services/                 # Shared services
β”‚   β”‚   β”‚       β”œβ”€β”€ auth.service.ts       # Authentication logic
β”‚   β”‚   β”‚       └── library.service.ts    # Library operations
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ app.component.*               # Main app component
β”‚   β”‚   β”œβ”€β”€ app.module.ts                 # Root module
β”‚   β”‚   β”œβ”€β”€ app-routing.module.ts         # Application routing
β”‚   β”‚   └── app.routes.ts                 # Route definitions
β”‚   β”‚
β”‚   β”œβ”€β”€ assets/                           # Static assets
β”‚   β”œβ”€β”€ environments/                     # Environment configuration
β”‚   β”œβ”€β”€ index.html                        # Main HTML file
β”‚   └── main.ts                           # Application entry point
β”‚
β”œβ”€β”€ public/                               # Public assets
β”œβ”€β”€ angular.json                          # Angular CLI configuration
β”œβ”€β”€ package.json                          # Dependencies and scripts
β”œβ”€β”€ tsconfig.json                         # TypeScript configuration
└── README.md                             # Project documentation

πŸš€ Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn package manager
  • Angular CLI (npm install -g @angular/cli)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd LibraryManagement.WEB
  2. Install dependencies

    npm install
  3. Start the development server

    npm start
  4. Open your browser Navigate to http://localhost:4200

Available Scripts

  • npm start - Start development server
  • npm run build - Build for production
  • npm run test - Run unit tests
  • npm run watch - Build and watch for changes

πŸ” Authentication

The application uses JWT-based authentication with role-based access control:

  • Librarian Role: Full access to all library management features
  • Student Role: Access to book search, borrowing history, and profile management

Login Flow

  1. Users access the login page
  2. Authentication is handled via JWT tokens
  3. Route guards ensure proper access control
  4. Users are redirected to role-specific dashboards

πŸ“š Data Models

Book Model

interface Book {
  id: number;
  title: string;
  author: string;
  publication: string;
  stock: number;
  pdfUrl?: string;
  isActive: boolean;
}

Student Model

interface Student {
  id: number;
  email: string;
  name: string;
  isActive: boolean;
  isVerified: boolean;
}

Book Issue Model

Tracks book borrowing with due dates and return status.

🎨 UI/UX Features

  • Responsive Design: Works on desktop, tablet, and mobile devices
  • Material Design: Modern, accessible UI components
  • Intuitive Navigation: Clear navigation structure for both user types
  • Real-time Updates: Dynamic content updates using RxJS
  • Form Validation: Comprehensive input validation and error handling

πŸ”§ Configuration

Environment Setup

Configure environment variables in src/environments/environment.ts:

  • API endpoints
  • Authentication settings
  • Feature flags

Angular Material Theme

The application uses Angular Material's theming system for consistent styling.

πŸ§ͺ Testing

Run the test suite:

npm test

The project includes:

  • Unit tests for components and services
  • Integration tests for routing
  • E2E testing setup (if configured)

πŸ“¦ Build and Deployment

Production Build

npm run build

Deployment

The built application can be deployed to any static hosting service:

  • Netlify
  • Vercel
  • AWS S3
  • Azure Static Web Apps

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

For support and questions:

  • Create an issue in the repository
  • Contact the development team
  • Check the documentation

Built with ❀️ using Angular 18 and Angular Material

About

Librarian Portal for managing books, students, and book issues, and a Student Portal for registration, book searching, and managing issued books.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published