Repo for the Ecommerece Project (https://github.com/abhibansal60/backend-mentorship)
-
Clone the project
-
Open the path/to/project/shopx
-
Configure the location of your MongoDB database:
export MONGODB_URL="mongodb+srv://<username>:<password>@<url>/<db>?retryWrites=true&w=majority"
For Powershell:
$env:MONGODB_URL="mongodb+srv://<username>:<password>@<url>/<db>?retryWrites=true&w=majority"
-
Run the following commands to run the app
pip install -r requirements.txt
python -m uvicorn main:main --reload
-
Your app should be running on http://127.0.0.1:8000
- Apps: Gen AI Apps or products sold on shopX
- /apps [GET] - A catalog of all the published Apps
- /apps/{id} [GET] - A particular app details by app id
Note: All our apps are paid apps on ShopX
{
"_id": {
"$oid": "65621dfb717ca4ecc190571e"
},
"name": "Backend GPT",
"author": ["John Doe", "Jane Doe"],
"price": 4.99,
"description": "This Gen AI app helps you answer your Backend Development questions",
"version": "0.0.1",
"rating":0,
"downloads":0
}
- Author : A person using the shopX
- /authors/apps [GET] - Get all the apps by an author
- /authors/app - [POST] - Create or submit a new app by author
- /authors/{appid} - [DELETE] - Delete an app by id, query param of author id
{
"_id": {
"$oid": "65622239717ca4ecc1905720"
},
"name": "John Doe",
"emailId": "john@shopx.com",
"password": "#hashedU$ERP@ss",
"apps": [],
"vpa": "john@upi"
}
- Customer : A person purchasing the apps:
- /customer - [POST] - Add a customer
- /customer/orders - [GET] - Details about customers previous orders
- /customer/order -[POST] - A customer placing the order
{
"_id": {
"$oid": "65622ab21536a5c470f57099"
},
"name": "Jack Sparrow",
"emailId": "jack@abc.com",
"password": "#hashedpw",
"orders": []
}
- Order : A static collection containing orders by customers
- /order/{id} - [GET] - Get order ID
{
"_id": {
"$oid": "65622d2a1536a5c470f570aa"
},
"sellerId": "<seller-id>",
"buyerId": "<buyer-id>",
"itemId": "<app-id>",
"buyerVpa": "user@upi",
"timestamp": "datetime.now()"
}
- Anthony Clinton
- Sumukha
- Siddharta Shandilya [ tiral to raise a pr]
- Abhinav Bansal