Code Monkey home page Code Monkey logo

cyclo-ecommerce's Introduction

cyclo-ecommerce

Simple ecommerce API server with Golang Echo

Requirements

  • Docker/docker-compose
  • Go 1.13++
  • Make

Run Locally

Install tools

make setup

Start database using Docker

make docker/up

init Database

make db/up

Seed sample data

make seeder

Start server up

make run

To drop and reset the database

make db/down
make db/up
make seeder

Tool I Use

  • Sqlboiler: this tool generate models that handle database operations which is much more fast than casual ORM
  • Migration: this helps run database migration written in SQL queries

Project structure

Design

My code base was design following clean architecture with 2 layers:

  • Infras: This layer contains packages involving middlewares, API configurations
  • Usecase: This layer is used for business logic handling in which repo packages come along with each target database table

Directory

  • cmd: Implemented necessary executable entry including many server application, seeder runner
  • internal: Encapsulated all the source code
  • db: Including SQLBoiler scripts and database migration configures
  • scripts: bash scripts to handle operations

What I have not done

  • Proper API docmentation
  • Cover all the unit tests

cyclo-ecommerce's People

Contributors

datshiro 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.