{"id":36492467,"url":"https://github.com/cyruzin/clean_architecture","last_synced_at":"2026-01-12T01:57:16.251Z","repository":{"id":98675211,"uuid":"288335756","full_name":"cyruzin/clean_architecture","owner":"cyruzin","description":"Clean Architecture Simple App.","archived":false,"fork":false,"pushed_at":"2021-04-11T16:16:35.000Z","size":784,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T17:48:57.567Z","etag":null,"topics":["clean-architecture","clean-code","example","go","golang","robert-c-martin"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyruzin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-08-18T02:33:14.000Z","updated_at":"2023-09-04T03:09:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"3079f334-c20b-4f22-b939-80c0c4e93e21","html_url":"https://github.com/cyruzin/clean_architecture","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cyruzin/clean_architecture","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyruzin%2Fclean_architecture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyruzin%2Fclean_architecture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyruzin%2Fclean_architecture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyruzin%2Fclean_architecture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyruzin","download_url":"https://codeload.github.com/cyruzin/clean_architecture/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyruzin%2Fclean_architecture/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"ssl_error","status_checked_at":"2026-01-12T00:36:15.229Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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","clean-code","example","go","golang","robert-c-martin"],"created_at":"2026-01-12T01:57:15.579Z","updated_at":"2026-01-12T01:57:16.242Z","avatar_url":"https://github.com/cyruzin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clean Architecture Simple App\n\n[![Build](https://github.com/cyruzin/clean_architecture/workflows/Build/badge.svg)](https://github.com/cyruzin/clean_architecture/actions?query=workflow%3ABuild+branch%3Amaster) [![Go Report Card](https://goreportcard.com/badge/github.com/cyruzin/clean_architecture)](https://goreportcard.com/report/github.com/cyruzin/clean_architecture) [![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/Naereen/StrapDown.js/blob/master/LICENSE)\n\nThis repo contains a simple command line tool and a rest server that checks the best price between two destinations.\n\n## Architecture\n\nFor the system architecture I have decided to use the Clean Architecture proposed by Robert C. Martin (Uncle Bob).\n\nPull requests are welcome.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"./assets/clean_architecture_diagram.png\"\u003e\u003c/p\u003e\n\n## Install\n\nMake sure you have Git and Go installed in you machine.\n\nClone the repo:\n\n```sh\n git clone git@github.com:cyruzin/clean_architecture.git\n```\n\nInstall Go dependencies:\n\n```go\n go mod download\n```\n\nIf you want to modify the default values, rename the .env.example file to .env and change the values if you want.\n\n```sh\n mv .env.example .env\n```\n\n## Running\n\n### Cli\n\nGo to the cli folder:\n\n```sh\n cd cmd/cli\n```\n\nThen, run the command below:\n\n```go\n  go run main.go BBB AAA\n```\n\n### Rest Server\n\nGo to the routes folder:\n\n```sh\n cd cmd/routes\n```\n\nThen, run the command below:\n\n```go\n  go run main.go\n```\n\nDefault Base URL: http://localhost:8000\n\nEnd-points:\n\nGET - /route\n\nParams required: departure, destination\n\nEg: http://localhost:8000/route?departure=BBB\u0026destination=AAA\n\nPOST - /route\n\nParams required: departure, destination, price\n\nEg: http://localhost:8000/route\n\nJSON Payload:\n\n```json\n{\n  \"departure\": \"BBB\",\n  \"destination\": \"AAA\",\n  \"price\": 76\n}\n```\n\n## Libs\n\n- go-chi\n- json-iterator\n- zerolog\n- envconfig\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyruzin%2Fclean_architecture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyruzin%2Fclean_architecture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyruzin%2Fclean_architecture/lists"}