Skip to content

mktany2k/library

Repository files navigation

Library Service

Tasks

Allow user to

  • register a new borrower to the library
  • register a new book to the library
  • get a list of all books in the library
  • borrow a book with a particular book id
  • return a borrowed book

Prerequisite

JDK 17

JDK 17 is required to compile and run the application.

Docker

Docker and Docker Compose to start PostgreSQL and integration test

Getting Started

Checkout this repository

clone this repository into your local using Git

How to run

Start Docker Compose

docker compose up

Run the Application

./mvnw spring-boot:run

Run the Integration Test

./mvnw verify

Available API

You can browse all exposed API via http://localhost:8080/swagger-ui/index.html Please refer to Booklists.txt for sample books with valid ISBN for testing

Assumptions

  • Borrower's email must be unique.
  • Borrower's email is not encrypted.
  • Multiple books with same ISBN but different title or author consider as error.
  • This library does not limit the duration of book borrowing period.
  • This library will return all books without pagination. Might caused performance issue when number of books exceed certain size..

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages