0% found this document useful (0 votes)
50 views

GitHub TeamDukaan - Backend Assignment

The document outlines an API and database structure for an e-commerce platform called Dukaan. It describes endpoints for sellers to sign up, create stores, upload products and categories, and accept orders. It also describes endpoints for buyers to view store details, product catalogs, add items to carts, and place orders. The API would be built using Django REST framework with a SQL database to support tables for accounts, stores, products, categories, customers, carts, and orders.

Uploaded by

Avik Malfoy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

GitHub TeamDukaan - Backend Assignment

The document outlines an API and database structure for an e-commerce platform called Dukaan. It describes endpoints for sellers to sign up, create stores, upload products and categories, and accept orders. It also describes endpoints for buyers to view store details, product catalogs, add items to carts, and place orders. The API would be built using Django REST framework with a SQL database to support tables for accounts, stores, products, categories, customers, carts, and orders.

Uploaded by

Avik Malfoy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

02/02/2024, 23:38 GitHub - TeamDukaan/backend-assignment

Assessment for backend developer.


Dukaan is a tech platform that enables a business to quickly set up and run an online retail store.

A typical seller installs the Dukaan app, Signs up using his mobile number and creates his store. He
can then start uploading inventory (as products) to his store. Once the store is created, he can share
the store link with his/her customers on social media and starts accepting online orders.

Your assignment is to Design a very basic API (Django DRF) & database (any SQL db works)
structure which supports above work-flow.

Detailed breakdown of the workflow -

endpoints for seller side. (Words in Bold indicates table names)


1. seller signs up using his mobile number that creates an account

i. Take mobile number & OTP (random) as input to the API


ii. Create customer account in accounts table.
iii. Issue a token.

2. seller creates his store

i. Take store name & address as input.


ii. Create store in store table. One seller can have multiple stores.
iii. Generate a unique store link based on his store name.
iv. Respond back with storeid and link.

3. seller starts uploading inventory in the form of products and categories.

i. Take product name, description, MRP, Sale price, image & category as input.
ii. Create a category if it doesn't exist.
iii. Create product
iv. Respond back with id, name and image.

4. Seller can accept orders from his customers.

i. Create a customer table with a mobile number as unique and address details.
ii. Create a order table to store orders data.
iii. When someone places an order from the buyer side, the records will be saved here.

Endpoints for Buyer side


1. Seller shares his store link with his customers. To get basic store details

i. Take store link as input


ii. Respond back with storeId, store name, address

https://github.com/TeamDukaan/backend-assignment 1/2
02/02/2024, 23:38 GitHub - TeamDukaan/backend-assignment

2. To get product catalog & categories

i. Take storelink as input


ii. Respond back with the catelog, grouped by categories & sorted by number of products in
the category.

3. people (Un-authenticated users) can add items into their cart.

i. Maintain a cart on the server (create appropriate models for this)


ii. On cart change (add / remove item) update the cart on server
iii. For cart line items take product id, qty, storeLink as input and fetch product meta data
from the DB and save them.

4. Customer place an order for a product.

i. Identity customer using JWT or token which can be generated using his mobile number
and a OTP
ii. Bypass the actual OTP validation flow and issue a token on any random number & OTP
combination
iii. Create a customer record if didn’t already exist for that mobile number.
iv. Take the cart object as input and convert that into an order.
v. Create an order for that store & customer and return back the order id.

https://github.com/TeamDukaan/backend-assignment 2/2

You might also like