{"id":36884619,"url":"https://github.com/yael-castro/cook-book","last_synced_at":"2026-01-12T15:28:39.136Z","repository":{"id":176223832,"uuid":"655110009","full_name":"yael-castro/cook-book","owner":"yael-castro","description":"The purpose of the project is to provide an API to manage recipes and ingredients in order to filter for recipes by ingredients.","archived":false,"fork":false,"pushed_at":"2024-06-30T07:53:25.000Z","size":173,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-07-01T16:39:03.255Z","etag":null,"topics":["golang","hexagonal-architecture","http","rest-api","restful-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/yael-castro.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-06-17T23:23:03.000Z","updated_at":"2024-06-30T07:53:29.000Z","dependencies_parsed_at":"2024-05-11T22:31:44.569Z","dependency_job_id":"76b01d5f-0058-478e-af86-2ca263839e46","html_url":"https://github.com/yael-castro/cook-book","commit_stats":null,"previous_names":["yael-castro/cook-book"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yael-castro/cook-book","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yael-castro%2Fcook-book","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yael-castro%2Fcook-book/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yael-castro%2Fcook-book/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yael-castro%2Fcook-book/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yael-castro","download_url":"https://codeload.github.com/yael-castro/cook-book/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yael-castro%2Fcook-book/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"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":["golang","hexagonal-architecture","http","rest-api","restful-api"],"created_at":"2026-01-12T15:28:38.618Z","updated_at":"2026-01-12T15:28:39.130Z","avatar_url":"https://github.com/yael-castro.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cook Book  - API\n\n## Overview\nThe purpose of the project is to provide an API to manage recipes and ingredients in order to filter for recipes by ingredients.\n## Getting started\nThe API is composed of two parts, the first is an `REST API` that helps to manage the searches and storage related to recipes and the second is a `CLI` helps to fill the recipe storage.\n\n[See the RESTful documentation](./docs/openapi.yaml)\n\n[See the required environment variables](./docs/.env.example)\n### CLI\n###### How to install\n```shell\ngo install github.com/yael/cook-cook/cmd/cook-book-cli@latest\n```\n###### See how to use\n```shell\ncook-book-cli\n```\n\n### HTTP\n###### How to install \n```shell\ngo install github.com/yael-castro/cook-book/cmd/cook-book-http@latest\n```\n###### Start the server\n```shell\ncook-book-http\n```\n## How to use from source\nAll compiled binaries will put in the `build` directory\n### CLI\n###### Compile\n```shell\nmake cli\n```\n###### See how to use\n```shell\n./build/cook-book-cli\n```\n### REST API\n###### Compile\n```shell\nmake http\n```\n###### Start the server\n```shell\n./build/cook-book-http\n```\n## Scripts\nThis project contains some bash scripts to help to make some operations like compile.\n[See bash scripts](./scripts)\n\n## Architecture\n### Pattern (also style)\nThis project implements architecture pattern [Ports and Adapters](https://alistair.cockburn.us/hexagonal-architecture)\n### Decisions\n###### Vertical Slicing\n\nInterpreting what [Vertical Slicing](https://en.wikipedia.org/wiki/Vertical_slice) says, I decided to make one package per feature and put a little of each layer in each package.\n\n###### Go Project Layout Standard\n\nI decided to follow the [Go Project Layout Standard](https://github.com/golang-standards/project-layout).\n\n###### Compile only what is required\n\nAccording to the theory of hexagonal architecture, it is possible to have *n* adapters for different external signals (http, gRPC, command line).\n\n*For example* one use case is to create a recipe, but the instruction comes from a http request or a kafka message.\n\nSo I decided to compile a binary to handle each signal.\n\n### Package tree\n```\n.\n├── cmd\n│   └── {binary}\n├── internal\n│   ├── app\n│   │   └── {feature}\n│   │       ├── business (Use cases, rules, data models and ports)\n│   │       └── infrastructure\n│   │           ├── input  (Everything related to \"driving\" adapters)\n│   │           └── output (Everything related to \"driven\" adapters)\n│   └── container (DI container)\n└── pkg (Public and global code, potencially libraries)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyael-castro%2Fcook-book","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyael-castro%2Fcook-book","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyael-castro%2Fcook-book/lists"}