Skip to content

mukulmantosh/go-ecommerce-app

Repository files navigation

Ecommerce App using Echo

Workflow Coverage

We intend to develop an e-commerce application with a REST architecture using the Echo framework. Echo is a Go web framework known for its exceptional performance, extensibility, and minimalistic design.

terminal

Prerequisites

Before starting up this project, make sure you have the necessary dependencies installed in your machine.

Software Installation

  • Go - Go is an open source programming language that makes it simple to build secure, scalable systems.

  • Docker - Docker helps developers bring their ideas to life by conquering the complexity of app development.

  • PostgreSQL - The World's Most Advanced Open Source Relational Database

  • golangci-lint - is a fast Go linters runner. It runs linters in parallel, uses caching, supports yaml config, etc.

For running Postgres locally using Docker, run the following command:

docker run --name ecommerce-local-db -p 5432:5432 -e POSTGRES_PASSWORD=******** -d postgres

Execute in Postgres DB Shell

create database ecommerce;

Database Schema

db_schema

Environment Variables

Before launching the application, be certain to configure the necessary environment variables.

- JWT_SECRET
- DB_HOST
- DB_USERNAME
- DB_PASSWORD
- DB_NAME
- DB_PORT

Using Windows? Run the following command

windows-env

Application Startup

Running App

make run

run-app

Building App

make build

build-app

Executing Tests

make test

test-app

REST Examples

You can find the Postman Collection/HTTP Client for GoLand under postman_httpclient directory.

postman-app

Docker

You have the option to retrieve the image from DockerHub.

Running Application in Local Kubernetes

Proceed with the instructions to launch your application within a local Kubernetes cluster, such as Docker Desktop or Minikube.

Before proceeding, make sure to update the ConfigMap.

k8s-terminal

Releases

No releases published

Packages

No packages published

Languages