Skip to content

RESTful API for a bookstore that allows a user to login, perform user related tasks, view a list of books and place book orders.

Notifications You must be signed in to change notification settings

juthakiat/bookstore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RESTful API for a bookstore

The API that allows users to login, perform user related tasks, view a list of books and place book orders.

Setup Instruction

1.) Clone the repository by the following command.

$ git clone https://github.com/juthakiat/bookstore.git

2.) Import the Maven project using your favorite IDE such as Eclipse, Netbean or Intellij

3.) Run the project.

  • The database (H2) is created in memory through Spring Boot auto configuration. There is no additional setup.
  • The tables are created on the entities defined. There is no additional setup as well.
  • Since H2 is the in-memory database. Data is not persisted between restart. (Restrictions of using in-memory database)

4.) Test REST APIs using your favorite REST client such as Postman by entering the service endpoint e.g. http://localhost:8080/books

Database Design

Database Design

API Document

You can find the API Document here or http://localhost:8080/v2/api-docs

Sequence Diagram

GET /books

Gets a list of books from an external book publisher’s web services and returns the list sorted alphabetically with the recommended books always appears first.

GET /book

POST /user

Create a user account and store user’s information in Users table (DB). POST /users

POST /login

User login authentication API.

POST /login

GET /users

Gets information about the logged in user. A successfully authenticated request returns information related to the user and the books ordered

GET /users

POST /users/orders

Order books and store order information in Orders table (BOOK_ORDER). This returns the total price for a successful order

POST /users/orders

DELETE /users

Delete logged in user’s record and order history.

DELETE /users

About

RESTful API for a bookstore that allows a user to login, perform user related tasks, view a list of books and place book orders.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages