icon picker
Cowrywise Backend Test

You have been tasked to develop an application to manage books in a library. With your application, users can browse through the catalogue of books and borrow them. You are to build 2 independent API services for this application. You have till 9th of February, 2022 to complete the assessment and submit in the link in the assessment email you received.


The endpoints need not be authenticated
The API can be built using any python framework
Design the models as you deem fit.
The two services should use different data stores.
Device a way to communicate changes between the two services. i.e when the admin adds a book to the catalogue via the admin api, the client api should also be updated with the latest book added by the admin.
The Client API and Admin API should each have their own docker set-up
Add necessary unit and integration tests
A book that has been lent out should no longer be available in the catalogue.

Your Tasks

Client API

This API will be used to
Enrol users into the library using their email, first name and last name.
List all available books
Get a single book by its ID
Filter books
by publishers e.g Wiley, Apress, Manning
by category e.g fiction, technology, science
Borrow books by id (specify how long you want it for in days)

Admin API

This API will be used by an admin to:
Add new books to the catalogue
Remove a book from the catalogue.
Fetch/List users enrolled in the library.
Fetch/List users and the books they have borrowed
Fetch/List the books that are not available for borrowing (showing the day it will be available)

Follow on questions

Share your git repo for the project
How will you scale this infrastructure in the future when traffic blows up?
What are your ideas on how to handle a shared authentication scheme between these two APIs?

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
) instead.