{"id":24015111,"url":"https://github.com/guntoroyk/go-user-api","last_synced_at":"2026-02-16T12:38:42.933Z","repository":{"id":123763901,"uuid":"576517941","full_name":"guntoroyk/go-user-api","owner":"guntoroyk","description":"A RESTFul API build using Go to demonstrate basic CRUD, authentication, and authorization. Code organized using Clean Architecture and Proxy Design Pattern.","archived":false,"fork":false,"pushed_at":"2022-12-11T09:52:17.000Z","size":970,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T20:03:07.573Z","etag":null,"topics":["clean-architecture","crud-application","design-patterns","go","golang","rest-api"],"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/guntoroyk.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":"2022-12-10T04:54:12.000Z","updated_at":"2023-05-30T14:49:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"3f0d7c9c-172d-499f-9caa-a230b269dad6","html_url":"https://github.com/guntoroyk/go-user-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/guntoroyk/go-user-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guntoroyk%2Fgo-user-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guntoroyk%2Fgo-user-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guntoroyk%2Fgo-user-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guntoroyk%2Fgo-user-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guntoroyk","download_url":"https://codeload.github.com/guntoroyk/go-user-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guntoroyk%2Fgo-user-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29507912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","crud-application","design-patterns","go","golang","rest-api"],"created_at":"2025-01-08T07:53:49.080Z","updated_at":"2026-02-16T12:38:42.902Z","avatar_url":"https://github.com/guntoroyk.png","language":"Go","readme":"# go-user-api\n\nA RESTFul API build using Go to demonstrate basic CRUD, authentication, and authorization.\nCode organized using Clean Architecture and Proxy Design Pattern.\n\nGitHub Repository: https://github.com/guntoroyk/go-user-api\n\n# API Documentation\n\nThis API was deployed to Google Kubernetes Engine (GKE) Cluster with public IP `34.142.137.17`.\n\nAPI docs can be accessed through this link: https://documenter.getpostman.com/view/6929584/2s8YzTTh9w\n\nOr, click button bellow to try the API in Postman:\n\n[![Run in Postman](https://run.pstmn.io/button.svg)](\u003chttps://app.getpostman.com/run-collection/6929584-9e93e6a5-57ca-4250-931d-276052fe8dc0?action=collection%2Ffork\u0026collection-url=entityId%3D6929584-9e93e6a5-57ca-4250-931d-276052fe8dc0%26entityType%3Dcollection%26workspaceId%3D376ac51e-7371-4129-b917-abb587ed642f#?env%5BGo%20User%20API%20(prod)%5D=W3sia2V5IjoidXJsIiwidmFsdWUiOiIzNC4xNDIuMTM3LjE3IiwiZW5hYmxlZCI6dHJ1ZSwidHlwZSI6ImRlZmF1bHQiLCJzZXNzaW9uVmFsdWUiOiIzNC4xNDIuMTM3LjE3Iiwic2Vzc2lvbkluZGV4IjowfSx7ImtleSI6InRva2VuIiwidmFsdWUiOiIiLCJlbmFibGVkIjp0cnVlLCJ0eXBlIjoiZGVmYXVsdCIsInNlc3Npb25WYWx1ZSI6IiIsInNlc3Npb25JbmRleCI6MX1d\u003e)\n\nOr click this URL to open Postman Public Collection https://elements.getpostman.com/redirect?entityId=6929584-9e93e6a5-57ca-4250-931d-276052fe8dc0\u0026entityType=collection\n\nDon't forget to change the Environment located on the upper right corner of Postman app.\n\nIf you having trouble accessing that URL, you can download the the postman-collection.json here http://34.142.137.17/docs, then import it to your Postman desktop application.\n\n# Credential\n\n- Role: Admin\n\n```\nUsername: admin\n\nPassword: 1234\n```\n\n- Role: User\n\n```\nUsername: user\n\nPassword: 1234\n```\n\n## How to run on Local\n\nClone the repository\n\n```\ngit clone git@github.com:guntoroyk/go-user-api.git\n```\n\nRun on docker\n\n```\ndocker-compose up --build -d\n```\n\nThe API will available at http://localhost:8000\n\n## How to run on Kubernetes cluster\n\n```\nkubectl apply -f k8s-deploy/app/app_deployment.yml\n\nkubectl apply -f k8s-deploy/app/app_service.yml\n\nkubectl get svc\n\nkubectl get pods\n```\n\n## Run the unit test\n\n```\ngo mod vendor -v\n\ngo test ./... -v\n```\n\n## Software Design \u0026 Architecture Diagram\n\nThis API has 4 domains layer to follow the Clean Architecture:\n\n- Entity layer\n- Repository Layer\n- Usecase Layer\n- Handler Layer\n\nWith additional `Middleware` to intercept HTTP request \u0026 response, and `Proxy` between the Usecase and Repository to modify input \u0026 output data (here I used it to hash the password).\n\n![Alt Software Design](./docs/software-design-diagram.png?raw=true \"Software Design\")\n\nThis API was deployed to Google Kubernetes Engine (GKE) cluster with following diagram:\n\n![Alt Architecture Diagram](./docs/architecture-diagram-2.png?raw=true \"Architecture Diagram\")\n\nThe kubernetes deployment config is located on `./k8s-deploy` folder.\n\nRun this command to deploy using `kubectl`:\n\n```\nkubectl apply -f k8s-deploy/app/app_deployment.yml\n\nkubectl apply -f k8s-deploy/app/app_service.yml\n```\n\nHere is to check the deployment result:\n\n![Alt Check kubernetes deployment](./docs/kubectl-get-svc-get-pods.png?raw=true \"gCheck kubernetes deployment\")\n\n## Flowchart\n\n1. Login\n\n![Alt Login](./docs/flow-chart-login.png?raw=true \"Login\")\n\n2. Refresh Token\n\n![Alt Refresh Token](./docs/flow-chart-refresh-token.png?raw=true \"Refresh Token\")\n\n3. Create User\n\n![Alt Create User](./docs/flow-chart-create-user.png?raw=true \"Create User\")\n\n4. Update User\n\n![Alt Update User](./docs/flow-chart-update-user.png?raw=true \"Update User\")\n\n5. Get Users\n\n![Alt Get Users](./docs/flow-chart-get-user.png?raw=true \"Get Users\")\n\n6. Get User By ID\n\n![Alt Get User By ID](./docs/flow-chart-get-user-by-id.png?raw=true \"Get User By ID\")\n\n7. Delete User\n\n![Alt Delete User](./docs/flow-chart-delete-user.png?raw=true \"Delete User\")\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguntoroyk%2Fgo-user-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguntoroyk%2Fgo-user-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguntoroyk%2Fgo-user-api/lists"}