Skip to main content

Book Service

Purpose​

book-service is the catalog system for books and supporting reference data.

Responsibilities​

  • CRUD for books
  • CRUD for authors
  • CRUD for categories
  • CRUD for publishers
  • Batch fetch books by IDs for checkout/order flows

Dependencies​

  • Port: 8083
  • Database: bookstore_books_db

REST APIs​

Books​

MethodPathAuthDescription
POST/api/books/createAdminCreate book
PUT/api/books/update/{id}AdminUpdate book
DELETE/api/books/{id}AdminDelete book
GET/api/books/{id}YesGet one book
POST/api/books/batchYesFetch many books by UUID list
GET/api/books/YesList all books

Authors​

  • POST /api/authors/create (Admin)
  • PUT /api/authors/update/{id} (Admin)
  • GET /api/authors/{id}
  • DELETE /api/authors/{id} (Admin)
  • GET /api/authors/

Categories​

  • POST /api/categories/create (Admin)
  • PUT /api/categories/update/{id} (Admin)
  • GET /api/categories/{id}
  • DELETE /api/categories/{id} (Admin)
  • GET /api/categories/

Publishers​

  • POST /api/publishers/create (Admin)
  • PUT /api/publishers/update/{id} (Admin)
  • GET /api/publishers/{id}
  • DELETE /api/publishers/{id} (Admin)
  • GET /api/publishers/

Book images​

BookImageController exists with base path /api/bookimage, but there are no implemented endpoints in the current code.

Database tables​

  • books
  • authors
  • categories
  • publishers
  • book_images
  • join table book_authors

Entity relationships​

Admin write flow​

Batch fetch (used by order & payment)​

Security​

Only /actuator/health and /actuator/info are public in the service security config. All catalog routes require authentication, and mutations additionally require admin privileges at the controller layer.