Skip to content

Developing a NestJS application for managing a library system with book borrowing functionality.

Notifications You must be signed in to change notification settings

bagaspra16/library-management-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library Management API

A NestJS application for managing a library system with book borrowing functionality.

Features

  • Members can borrow books with conditions
  • Members can return books
  • Check available books
  • Check member information and borrowed books

Tech Stack

  • NestJS with TypeScript
  • TypeORM with SQLite
  • Swagger for API documentation
  • Jest for unit testing

Domain-Driven Design (DDD) Implementation

This project follows DDD principles with the following structure:

  • Domain: Contains entities, value objects, and domain services
  • Application: Contains use cases and application services
  • Infrastructure: Contains repositories, database configurations, and external services
  • Interfaces: Contains controllers, DTOs, and presenters

Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm (v6 or higher)

Installation

  1. Clone the repository
git clone https://github.com/bagaspra16/library-management-api.git
cd library-management-api
  1. Install dependencies
npm install
  1. Run the application
npm run start:dev
  1. Access the Swagger documentation
http://localhost:3000/api

API Endpoints

  • GET /books: Get all books
  • GET /members: Get all members
  • POST /borrowings: Borrow a book
  • POST /borrowings/return: Return a book

Testing

# Run unit tests
npm run test

# Run test coverage
npm run test:cov

# Run end-to-end tests
npm run test:e2e

About

Developing a NestJS application for managing a library system with book borrowing functionality.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors