Go Commerce uses a monorepo service and uses the Golang language.
Table of Contents
- Monorepo Backend Services
- Project Explain
- Reference Project
- Installation
- Prequisites
- Installation
- Run Project
- Port HTTP
- Port RPC
- Next Development
- Use gRPC as gateway And service
- Use buf for generate proto
- Use dbq as sql library because speed is important
- Build query builder for dynamic query options
- Structure code is base on clean architecture
- Still not use unit test because i'm still learning write unit test on golang
- Run project must 1 on 1 terminal with file run.sh because still learning use to compose or kube for run monorepo golang project
- https://miro.medium.com/max/1186/1*GTzwD1BH-jxlK9X7olDZOw.png
- https://medium.com/@rocketlaunchr.cloud/how-to-benchmark-dbq-vs-sqlx-vs-gorm-e814caacecb5
- https://lbhackney-it.github.io/API-Playbook/clean_architecture/
- Golang v1.18.4 or above
- MySQL DBMS
- Using Sonarlint extension for quality code
- copy environment by services
cp .env.example .env
- sync go modules
go mod tidy
- install migration for go https://github.com/golang-migrate/migrate/tree/master/cmd/migrate
- sh migration-mysql.sh servicename
- sh run-service.sh servicename (ex : sh run-service.sh api)
- sh run-service.sh api (gateway)
- sh run-service.sh product (service)
Service Name | Port |
---|---|
api | 8001 |
Service Name | Port RPC | DBMS |
---|---|---|
user | 7001 | mysql |
product | 7002 | mysql |
transaction | 7003 | mysql |
- Create feature user and authentication
- Create feature transaction
- Want research how implement a good flash sale on ecommerce example 1million request in same time
- Add logger for debug
- Research and implement monitoring for golang project