Giter Club home page Giter Club logo

shopping-app-backend-go's Introduction

🔥 Introduction

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.

💥 APIs

	r.POST("/api/user/login", userauth.Login)
	r.POST("/api/user/register", userauth.Register)
	r.POST("/api/seller/login", 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)

🛠️ Local Development :

  1. Open your terminal and then type
    $ git clone https://github.com/Pushkarm029/Amazon-Shopping-Backend
  2. cd into the folder
    $ cd Amazon-Shopping-Backend/
  3. install all go dependencies
    $ go get ./...
  4. Start Database on :5432
    docker compose up
  5. Start the server on :8080
    go run main.go
  6. 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.

❤️ Learnings :

  • Implementation of GORM.
  • Basics of PostgreSQL.
  • use of Postman Collections.

⛑️ Maintenance :

Feel free to open issue to add a feature request or report any BUG. It will be appreciated from the depth of my heart❤️.

shopping-app-backend-go's People

Contributors

pushkarm029 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.