{"id":14975912,"url":"https://github.com/takeuchi-shogo/clean-architecture-go-sample","last_synced_at":"2026-02-08T17:35:05.238Z","repository":{"id":65169998,"uuid":"584718649","full_name":"takeuchi-shogo/clean-architecture-go-sample","owner":"takeuchi-shogo","description":"Modified for practicality from the previous one.","archived":false,"fork":false,"pushed_at":"2024-08-04T14:39:37.000Z","size":327,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T01:29:18.773Z","etag":null,"topics":["clean-architecture","docker","docker-compose","gin-gonic","golang","gorm","mysql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/takeuchi-shogo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-03T10:39:24.000Z","updated_at":"2024-08-04T14:39:41.000Z","dependencies_parsed_at":"2024-06-20T00:19:06.090Z","dependency_job_id":"94321da7-016e-4f44-8fef-d33872bbdf83","html_url":"https://github.com/takeuchi-shogo/clean-architecture-go-sample","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":"0.22580645161290325","last_synced_commit":"8f377b48f1b052942b804e9d19ce195a908b2a1d"},"previous_names":["takeuchi-shogo/clean-architecture-golang"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/takeuchi-shogo/clean-architecture-go-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takeuchi-shogo%2Fclean-architecture-go-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takeuchi-shogo%2Fclean-architecture-go-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takeuchi-shogo%2Fclean-architecture-go-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takeuchi-shogo%2Fclean-architecture-go-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takeuchi-shogo","download_url":"https://codeload.github.com/takeuchi-shogo/clean-architecture-go-sample/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takeuchi-shogo%2Fclean-architecture-go-sample/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266770412,"owners_count":23981557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clean-architecture","docker","docker-compose","gin-gonic","golang","gorm","mysql"],"created_at":"2024-09-24T13:52:51.048Z","updated_at":"2026-02-08T17:35:05.163Z","avatar_url":"https://github.com/takeuchi-shogo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Clean Atchitecture With Golang\n\nClean architecture with gin framework, air hot reload library, gorm as orm for database related operations.\n\n## Orverview\n\nA sample project to learn about Golang, Docker and Clean Architecture.\n\n## Requirement\n\n- macOS(Apple silicon)\n- Docker version 20.10.21\n\n\n## Running the project\n\n- Make sure you have docker installed.\n- Run `git clone https://github.com/takeuchi-shogo/clean-architecture-golang.git`\n- Copy .env.sample to .env\n- Copy ./app/src/infrastructure/config/config.go.sample to ./app/src/infrastructure/config/config.go\n- Run `docker-compose --env-file ./.env -f docker/docker-compose.yml up -d`\n- Go to `localhost:8081`\n\n## Description\n\n### Project tree\n\u003cpre\u003e\n.\n├── README.md\n├── app\n│   ├── air.toml\n│   ├── bin\n│   │   └── dev\n│   ├── go.mod\n│   ├── go.sum\n│   ├── lib\n│   │   └── env.go\n│   ├── main.go\n│   ├── src\n│   │   ├── adapters\n│   │   │   ├── controllers\n│   │   │   │   ├── context.go\n│   │   │   │   ├── h.go\n│   │   │   │   ├── logger.go\n│   │   │   │   └── product\n│   │   │   │       └── users_controller.go\n│   │   │   ├── gateways\n│   │   │   │   ├── gateways\n│   │   │   │   └── repositories\n│   │   │   │       └── user_repository.go\n│   │   │   └── presenters\n│   │   │       └── product\n│   │   │           └── users_presenter.go\n│   │   ├── application\n│   │   │   ├── repositories\n│   │   │   │   └── user_repository.go\n│   │   │   ├── usecases\n│   │   │   │   └── product\n│   │   │   │       └── user_interactor.go\n│   │   │   └── utilities\n│   │   │       └── format.go\n│   │   ├── entities\n│   │   │   ├── errors.go\n│   │   │   ├── response.go\n│   │   │   └── users.go\n│   │   └── infrastructure\n│   │       ├── config\n│   │       │   ├── config.go\n│   │       │   └── config.go.sample\n│   │       ├── database\n│   │       │   └── db.go\n│   │       ├── middleware\n│   │       │   ├── cors.go\n│   │       │   ├── logger.go\n│   │       │   └── request_handler.go\n│   │       ├── route\n│   │       │   ├── routing.go\n│   │       │   └── user_routes.go\n│   │       └── server\n│   │           └── server.go\n│   ├── tasks\n│   └── tmp\n├── docker\n│   ├── app\n│   │   └── Dockerfile\n│   ├── docker-compose.yml\n│   ├── mysql\n│   │   └── Dockerfile\n│   └── nginx\n│       └── Dockerfile\n├── mysql\n│   ├── config\n│   │   └── my.conf\n│   ├── data\n│   └── migrations\n│       └── 01_init_db.sql\n└── nginx\n    └── config\n        └── default.conf\n\u003c/pre\u003e\n\n\n#### About /app\nFolders related to the application itself.\n\n* bin\n\n\tbinary folder.\n\n* lib\n\n\tload environment variables.\n\n* /src\n\n\tContains the project source code.\n\n\t- /adapters\n\n\t\tinterface layer.\n\n\t- /applications\n\n\t\tbusiness logic layer.\n\n\t- /entities\n\n\t\tdomain layer.\n\n\t- /infrastructure\n\n\t\tinfra layer.\n\n* tasks\n\n* tmp\n\n* air.toml\n\n\t`https://github.com/cosmtrek/air` of setting file\t\n\n* go.mod, go.sum\n\n\tgolang modules.\n\n* main.go\n\n\troot file.\n\n\n#### About /docker\n\nContains the docker.\n\n#### About /mysql\n\nContains the database.\n\n#### About /nginx\n\nContains the nginx.\n\n#### About etc...\n\n* .env\n\n\tApplication-wide environment variable configuration file.\n\n\n## TODO\n\n。。。。。\n\n\n\n## Author\n\n[My Twitter Account](https://twitter.com/shogo_mthr123)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakeuchi-shogo%2Fclean-architecture-go-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakeuchi-shogo%2Fclean-architecture-go-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakeuchi-shogo%2Fclean-architecture-go-sample/lists"}