{"id":20469187,"url":"https://github.com/hynduf/tasks-go-clean-architecture","last_synced_at":"2026-07-04T08:32:13.208Z","repository":{"id":200899625,"uuid":"625398995","full_name":"HynDuf/tasks-go-clean-architecture","owner":"HynDuf","description":"A Tasks Management REST API written in Go using Clean Architecture","archived":false,"fork":false,"pushed_at":"2023-04-15T10:37:02.000Z","size":193,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-20T03:07:55.503Z","etag":null,"topics":["clean-architecture","go","golang","rest-api","tasks-manager"],"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/HynDuf.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}},"created_at":"2023-04-09T01:41:08.000Z","updated_at":"2025-04-16T20:17:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"4cd3ae44-2f83-4138-8183-c9bb71747f50","html_url":"https://github.com/HynDuf/tasks-go-clean-architecture","commit_stats":null,"previous_names":["hynduf/tasks-go-clean-architecture"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HynDuf/tasks-go-clean-architecture","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HynDuf%2Ftasks-go-clean-architecture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HynDuf%2Ftasks-go-clean-architecture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HynDuf%2Ftasks-go-clean-architecture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HynDuf%2Ftasks-go-clean-architecture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HynDuf","download_url":"https://codeload.github.com/HynDuf/tasks-go-clean-architecture/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HynDuf%2Ftasks-go-clean-architecture/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35115741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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","go","golang","rest-api","tasks-manager"],"created_at":"2024-11-15T14:08:12.443Z","updated_at":"2026-07-04T08:32:13.191Z","avatar_url":"https://github.com/HynDuf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Tasks Management REST API written in Go using Clean Architecture\nA simple Golang backend project on my journey of learning clean architecture using Gin, MYSQL, JWT Authentication.\n## Table of contents\n## Clean Architecture\nClean architecture is a software design principle proposed by Robert C. Martin ([see here](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)) that aims to achieve the separation of concerns by dividing the software into layers. \n\nThe architecture produces systems that are independent of frameworks, testable, and independent of UI, database, and any external agency. The Dependency Rule, which states that source code dependencies can only point inwards, makes this architecture work. \n\nClean architecture typically consists of four layers: entities, use cases, interface adapters, and frameworks and drivers.\n\nThe examples in this repository demonstrate the implementation of Clean Architecture in Golang.\n### Architecture Layers\n![architecture](assets/architecture.png)\n### Folder Structure\n```\ntasks-go-clean-architecture\n├── bootstrap\n│   └── env.go\n├── cmd\n│   └── main.go\n├── database\n│   └── mysql\n│       ├── migrations\n│       │   ├── 000_create-database.sql\n│       │   ├── 001_create-schema.sql\n│       │   └── 002_seeds-data.sql\n│       └── mysql.go\n├── go.mod\n├── go.sum\n├── internal\n│   ├── delivery\n│   │   └── http\n│   │       ├── handler       -\u003e outermost layer driving the business logic\n│   │       │   ├── handler.go\n│   │       │   └── interface.go\n│   │       ├── middleware\n│   │       │   └── jwt_auth_middleware.go\n│   │       └── route\n│   │           └── route.go\n│   ├── domain\n│   │   ├── entity            -\u003e entity encapsulate business rules (struct with methods)\n│   │   │   ├── task.go\n│   │   │   └── user.go\n│   │   └── interface\n│   │       ├── repository    -\u003e repository interface bridge repository and usecase layer\n│   │       │   ├── task.go\n│   │       │   └── user.go\n│   │       └── usecase       -\u003e usecase interface bridge usecase and handler layer\n│   │           ├── login.go\n│   │           ├── refresh_token.go\n│   │           ├── signup.go\n│   │           └── task.go\n│   ├── repository            -\u003e implementation of repository layer\n│   │   ├── taskrepo\n│   │   │   └── repository.go\n│   │   └── userrepo\n│   │       ├── model.go\n│   │       └── repository.go\n│   └── usecase               -\u003e implementation of usecase layer\n│       ├── login\n│       │   └── login_usecase.go\n│       ├── refreshtkn\n│       │   └── refresh_token_usecase.go\n│       ├── signup\n│       │   └── signup_usecase.go\n│       └── tasks\n│           └── task_usecase.go\n├── pkg                        -\u003e utilities, helpers, ...\n│   └── tokenutil\n│       └── tokenutil.go\n└── README.md\n```\n### Domain\n#### Entities\n- User\n- Task\n#### Interfaces\n- Usecase Interfaces\n- Repository Interfaces\n### Usecase\n### Repository\n## API\n\n- POST `/api/signup`: Sign up\n- POST `/api/login`: Login\n- GET `/api/task`: Fetch all tasks of user\n- POST `/api/task/add`: Add a task\n- PUT `/api/task/{id}`: Toggle complete status of a task\n- DELETE `/api/task/{id}`: Delete a task\n\n## Set Up\n## References\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhynduf%2Ftasks-go-clean-architecture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhynduf%2Ftasks-go-clean-architecture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhynduf%2Ftasks-go-clean-architecture/lists"}