she43 / LimitedTimeDeals

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LimitedDeals

Problem Statement You happen to be a budding entrepreneur and you have come up with an idea to build an ecommerce giant like amazon, flipkart, walmart, etc. As part of this ambition, you want to build a platform to duplicate the concept of Limited Time Deals.

Limited Time Deals A limited time deal implies that a seller will put up an item on sale for a limited time period, say, 2 hours and will keep a maximum limit on the number of items that would be sold as part of that deal. Users cannot buy the deal if the deal time is over Users cannot buy if the maximum allowed deal has already been bought by other users. One user cannot buy more than one item as part of the deal.

Task is to create APIs to enable following operations Create a deal with price and number of items to be sold as part of the deal End a deal Update a deal to increase the number of items or end time Claim a deal Guidelines Document and communicate your assumptions in README. Create a working solution with production quality code. Use an external database like postgres/mysql or any noSQL database Define and Create APIs to support the operations mentioned above Define the associated entities related to inventory by creating relevant tables in Database. You do not need to create APIs to manage inventory Write few unit tests for the most important code What are we looking for? Your approach towards the solution How you write code in terms of readability and maintainability Designing Database Schema Usage of best practices Testing skills

Out of scope : Handling at large scale