{"id":24782464,"url":"https://github.com/thnkrn/go-gin-clean-arch","last_synced_at":"2025-10-12T05:31:32.640Z","repository":{"id":50601895,"uuid":"457662715","full_name":"thnkrn/go-gin-clean-arch","owner":"thnkrn","description":"Golang REST API service with Gin framework, Wire for dependency injection, integrating with GORM for ORM libray, Viper for configuration and Swag for creating Swagger documentation by applying clean architecture","archived":false,"fork":false,"pushed_at":"2022-06-12T08:28:48.000Z","size":90,"stargazers_count":48,"open_issues_count":0,"forks_count":16,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-14T14:48:34.367Z","etag":null,"topics":["clean-architecture","gin","go","golang","gorm","jwt","swagger","viper","wire"],"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/thnkrn.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}},"created_at":"2022-02-10T06:47:20.000Z","updated_at":"2024-11-04T17:47:51.000Z","dependencies_parsed_at":"2022-09-14T22:41:12.294Z","dependency_job_id":null,"html_url":"https://github.com/thnkrn/go-gin-clean-arch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thnkrn%2Fgo-gin-clean-arch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thnkrn%2Fgo-gin-clean-arch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thnkrn%2Fgo-gin-clean-arch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thnkrn%2Fgo-gin-clean-arch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thnkrn","download_url":"https://codeload.github.com/thnkrn/go-gin-clean-arch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236169070,"owners_count":19106105,"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","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","gin","go","golang","gorm","jwt","swagger","viper","wire"],"created_at":"2025-01-29T11:17:27.296Z","updated_at":"2025-10-12T05:31:27.306Z","avatar_url":"https://github.com/thnkrn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clean Architecture using Golang with Gin framework\n\n## Template Structure\n\n- [Gin](github.com/gin-gonic/gin) is a web framework written in Go (Golang). It features a martini-like API with performance that is up to 40 times faster thanks to httprouter. If you need performance and good productivity, you will love Gin.\n- [JWT](github.com/golang-jwt/jwt) A go (or 'golang' for search engine friendliness) implementation of JSON Web Tokens.\n- [GORM](https://gorm.io/index.html) with [PostgresSQL](https://gorm.io/docs/connecting_to_the_database.html#PostgreSQL)The fantastic ORM library for Golang aims to be developer friendly.\n- [Wire](https://github.com/google/wire) is a code generation tool that automates connecting components using dependency injection.\n- [Viper](https://github.com/spf13/viper) is a complete configuration solution for Go applications including 12-Factor apps. It is designed to work within an application, and can handle all types of configuration needs and formats.\n- [swag](https://github.com/swaggo/swag) converts Go annotations to Swagger Documentation 2.0 with [gin-swagger](https://github.com/swaggo/gin-swagger) and [swaggo files](github.com/swaggo/files)\n\n## Using `go-gin-clean-arch` project\n\nTo use `go-gin-clean-arch` project, follow these steps:\n\n```bash\n# Navigate into the project\ncd ./go-gin-clean-arch\n\n# Install dependencies\nmake deps\n\n# Generate wire_gen.go for dependency injection\n# Please make sure you are export the env for GOPATH\nmake wire\n\n# Run the project in Development Mode\nmake run\n```\n\nAdditional commands:\n\n```bash\n➔ make help\nbuild                          Compile the code, build Executable File\nrun                            Start application\ntest                           Run tests\ntest-coverage                  Run tests and generate coverage file\ndeps                           Install dependencies\ndeps-cleancache                Clear cache in Go module\nwire                           Generate wire_gen.go\nswag                           Generate swagger docs\nhelp                           Display this help screen\n```\n\n## Available Endpoint\n\nIn the project directory, you can call:\n\n### `GET /`\n\nFor getting status page\n\n### `POST /login`\n\nFor generating a JWT\n\n### `GET /api/users`\n\nFor getting all of users\n\n### `GET /api/users/:id`\n\nFor getting user by ID\n\n### `POST /api/users`\n\nFor creating new user\n\n### `DELETE /api/users/:id`\n\nFor removing existing user\n\n### `PUT /api/users/:id`\n\nFor updating existing user\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthnkrn%2Fgo-gin-clean-arch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthnkrn%2Fgo-gin-clean-arch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthnkrn%2Fgo-gin-clean-arch/lists"}