Giter Club home page Giter Club logo

ebookstore's Introduction

E-book Store

A fully-featured REST API developed in Golang for an ebook store.

Check out the TODO.md if you want to have some fun ๐Ÿ˜‡

Table of Contents

Product Features

  • Authentication (Sign up, Login and Reset Password)
  • Multiple Roles (Customer and Administrator)
  • Book Catalog Management
  • Order Management
  • Pagination
  • Order Creation
  • File Storage/Retrieval
  • Payment Management

Tech/Libraries

High-level Documentation

This is a high-level technical documentation about how this application is structured. The diagrams follow the C4 model

System Context Diagram

Backend Container Diagram

Design Principles / Techniques

  • SOLID Principles
  • Hexagonal Architecture
  • Domain Driver Design
  • Package by Feature
  • Test-Driven-Development

Local Development

How to Run Locally

  1. Execute docker containers
make docker-up
  1. Execute REST HTTP Server
make start_server
  1. Open http://localhost:8080/docs in your browser

How to Lint Project

  1. Install golangci-lint
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
  1. Execute lint target
make lint

How to Use Husky Git pre-commit hook

Pre-commit hooks are very useful to prevent commits with bad code.

  1. Install Husky
go install github.com/go-courier/husky/cmd/husky@latest
  1. Init Husky
husky init

How Generate Seed Data

  1. Execute docker containers
make docker-up
  1. Clean database and generate seed data
make generate_seed_data

How to Regenerate Mocks

  1. Install Mockery
go install github.com/vektra/mockery/v2@latest
  1. Generate Mocks
make generate-mocks

How to Regenerate REST API Documentation

  1. Install Swaggo
go install github.com/swaggo/swag/cmd/[email protected]
  1. Generate Docs
make api-docs

How to Regenerate Dependency Initialization

  1. Install wire
go install github.com/google/wire/cmd/wire@latest
  1. Execute wire
make wire

ebookstore's People

Contributors

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