---
# System prepended metadata

title: 39dg-challenge

---

# 39dg-challenge

Book Inventory App

Create a Laravel app that allows a user to perform CRUD operations on a book inventory system. 

Please create a public github repo and open a pull request then send
the pull request link via an Indeed message.

Tech stack:

- Laravel 5.5 LTS
- Bootstrap 3.*
- React 15.*

Books:

- A book may have multiple editions;
- Each book edition must have a unique SKU;
- Each book edition may have its own price;

Index page:

- List books grouped by best-seller edition - i.e. do not show different editions of the same book, only the one with the most sales.
- Display the Title, Total available quantity (all editions), Total sold quantity (all editions), price (specific to the listed edition) for each book;
- Provide links to Edit and Delete features;

Show page:

- Display sales history with price at the time of purchase, timestamps, total income amount and total sales;
- Sales history must have Add and Delete features to simulate users buying the book;
- Display a separate list of the other editions of the book being shown, with the same information and CRUD features provided in the "index" page;

Edit page:

- Change book name;
- Change available book quantity;
- Change the book price (no book should have a price of zero)
- Button to add edition (new book);

Requirements:

- Use Laravel Framework 5.5 or above.
- Do not use libraries or external modules besides the ones that come 
  with Laravel.
- Create migrations and seeders (At least 10 books with up to 3 editions, each edition with up to 5 items sold - use random data);
- Documentation and comments. 
- In the README of the project you must include your name, email, 
  installation instructions in order for us to test your implementation,
  configuration, test execution, and any other information you feel is relevant.
  If you're not able to complete the test, tell us what you would do if you had more time.

Plus:

- Create and reuse react components (not SPA);
- Implement tests with PHPUnit;
- Use all the Laravel features you know. The more the better. Really, do show off!
