{"id":20321299,"url":"https://github.com/supwr/transactions-challenge","last_synced_at":"2026-04-20T04:06:03.450Z","repository":{"id":225821927,"uuid":"764211716","full_name":"supwr/transactions-challenge","owner":"supwr","description":"Transaction API","archived":false,"fork":false,"pushed_at":"2024-04-26T18:57:51.000Z","size":135,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T09:43:42.420Z","etag":null,"topics":["gin","go","gorm","reflex","uber-fx"],"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/supwr.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":"2024-02-27T17:17:13.000Z","updated_at":"2024-04-25T00:33:43.000Z","dependencies_parsed_at":"2024-06-19T22:33:46.636Z","dependency_job_id":"0472ebfc-1793-41c5-b85b-43c91b4a2cf0","html_url":"https://github.com/supwr/transactions-challenge","commit_stats":null,"previous_names":["supwr/pismo-transactions"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/supwr/transactions-challenge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supwr%2Ftransactions-challenge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supwr%2Ftransactions-challenge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supwr%2Ftransactions-challenge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supwr%2Ftransactions-challenge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supwr","download_url":"https://codeload.github.com/supwr/transactions-challenge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supwr%2Ftransactions-challenge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28330175,"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":["gin","go","gorm","reflex","uber-fx"],"created_at":"2024-11-14T19:13:04.189Z","updated_at":"2026-01-12T01:03:41.370Z","avatar_url":"https://github.com/supwr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rotina de transações\nCada portador de cartão(cliente) possui uma conta com seus dados. A cada operação realizada pelo cliente\numa transação é criada e associada a sua respectiva conta. Cada transação possui um tipo(compra á vista, compra parcelada, saque ou pagamento),\n um valor e uma data de criação. Transações de tipo **compra e saque** são registradas com **valor negativo**, enquanto transações de **pagamento** são registradas \ncom **valor positivo**. \n\n## Setting up the project\n\n### Step 1\nRename the file `.env.example` to `.env`. This file contains the necessary environment variables for the project to run properly.\n\n### Step 2\nBuild the app and db containers\n\n```sh \nmake app.setup\n```\n\n### Step 3\nStart db container\n\n```sh \nmake db.up\n```\n\n\n### Step 4\nExecute migration\n\n```sh \nmake migrate\n```\n\n### Step 5\nRun the app\n\n```sh \nmake app.run\n```\n\n## Makefile commands\n\n| Command   | Description |\n|-----------|-------------|\n| app.setup | Build all docker-compose dependencies|\n| app.run   | Start app in dev mode|\n| app.stop  | Stop app container|\n| db.up     | Starts db container|\n| migrate   | Executes database migrations|\n| swagger   | Creates/updates swagger documentation|\n| generate  | Creates/updates mock files|\n| test | Run tests|\n| test-coverage| Run testes and outputs coverage file|\n\n## Swagger\n```\nhttp://localhost:8000/swagger/index.html\n```\n\n## Postman\n[Here](postman_collection.json) you can download the collection and import to the Postman client \n\n## Architecture and design decisions\nIn order to facilitate the development cycle, it was chosen to use **[reflex](https://github.com/cespare/reflex)** on the dev Dockerfile. This way, any changes made to source code can be tested imediatelly, without the need to rebuild the application.\n\nWith the intention to enable thorough testing and all the goodies of clean arch, the repositories and packages are referenced by their respective interfaces on the structs that make use of them. \n\nThe application is seperated in layers, this way any change in database, framework or any other external agent can be dealt with without major changes to the project.\n\nAs a dependency injection solution, the project uses **[uber-fx](https://github.com/uber-go/fx)**.\n\n## Project structure\n\n```\n├── api\n│   ├── handler\n├── cmd\n├── docs\n├── internal\n│   ├── account\n│   ├── transaction\n├── migrations\n├── pkg\n│   ├── clock\n│   ├── database\n├── .env.example\n├── .gitignore\n├── build.sh\n├── docker-compose.yml\n├── Dockerfile\n├── go.mod\n├── Makefile\n├── README.md\n└── reflex.conf\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupwr%2Ftransactions-challenge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupwr%2Ftransactions-challenge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupwr%2Ftransactions-challenge/lists"}