This is a repository for
myply
server
- spec
Go
1.18 or later, to use genericswire
for Dependency injectionFiber
web frameworkHexagonal
archYoutube data api
Ginkgo
for BDDGCP
- pre-commit
$ cp pre-commit.example .git/hooks/pre-commit
$ chmod +x .git/hooks/pre-commit
- setup
make setup
- run
$ make local
GO111MODULE=on go run ./application/cmd/main.go
┌───────────────────────────────────────────────────┐
│ Fiber v2.34.1 │
│ http://127.0.0.1:3000 │
│ (bound on host 0.0.0.0 and port 3000) │
│ │
│ Handlers ............. 2 Processes ........... 1 │
│ Prefork ....... Disabled PID ............. 11610 │
└───────────────────────────────────────────────────┘
# 127.0.0.1:8080/swagger/index.html
- docker
$ make docker.fiber
├── application // Interface layer and Application Services in hexagonal architecture
│ ├── cmd // command line interface
│ ├── controller // http controller
│ ├── middleware // http middleware, it can wrap errors or set request uuid or jwt authorization
│ └── routes // http router
├── domain // domain layer
│ ├── entity
│ ├── repository // same as Port in hexagonal architecture
│ ├── service // domain service layer
│ └── vo // value object
├── go.mod
├── infrastructure // infrastructure layer in hexagonal
│ ├── clients // external APIs (E.g. google client, firebase client ..)
│ ├── configs // configuration of fiber app
│ ├── logger
│ └── persistence // Impl of /domain/repository interface, database persistence layer(E.g. mysql, postgreSQL, mongo, redis ..)
└── pre-commit.example // go fmt before commit
/application
: https://github.com/Sairyss/domain-driven-hexagon#application-layer- ** Note that
cmd
does not represent CQRS's Command. (It's different,cmd
just represents command line interface)
- ** Note that
/doamin
: https://github.com/Sairyss/domain-driven-hexagon#domain-layer/infrastructure
: https://github.com/Sairyss/domain-driven-hexagon#infrastructure-layer
- unit test guide: fiber/app_test.go
- fiber recipes
- related to youtube api
- Unofficial youtube music library
- Electron wrapper around YouTube Music
- It also supports music streaming