Problem Prompt
You are working for a Software Solutions Provider and they have recently onboarded a client in
the Gaming Industry. In 2023, the Video Games market is projected to reach 384.9 billion USD
in revenue. Keeping that in mind, the client needs to scale accordingly and has decided to go
fully virtual and launch their own store online. As their sales model is B2C
(business-to-customer), it is necessary to build a web application that services both. They are
interested in a Web-based solution that allows them (the business) to login, manage their
inventory, manage user-queries/complaints, and manage users. On the other hand, it should allow
the end-customer (the customer) to login, signup, order games, order gaming gear, leave reviews,
and add items to favorites list
Minimum Requirements
Business View
1. The client should be able to login into the management portal. Only the client has
access to this portal. Authentication via JWT is a must.
2. The client should be able to add, read, update, or delete inventory info. The inventory is
mainly of two types: video_games and gaming_gear; additional can be added if you
think it is appropriate. For simplicity, you can assume the currency is the default PKR
(pun intended). Possible fields to show for inventory:
a. quantity (How much left in stock)
b. title (what is the title of the inventory item)
c. market_price (The selling price of the client)
d. cost_price (The buying price borne by the client)
e. margin (market_price - cost_price)
f. inventory_type (gaming_gear, video_games, etc)
g. minimum_age (The user should be at least this age to play/order the item, null
means there is no age_restriction, must)
3. The client should be able to read order info for all the orders placed so far, with
appropriate filters for ease of search; user name, item name, user email, date of order,
order status.
4. gaming_gear can have different info and so will video_games; figure out a way to have
parent and child tables in the relational database.
5. The client should be able to blacklist fraudulent customers to refrain them from buying
again.
6. The client should be able to respond to any queries, or complaints against a specific
inventory item
Customer View
1. The customer should be able to login and sign up. The login credentials should be
simple email and password. A customer must provide info like DOB, email address,
Gender/Sex, password (if you come across any additional fields, feel free to add). The
password must be stored as a hash on the DB for protecting user info. Authentication via
JWT is a must.
2. The customer should be able to place an order against an inventory item (gaming_gear
or video_games). Payment is a part of the order process and it will contain info related to
credit cards; card_number, card_expiry, card_name, payment_status, payment_date. An
order should be recorded in the system and each order should have a payment_id,
item_id, order_id, order_date, and an order_status. Once the payment has been
completed, the order can then be marked as completed.
3. The customer should be able to leave reviews for an inventory item that they have
bought before. This will include a rating (1-5 stars) and an optional comment. They can
read, update, delete and create new reviews (CRUD). They should also be able to see
the other reviews left by other customers of the same inventory item.
4. The customer should be able to add items to their favorites list.
Age Estimation
They raised this use-case for concerned parents. If a ten-year old kid ordered via their parent’s
credit card, and the game had age_restriction 18+, the parent was concerned for their kid’s
mental health and rejected the order in the past. There should be a step before initiating the
order for any game with age_restriction. Whenever a customer tries to order an inventory item
for which there is an age_restriction (minimum_age), the client wants that we should ask the
customer for a selfie via the webcam and estimate the age on that particular frame. The
image/frame is not required to be in storage (in db). You can use pre-built packages that
estimate age (npmjs) or you can use a pre-trained Machine Learning Model with a pre-built
CNN architecture from github and predict the picture. If the model predicts that the user is 18
year-old or higher, then they are allowed to go through with the order, else they are redirected to
the home-page and are only shown games with no age-restriction.
Technical Guidelines
1. Architecture: MVC (Model-View-Controller)
2. Database: MySQL
3. Frontend: Any JS based framework (e.g. React.js, Angular, Vue)
4. Package Manager: yarn
5. Backend: JS-based backend framework (e.g Express.js, Fastify.js) running on
NodeJS runtime
6. Deployment: Dockerize the application and deploy on netlify(highly recommended); if it's not
possible, the functional application can be shown locally but should be dockerized.