{"id":23248514,"url":"https://github.com/raulpe7eira/inmana","last_synced_at":"2026-04-29T14:04:43.519Z","repository":{"id":130731010,"uuid":"365860946","full_name":"raulpe7eira/inmana","owner":"raulpe7eira","description":"nlw#5 - trilha elixir from rocketseat by Rafael Camarda","archived":false,"fork":false,"pushed_at":"2024-02-18T23:50:39.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-21T07:07:00.390Z","etag":null,"topics":["bamboo","coveralls","credo","ecto","elixir","learn","nlw","nlw-5-elixir","phoenix","rocketseat"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":false,"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/raulpe7eira.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,"zenodo":null}},"created_at":"2021-05-09T22:31:33.000Z","updated_at":"2024-11-21T13:03:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"b38f0c21-9a90-40dc-8c61-ef8e36e8a15d","html_url":"https://github.com/raulpe7eira/inmana","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/raulpe7eira/inmana","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Finmana","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Finmana/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Finmana/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Finmana/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raulpe7eira","download_url":"https://codeload.github.com/raulpe7eira/inmana/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Finmana/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32428622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"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":["bamboo","coveralls","credo","ecto","elixir","learn","nlw","nlw-5-elixir","phoenix","rocketseat"],"created_at":"2024-12-19T08:14:07.488Z","updated_at":"2026-04-29T14:04:43.494Z","avatar_url":"https://github.com/raulpe7eira.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InMana API\n\nThis repository is the code corresponding to the [nlw#5 - trilha elixir](https://nextlevelweek.com/) lab by Rafael Camarda.\n\n\u003e The project simulates an inventory management API that allows to register restaurants and supplies, view supplies, generate reports of expiring supplies and send them to the restaurant's email.\n\n## Previous installations\n\n**Database**, we recommends install [PostgreSQL](https://www.postgresql.org/) with [Docker](https://hub.docker.com/_/postgres). After that, sets connection configuration at:\n\n- `config/dev.exs`\n- `config/test.exs`\n\n## Gets dependencies, setups database, tests, coverages, reports and starts application\n\n```bash\ncd inmana\nmix deps.get\nmix ecto.setup\nmix test\nmix test --cover\nmix coveralls.html\nmix phx.server\n```\n\n## How to use?\n\n```bash\n# welcomes (\n#   replaces curly braces:\n#     {name} : your name\n#     {age} : your age\n# )\ncurl -X GET 'http://localhost:4000/api?name={name}\u0026age={age}'\n\n# creates restaurant\ncurl -X POST 'http://localhost:4000/api/restaurants' \\\n-H 'Content-Type: application/json' \\\n-d '{\n    \"email\": \"ribs@puffup.com\",\n    \"name\": \"Ribs Puff Up\"\n}'\n\n# creates supply (\n#   replaces curly braces:\n#     {restaurant_id} : restaurant identifier\n# )\ncurl -X POST 'http://localhost:4000/api/supplies' \\\n-H 'Content-Type: application/json' \\\n-d '{\n    \"description\": \"Tomato Sauce\",\n    \"expiration_date\": \"2021-05-09\",\n    \"responsible\": \"Raul\",\n    \"restaurant_id\": \"{restaurant_id}\"\n}'\n\n# retrieves supply by id (\n#   replaces curly braces:\n#     {id} : supply identifier\n# )\ncurl -X GET 'http://localhost:4000/api/supplies/{id}'\n```\n\n## Background processing\n\nAn expiring supplies report is emailed every 10 seconds through the generic server ([`Scheduler`](./lib/inmana/supplies/scheduler.ex)).\n\n\u003e See in **development mode** the emails sent at: `http://localhost:4000/send_emails`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraulpe7eira%2Finmana","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraulpe7eira%2Finmana","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraulpe7eira%2Finmana/lists"}