Hexagonal architecture is a design pattern suitable for building scalable and complex projects. This repository serves as a demonstration of the principles of Hexagonal Architecture in a Go project.
The goal of this project is to provide a straightforward example that developers can use to understand and apply Hexagonal Architecture in their own projects. By following the structure and patterns demonstrated here, developers can build scalable and maintainable systems with ease.
In this demo, the core business functionality revolves around managing user and video entities. Administrators have the capability to manage videos, while users are provided with access to view the available videos.
Explore the concept of Hexagonal Architecture further in Hexagonal-architecture.
- REST API - GIN
- gRPC
- GraphQL
- WebSocket
- Sqlite
- Mongodb
- Postgres
/app
|-- /cmd
| |-- main.go
|-- /docs
|-- /internal
| |-- /adapter
| | |-- /handler
| | | |-- /rest
| | | |-- /gRPC
| | |-- /reository
| | | |-- /sqlite
| | | |-- /postgres
| | | |-- /mongo
| | |-- /glue
| | | |-- /route
| | | |-- route.go
| | |-- /dto
| | |-- /templates
| |-- /core
| | |-- /entity
| | |-- /port
| | |-- /service
| | | |-- /test
| | |-- /util
Install godog binary:
go install github.com/cucumber/godog/cmd/godog@latest
Use go test
command to run feature tests since godog's cli is deprecated.