A checkout functionality for an ecommerce application

EcommerceApp

EcommerceApp Server

A checkout functionality for an ecommerce application ๐Ÿ“–

Made with Golang ๐Ÿš€

GitHub language count Made by Lgdev07 License Stargazers

Installation and execution   |    Available Routes   |    How to contribute   

๐Ÿš€ Installation and execution

  1. Clone this repository and go to the directory;
  2. Rename sample .env;

๐Ÿ”ง Development

  1. Rename .env_sample to .env;
  2. Run docker-compose up;
  3. Make the Requests to http://localhost:8080;

๐Ÿงช Tests

  1. Run docker-compose -f docker-compose.test.yml up --build --abort-on-container-exit;

๐Ÿ›ฃ๏ธ Available Routes

POST - Create Checkout:

  • /checkout
    Expected Json Body Request:
  {
      "products": [
          {
              "id": 1,
              "quantity": 1
          }
      ]
  }

Expected Json Response:

  {
      "total_amount": 20000,
      "total_amount_with_discount": 19500,
      "total_discount": 500,
      "products": [
          {
              "id": 1,
              "quantity": 2,
              "unit_amount": 10000,
              "total_amount": 20000,
              "discount": 500,
              "is_gift": false
          },
          {
              "id": 3,
              "quantity": 1,
              "unit_amount": 0,
              "total_amount": 0,
              "discount": 0,
              "is_gift": true
          }
      ]
  }

๐Ÿค” How to contribute

  • Fork this repository;
  • Create a branch with your feature: git checkout -b my-feature;
  • Commit your changes: git commit -m 'feat: My new feature';
  • Push to your branch: git push origin my-feature.

After the merge of your pull request is done, you can delete your branch.


Similar Resources

Retro-Floppy UI is a web based application for managing & using a GoTek floppy emulator running the Flash Floppy firmware.

Retro-Floppy UI is a web based application for managing & using a GoTek floppy emulator running the Flash Floppy firmware.

A web user interface for a GoTek running flashfloppy utilising a Raspberry PI 0W as the storage. This allows for remote uploading of files & selecting which disk image is loaded on a retro computer like the BBC Micro or Amiga A1200

Dec 10, 2022

Hajimari is a beautiful & customizable browser startpage/dashboard with Kubernetes application discovery.

Hajimari is a beautiful & customizable browser startpage/dashboard with Kubernetes application discovery.

Hajimari ๐ŸŒ… ...The beginning of a pleasant experience Features Web search bar Dynamically list apps discovered from Kubernetes ingresses Support for n

Jan 4, 2023

A web application attack surface mapping tool. It takes in a list of urls then performs numerous probes

sigurlscann3r A web application attack surface mapping tool. It takes in a list of urls then performs numerous probes Resources Features Installation

Sep 24, 2022

A simple application lifecycle management tool with multiple servers.

A simple application lifecycle management tool with multiple servers.

Aug 13, 2022

Compose sample application Go server with an Nginx proxy and a Postgres database

Compose sample application Go server with an Nginx proxy and a Postgres database Project

Apr 7, 2022

Simple vanilla Go CRUD application with mongoDB database with its mflix dataset that I use for my thesis about benchmarking REST API and GraphQL.

Go GraphQL Simple vanilla Go CRUD application with mongoDB database with its mflix dataset that I use for my thesis about benchmarking REST API and Gr

Oct 15, 2021

An application for generating Microsoft Word resumes from JSON Resume data files

ResumeFodder NOTE: Primary development has moved over to GitLab: https://github.com/andrzejressel/ResumeFodder. If you're reading this on GitHub, then

Nov 25, 2021

A simple web application written in Golang which listens on port 8080

GoWebApp It's a simple web application written in Golang which listens on port 8080 Building It can be build using the command go build -o metricsweba

Oct 21, 2021

A web application example to work with a customer object

Wallester Task This repository contains a web application example to work with a customer object. Build in GO version 1.17.1 Live running app example

Oct 25, 2021
Ecommerce-api - Rest api of e-commerce web application
Ecommerce-api - Rest api of e-commerce web application

E-commerce Rest API Swagger documentation to test api Domain diagram

Jan 2, 2023
A fully functional Ecommerce API in GO GIN Framework and mongoDB with JWT Authentication
A fully functional Ecommerce API in GO GIN Framework and mongoDB  with JWT Authentication

Fully functional ECOMMERCE API USING GIN FRAMEWORK AND MONGODB -----Initial Release v2.30 โš ๏ธ Not tested the efficiency project structure Ecommerce ??

Dec 11, 2022
ecommerce Go, Mysql, Redis, Selenium.

ecommerce Go, Mysql, Redis, Selenium. To run locally Have docker & docker-compose installed on your operating system. cp .env.example .env && docker-c

Aug 31, 2022
API desarrollada en Go (Golang) para modificar precios en una tienda eCommerce (Shopify)
API desarrollada en Go (Golang) para modificar precios en una tienda eCommerce (Shopify)

Go eCommerce API API para modificar precios de productos en una tienda eCommerce de Shopify. Instrucciones Ingresar a la tienda eCommerce. Seleccionar

Oct 1, 2021
Api-go-gin-viper - Simple representaion on how to implement CRUD functionality in API using Go programming language

Simple API implementaion in Go To Get Started Clone repo Run the command to clon

Feb 18, 2022
This application is used as an example HTTP/SQLite application for Litestream tutorials.

This application is used as an example HTTP/SQLite application for Litestream tutorials. It simply maintains a count of HTTP requests and persists it to a SQLite database.

Apr 2, 2022
A simple database application that I was asked to implement as part of a job application process

This is a simple database application that I was asked to implement as part of a job application process. They told me I could choose any languages an

Nov 24, 2021
sigurlx a web application attack surface mapping tool.

sigurlx a web application attack surface mapping tool, it does ...:

Jul 24, 2021
urlsh is URL shortener application built on Go language.
urlsh is URL shortener application built on Go language.

GOlang URL shortener service with UI, API, Cache, Hits Counter and forwarder using postgres and redis in backend, bulma in frontend

Dec 11, 2022
GoTTY - Share your terminal as a web application
 GoTTY - Share your terminal as a web application

GoTTY - Share your terminal as a web application GoTTY is a simple command line tool that turns your CLI tools into web applications. Installation Fro

Dec 28, 2022