https://github.com/csalih/go-clean-architecture
A sample project how to apply Clean Architecture in Go
https://github.com/csalih/go-clean-architecture
architecture clean-architecture education golang http-server software-design
Last synced: about 1 month ago
JSON representation
A sample project how to apply Clean Architecture in Go
- Host: GitHub
- URL: https://github.com/csalih/go-clean-architecture
- Owner: CSalih
- License: mit
- Created: 2023-02-04T00:59:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-10T12:49:32.000Z (over 3 years ago)
- Last Synced: 2025-06-14T21:03:30.437Z (about 1 year ago)
- Topics: architecture, clean-architecture, education, golang, http-server, software-design
- Language: Go
- Homepage:
- Size: 134 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Clean Architecture with Go
This is a sample project to demonstrate how to
apply [Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html
) in Go.
> Note: This is my first Go project, I'm just learning Go so don't expect a good code
> quality.
## Getting Started
### Server
```bash
# start the server
make run
# create and get an user
curl --location --request POST 'http://localhost:8080/api/v1/users/hello-world'
curl --location --request GET 'http://localhost:8080/api/v1/users/hello-world'
curl --location --request GET 'http://localhost:8080/api/v1/users'
```
### CLI
```
# build an use cli
make build-cli
./build/gca-cli user add --username hello-world
./build/gca-cli user update --username hello-world --status active
./build/gca-cli user get --username hello-world
```
## Architecture
The dependency goes towards the
center - [The Dependency Rule](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html#the-dependency-rule).

## License
Copyright 2023 © CSalih. All rights reserved.
Licensed under MIT