This documentation provides an overview of the APIs available for a shopping app. These APIs allow users and sellers to interact with the shopping platform by performing actions such as user registration, login, product management, cart management, and order management etc.
r.POST("/api/user/#", userauth.Login)
r.POST("/api/user/register", userauth.Register)
r.POST("/api/seller/#", sellerauth.Login)
r.POST("/api/seller/register", sellerauth.Register)
r.POST("/api/seller/addproduct", middleware.RequireSellerAuth, sellerhandler.AddProduct)
r.GET("/api/seller/getproduct", middleware.RequireSellerAuth, sellerhandler.Get_Product)
r.GET("/api/getallproducts", userhandler.Search_Product)
r.DELETE("/api/seller/delete", middleware.RequireSellerAuth, sellerhandler.RemoveProduct)
r.PUT("/api/seller/update", middleware.RequireSellerAuth, sellerhandler.Update_Product)
r.POST("/api/user/addcart", userhandler.Add_Item_In_Cart)
r.DELETE("/api/user/removecart", userhandler.Remove_Item_In_Cart)
r.GET("/api/user/viewcart", userhandler.View_Item_In_Cart)
r.POST("/api/user/placeorder", middleware.RequireUserAuth, userhandler.Place_Order)
r.DELETE("/api/user/cancelorder", middleware.RequireUserAuth, userhandler.Cancel_Order)
r.GET("/api/user/vieworder", middleware.RequireUserAuth, userhandler.View_Purchased_Items)
- Open your terminal and then type
$ git clone https://github.com/Pushkarm029/Amazon-Shopping-Backend
- cd into the folder
$ cd Amazon-Shopping-Backend/
- install all go dependencies
$ go get ./...
- Start Database on :5432
docker compose up
- Start the server on :8080
go run main.go
- Testing API's
Add postman_examples/Amazon Backend.postman_collection.json in Postman Collection
Note : You need to restart backend server after every change in any .go file.
- Implementation of GORM.
- Basics of PostgreSQL.
- use of Postman Collections.
Feel free to open issue to add a feature request or report any BUG. It will be appreciated from the depth of my heart❤️.