Code Monkey home page Code Monkey logo

sudosurya / ecommerce-gadgets-backend Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 18.31 MB

The backend of the e-commerce application is built using Go, Gin, and MongoDB. Go is a powerful programming language known for its simplicity and efficiency, making it an excellent choice for building robust web applications. Gin is a lightweight web framework for Go that provides a simple and intuitive API for creating RESTful APIs.

Home Page: https://documenter.getpostman.com/view/21427214/2s93sc4sWv

Go 100.00%
gin golang mongodb postman

ecommerce-gadgets-backend's Introduction

E-Commerce Application with Go, Gin, and MongoDB

Backend Setup

The backend of the e-commerce application is built using Go, Gin, and MongoDB. Go is a powerful programming language known for its simplicity and efficiency, making it an excellent choice for building robust web applications. Gin is a lightweight web framework for Go that provides a simple and intuitive API for creating RESTful APIs. MongoDB, a popular NoSQL database, is used for storing and managing the application's data. With MongoDB, you can benefit from its flexibility and scalability, making it a suitable choice for an e-commerce application that may handle a large volume of data. The backend project is organized into different components, such as routes, controllers, and models, following best practices for structuring a Go web application. By leveraging the power of Go, Gin, and MongoDB, the backend provides a reliable and efficient foundation for the e-commerce application.

Prerequisites

Getting Started

To get started, clone the repository and navigate to the project directory.

git clone 
cd backend
go mod download
go run main.go

Project Structure

The project is organized into different components, such as routes, controllers, and models, following best practices for structuring a Go web application.

├── controllers
│   ├── products.go
│   └── users.go
├── database
│   └── database.go
├── middlewares
│   └── auth.go (JWT authentication)
├── models
│   ├── product.go
│   └── user.go
├── routes
│   ├── products.go
│   └── users.go
├── utils
│   ├── error.go
│   └── response.go
├── .gitignore
├── go.mod
├── go.sum
├── main.go
└── README.md

Technologies

API Endpoints

https://documenter.getpostman.com/view/21427214/2s93sc4sWv

The backend provides the following API endpoints for managing the application's data.

Products

  • GET /products - Get all products
  • GET /products/:id - Get a single product
  • GET /products/page?page?=1&pageSize=2 - Get products with pagination

Users

  • POST /users/register - Register a new user
  • POST /users/login - Login an existing user
  • GET /users/profile - Get user profile

ecommerce-gadgets-backend's People

Contributors

sudosurya avatar

Stargazers

 avatar

Watchers

Abdulhafiz KAŞGARLI avatar  avatar

ecommerce-gadgets-backend's Issues

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.