{"id":24487297,"url":"https://github.com/rizanw/banking-transaction-be","last_synced_at":"2025-03-14T23:13:53.475Z","repository":{"id":244271163,"uuid":"814740904","full_name":"rizanw/banking-transaction-be","owner":"rizanw","description":"banking transaction API sample app","archived":false,"fork":false,"pushed_at":"2024-11-19T02:46:31.000Z","size":857,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T15:45:24.663Z","etag":null,"topics":["api","backend","banking-system","clean-architecture","go","golang"],"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/rizanw.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-06-13T15:54:04.000Z","updated_at":"2025-01-03T17:20:29.000Z","dependencies_parsed_at":"2024-06-17T04:23:04.716Z","dependency_job_id":"52fe323e-1835-4d48-9639-3fc16b449bc7","html_url":"https://github.com/rizanw/banking-transaction-be","commit_stats":null,"previous_names":["rizanw/banking-transaction-be"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizanw%2Fbanking-transaction-be","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizanw%2Fbanking-transaction-be/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizanw%2Fbanking-transaction-be/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizanw%2Fbanking-transaction-be/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rizanw","download_url":"https://codeload.github.com/rizanw/banking-transaction-be/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243658270,"owners_count":20326467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["api","backend","banking-system","clean-architecture","go","golang"],"created_at":"2025-01-21T15:35:51.344Z","updated_at":"2025-03-14T23:13:53.450Z","avatar_url":"https://github.com/rizanw.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# banking-transaction-be\n\n# Overview\n\nBackend restful API to manage bank transaction with 2 roles user including authentication using jwt+session and\nauthorization based on their roles.\n`maker` role can create the transaction but can not `approve` the transaction. the `approver` role with review and\napprove or reject the transaction.\nbeside that the registration is also using otp verification code send by email. and many more features inside! kindly\ncheck!\n\nfor the frontend please check: https://github.com/rizanw/banking-transaction-fe\n\n## Features\n\nendpoint list:\n\n- **auth**:\n    - **send-otp**: to request otp code\n    - **register**: to register new user\n    - **login**: to login into the app\n    - **logout**: to clean the trace\n- **transaction**:\n    - **download-template**: to download transaction template in csv\n    - **upload**: to upload and submit the transaction data\n    - **transactions**: to get all data transactions and a lot of filter \u0026 pagination features here.\n    - **transaction/{id}**: to get the detail data transaction\n    - **transaction/{id}/audit**: to audit the transaction by approver\n- **utils**:\n    - **corporate** : helper endpoint for registration\n\nfurther endpoint description, kindly check postman collection.\n\n# Postman Collection\n\nCheck the postman collection here: https://www.postman.com/navigation-candidate-18708542/workspace/banking-transaction \n\n# Database Design\n\n![alt text](./schema/Screenshot%202024-06-18%20at%206.19.32%E2%80%AFPM.png)\n\n# Architecture Pattern\n\nThis solution is using clean architecture by uncle bob based on\nhis [book](https://books.google.co.id/books/about/Clean_Architecture.html?id=uGE1DwAAQBAJ\u0026source=kp_book_description\u0026redir_esc=y) \u0026 [blog](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html).\n\n![alt text](https://blog.cleancoder.com/uncle-bob/images/2012-08-13-the-clean-architecture/CleanArchitecture.jpg)\n\n![alt text](./architecture.png)\n\n# Getting Started\n\n## Prerequisites\n\nMake sure you have installed all the following prerequisites on your development machine:\n\n* go version : [1.19](https://golang.org/dl/)\n* docker: https://docs.docker.com/get-docker/\n\n## Local Run Guides:\n\nTo clone this repo:\n\n```bash\ngit clone https://github.com/rizanw/banking-transaction-be.git\n```\n\nTo set up the environment:\n\n- to run docker-compose (we need it for local postgres)\n\n```bash \nmake docker-up \n```\n\n- to initiate db schema (please make sure the postgres is running properly)\n\n```bash \n./schema/setup.sh\n```\n\n- to use email feature please update the config.yaml or add env vars\n\n```bash\nexport EMAIL=test@mail.com \nexport EMAIL_PASSWORD=secret\n```\n\nTo build and start the apps:\n\n- build the binaries:\n\n```bash \nmake build\n```\n\n- start the app:\n\n```bash \nmake run\n```\n\n## Unit Test\n\nTo run unit test\n\n```bash\nmake test\n```\n\n# Project Structure\n\n- `bin/` is directory for compiled binary\n- `cmd/` is the main program directory\n- `files/` contains app files (including db \u0026 config)\n    - `file/etc/tx-bank` contains app config files\n- `internal/` contains the whole logic of the app\n    - `internal/config` is the config of the app, has relation to files directory\n    - `internal/domain` encapsulate enterprise wide business policies including repo abstraction\n    - `internal/dto` is data transfer object, not layer, just the way to transfer object between layers\n    - `internal/handler` is application interface controller\n    - `internal/infra` is the infrastructure or framework of the app\n    - `internal/repo` is the repositories to fetch/store data of this app\n    - `internal/usecase` is layer contains application specific business rules\n- `schema/` contains sql schemas\n- `go.mod` the golang dependencies list\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frizanw%2Fbanking-transaction-be","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frizanw%2Fbanking-transaction-be","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frizanw%2Fbanking-transaction-be/lists"}