{"id":23248523,"url":"https://github.com/raulpe7eira/wabanex","last_synced_at":"2026-04-30T22:35:46.693Z","repository":{"id":130731051,"uuid":"439642029","full_name":"raulpe7eira/wabanex","owner":"raulpe7eira","description":"nlw#6 - trilha elixir from rocketseat by Rafael Camarda","archived":false,"fork":false,"pushed_at":"2024-02-18T23:49:44.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-28T23:44:40.712Z","etag":null,"topics":["absinthe","crudry","ecto","elixir","graphql","learn","nlw","nlw-6-elixir","phoenix","postgresql","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-12-18T14:55:43.000Z","updated_at":"2024-11-21T13:03:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"4c0d9801-0df0-4976-9089-1fe51acc15a2","html_url":"https://github.com/raulpe7eira/wabanex","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/raulpe7eira/wabanex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Fwabanex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Fwabanex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Fwabanex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Fwabanex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raulpe7eira","download_url":"https://codeload.github.com/raulpe7eira/wabanex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Fwabanex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32479448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"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":["absinthe","crudry","ecto","elixir","graphql","learn","nlw","nlw-6-elixir","phoenix","postgresql","rocketseat"],"created_at":"2024-12-19T08:14:08.468Z","updated_at":"2026-04-30T22:35:41.685Z","avatar_url":"https://github.com/raulpe7eira.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wabanex API\n\nThis repository is the code corresponding to the [nlw#6 - trilha elixir](https://nextlevelweek.com/) lab by Rafael Camarda.\n\n\u003e The project simulates a Gym Training management API that allows to register trainings and exercises with GraphQL.\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 wabanex\nmix deps.get\nmix ecto.setup\nmix test\nmix test --cover\nmix phx.server\n```\n\n## How to use?\n\n```bash\n# calculate imc (\n#   replaces curly braces:\n#     {filename} : file name (e.g.: students.csv)\n# )\ncurl -X GET 'http://localhost:4000/api?filename={filename}'\n\n# provides resources graphql\ncurl -X POST 'http://localhost:4000/api/graphql'\n\n# provides resources graphql with web development interface\ncurl -X POST 'http://localhost:4000/api/graphiql'\n```\n\n### Resources GraphQL\n\n```bash\n# creates user\nmutation {\n  createUser(input: {\n    name: \"beltrano\",\n    email: \"beltrano@mail.com\",\n    password: \"123\"\n  }) {\n    id\n  }\n}\n\n# creates training\nmutation {\n  createTraining(input: {\n    endDate: \"2021-12-12\",\n    startDate: \"2021-12-11\",\n    userId: \"b4156e52-79d7-4625-a411-b3535f376d49\",\n    exercises: [\n      {\n        name: \"Triceps\",\n        youtubeVideoUrl: \"https://youtuba.com/fulano\",\n        repetitions: \"3x15\",\n        protocolDescription: \"drop-set\"\n      },\n      {\n        name: \"Biceps\",\n        youtubeVideoUrl: \"https://youtuba.com/fulano\",\n        repetitions: \"4x15\",\n        protocolDescription: \"drop-set\"\n      }\n    ]\n  }) {\n    id\n  }\n}\n\n# retrieves user\n{\n  getUser(id: \"b4156e52-79d7-4625-a411-b3535f376d49\") {\n    id\n    name\n    email\n    trainings {\n      id\n      startDate\n      endDate\n      exercises {\n        id\n        name\n        youtubeVideoUrl\n        repetitions\n        protocolDescription\n      }\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraulpe7eira%2Fwabanex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraulpe7eira%2Fwabanex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraulpe7eira%2Fwabanex/lists"}