QuickCart is a minimalistic but functional API for an online store, including:
- β Products (adding, viewing, filtering)
- β Shopping cart (adding/removing products)
- β Orders (checkout, history)
- Backend: Python (FastAPI)
- Database: PostgreSQL
- ORM: SQLAlchemy
- Containerization: Docker
-
GET /users/{email} β get user by email
-
POST /users β create new user
-
DELETE /users β delete user by email and password
-
GET /products β get list of products with pagination (offset, limit)
-
GET /products/count β get total number of products
-
GET /products/{title} β get product by name
-
POST /products β create new product
-
PUT /products/{title} β update product data
-
PATCH /products/{title} β change product quantity (delta)
-
DELETE /products/{title} β delete product by name
-
GET /orders{order_id} β get order by order_id and email β (possibly route error: / is missing)
-
GET /orders/{user_id} β get all orders of the user
-
POST /orders β create an order (email + OrderSchema)
-
PATCH /orders/{order_id} β change the delivery status
-
DELETE /orders β cancel an order
-
GET /orders/count β the number of all orders of the user
-
GET /reviews/{user_id}/{title} β get a user review of the product
-
GET /reviews β get all reviews of the user
-
POST /reviews β add a review (email + title + body)
-
PUT /reviews/{user_id}/{title} β update a review
-
DELETE /reviews/{user_id}/{title} β delete a review
-
GET /reviews/{title_product} β get all reviews of the product
-
GET /reviews/avg/{title_product} β calculate average product rating
-
GET /reviews/pagination/{title_product} β get product reviews with pagination
Docker build
docker-compose up -d --build
Path api
http://localhost:80/docsStop
docker-compose down