Building simple Laravel 5.4 API for Books management with books, readers and librarians – part 1

General scope for REST API in Laravel 5.4

This series of articles should help you create easily Laravel API using minimum effort and saving your development time.

At the beginning will will focus on list of requirements needed for normal use of system for books management. Main roles and responsibilities will be assigned. All this requirement will be created independently from any physical system implementation.

After that we will define all endpoints in REST API that will enable most of functionality. It is also important to define users and their access to every endpoint.

Later we will map all endpoints into database structure with all fields and tables definitions. All tables relations should also be defined.

At the end we will create Laravel 5.4 project and start working on implementation all previous steps.

Main requirements for Rest API

– we should be able to create books
–  we should be able to create users
–   we should have  two of three types of users:  simple  user and let’s name it reader  and more sophisticated user let’s name it librarian
–  simple user should be able to make reservations and booking books
–  librarian will be responsible for books and physically booking books for  simple user
–  simple user can cancel any booking at any moment
–  simple user can make more than one reservation for more books
–  simple user can book a book  only for a month
–  librarian can be able to define all fields for a book
–  if simple user will not receive the book on time he cannot book other books
–   it should be able possible to search through author, title, isbn, year
– it should be possible to search  through username or email




Leave a Reply