{"id":23248513,"url":"https://github.com/raulpe7eira/rp7pay","last_synced_at":"2026-05-17T15:06:12.213Z","repository":{"id":130731059,"uuid":"341348771","full_name":"raulpe7eira/rp7pay","owner":"raulpe7eira","description":"nlw#4 - trilha elixir from rocketseat by Rafael Camarda","archived":false,"fork":false,"pushed_at":"2024-02-18T23:50:22.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T15:42:27.759Z","etag":null,"topics":["bcrypt","coveralls","credo","ecto","elixir","learn","nlw","nlw-4-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-02-22T21:57:24.000Z","updated_at":"2024-11-21T13:03:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"138ed376-ecce-4354-b443-8473af9fe5e8","html_url":"https://github.com/raulpe7eira/rp7pay","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/raulpe7eira/rp7pay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Frp7pay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Frp7pay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Frp7pay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Frp7pay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raulpe7eira","download_url":"https://codeload.github.com/raulpe7eira/rp7pay/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpe7eira%2Frp7pay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33143276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"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":["bcrypt","coveralls","credo","ecto","elixir","learn","nlw","nlw-4-elixir","phoenix","rocketseat"],"created_at":"2024-12-19T08:14:07.317Z","updated_at":"2026-05-17T15:06:11.954Z","avatar_url":"https://github.com/raulpe7eira.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RP7Pay API\n\nThis repository is the code corresponding to the [nlw#4 - trilha elixir](https://nextlevelweek.com/) lab by Rafael Camarda.\n\n\u003e The project simulates a banking API that allows to withdraw, deposit or transfer money between two accounts and uses Basic Auth as authentication in some resources.\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 rp7pay\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#     {filename} : path for CSV file w/ the following sintax - `1,2,3,4,8,9,10`\n# )\ncurl -X GET 'http://localhost:4000/api/{filename}'\n\n# creates user\ncurl -X POST 'http://localhost:4000/api/users' \\\n-H 'Content-Type: application/json' \\\n-d '{\n    \"name\": \"Raul Pereira\",\n    \"nickname\": \"raulpe7eira\",\n    \"email\": \"mail@raulpe7eira.com\",\n    \"age\": 40,\n    \"password\": \"12345abcd\"\n}'\n\n# does deposit (\n#   replaces curly braces:\n#     {id} : account identifier\n#     {basic_auth} : username and password credentials\n# )\ncurl -X POST 'http://localhost:4000/api/accounts/{id}/deposit' \\\n-H 'Authorization: {basic_auth}' \\\n-H 'Content-Type: application/json' \\\n-d '{\n    \"value\": 50.00\n}'\n\n# does withdraw (\n#   replaces curly braces:\n#     {id} : account identifier\n#     {basic_auth} : username and password credentials\n# )\ncurl -X POST 'http://localhost:4000/api/accounts/{id}/withdraw' \\\n-H 'Authorization: {basic_auth}' \\\n-H 'Content-Type: application/json' \\\n-d '{\n    \"value\": 1.00\n}'\n\n# does transaction (\n#   replaces curly braces:\n#     {from} : from account identifier\n#     {to} : to account identifier\n#     {basic_auth} : username and password credentials\n# )\ncurl -X POST 'http://localhost:4000/api/accounts/transaction' \\\n-H 'Authorization: {basic_auth}' \\\n-H 'Content-Type: application/json' \\\n-d '{\n    \"from\": \"{from}\",\n    \"to\": \"{to}\",\n    \"value\": 1.00\n}'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraulpe7eira%2Frp7pay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraulpe7eira%2Frp7pay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraulpe7eira%2Frp7pay/lists"}