gamberooni / go-supermarket

Basic CRUD application implemented using Echo framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-supermarket

There are 4 models:

  • Customer
  • Product
  • Transaction
  • Purchase

A supermarket sells a variety of Products. Only registered Customers can shop at the supermarket. A transaction has Purchases, which is a list of items purchased by a customer. Each Purchase has information like Quantity, PricePerUnit and the Product's information.

Refer to the struct types in the model directory for more detailed information.

Initialization

Execute go run cmd/generatedb/main.go to generate some dummy data in a sqlite database called test.db in the project root directory.

Execute go run main.go to start the server. By default the server starts on port 80.

Todo

  • Deep dive on validator

About

Basic CRUD application implemented using Echo framework


Languages

Language:Go 98.5%Language:Dockerfile 1.5%