{"id":23095192,"url":"https://github.com/pauluswi/bigben","last_synced_at":"2026-05-01T22:31:41.703Z","repository":{"id":65176889,"uuid":"440364619","full_name":"pauluswi/bigben","owner":"pauluswi","description":"BigBen is a microservice which provides simple wallet service for application users.","archived":false,"fork":false,"pushed_at":"2022-01-14T04:51:09.000Z","size":145,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T19:34:02.681Z","etag":null,"topics":["docker","docker-compose","ewallet","fintech","golang","microservice","mysql","payment","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pauluswi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-21T02:19:39.000Z","updated_at":"2022-06-21T01:02:02.000Z","dependencies_parsed_at":"2023-01-06T01:18:09.192Z","dependency_job_id":null,"html_url":"https://github.com/pauluswi/bigben","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pauluswi/bigben","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauluswi%2Fbigben","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauluswi%2Fbigben/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauluswi%2Fbigben/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauluswi%2Fbigben/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pauluswi","download_url":"https://codeload.github.com/pauluswi/bigben/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauluswi%2Fbigben/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32515837,"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":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["docker","docker-compose","ewallet","fintech","golang","microservice","mysql","payment","unit-testing"],"created_at":"2024-12-16T22:19:53.020Z","updated_at":"2026-05-01T22:31:41.685Z","avatar_url":"https://github.com/pauluswi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BigBen\n\nIs a microservice which provides simple wallet service for application users. \n\n[![Build](https://github.com/pauluswi/bigben/actions/workflows/build.yml/badge.svg)](https://github.com/pauluswi/bigben/actions/workflows/build.yml)\n[![codecov](https://codecov.io/gh/pauluswi/bigben/branch/main/graph/badge.svg)](https://codecov.io/gh/pauluswi/bigben)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n\n## Description\n\nA Rest API to access monetary accounts with the current balance of a user. The balance can be modified by registering transactions on the account, either debit transactions (removing funds) or credit transactions (adding funds).\n\nA debit transaction will only succeed if there are sufficient funds on the account (balance - debit amount \u003e= 0).\nUsers can view their wallet balance, transaction history, make a point-to-point transfer, deposit (top-up), and withdrawal (cash out).\n\nFor Authentication, an API key is used at the header as a simple way to secure access.\n\n \n## Directory Structure  \n```\n├── cmd                        // app contains main execution file \n├── configs                    // app configuration files \n├── controller                 // is a directory consist of routing process\n├── database                   // is a directory consist of db/data processing\n│   └── migration              // is a directory consist of migration files\n│   └── seeder                 // is a directory consist of seeding data process\n├── entity                     // is a directory consist of struct models used in codebase\n├── exception                  // is a directory consist of exception mechanism\n├── middleware                 // is a directory consist of app validation layer before hit the main functionalities \n├── model                      // is a directory consist of struct used roe request and response\n├── repository                 // is a domain's repository acting to store the data\n├── service                    // is a directory consist of functional interface\n├── validation                 // is a directory consist of functional validation\n```\n# Endpoints\n\n## Healthcheck\n\n| Endpoint | Method | Description |\n| -------- | ------ | ----------- |\n| /ping    | GET    | Check for the service application healthiness |\n\n## Wallet\n\n| Endpoint                                      | Method | Description |\n| --------------------------------------------- | ------ | ----------- |\n| /v1/ewallet/balance/:account_id               | GET    | Retrieve User's Wallet Balance  |\n| /v1/ewallet/transaction/history/:account_id   | GET    | Retrieve User's Transaction History |\n| /v1/ewallet/transaction/transfer              | POST   | Make a Point to Point Transfer |\n| /v1/ewallet/transaction/deposit               | POST   | Make a User's Wallet Deposit |\n| /v1/ewallet/transaction/withdrawal            | POST   | Make a User's Wallet Withdrawal |\n\n# Curl\n\n  ```sh\n  curl -X GET \\\n  http://localhost:3000/ping \\\n  -H 'x-api-key: 12345' \n  ```\n  ```sh\n  curl -X GET \\\n  http://localhost:3000/v1/ewallet/balance/10001 \\\n  -H 'x-api-key: 12345' \n  ```\n  ```sh\n  curl -X GET \\\n  http://localhost:3000/v1/ewallet/transaction/history/10001 \\\n  -H 'x-api-key: 12345' \n  ```\n  ```sh\n  curl -X POST \\\n  http://localhost:3000/v1/ewallet/transaction/transfer \\\n  -H 'x-api-key: 12345' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"from_account_number\":10001,\"to_account_number\":10002,\"amount\":8}'\n  ```\n  ```sh\n  curl -X POST \\\n  http://localhost:3000/v1/ewallet/transaction/deposit \\\n  -H 'x-api-key: 12345' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"to_account_number\":10001,\"amount\":8}'\n  ```\n ```sh\n  curl -X POST \\\n  http://localhost:3000/v1/ewallet/transaction/withdrawal \\\n  -H 'x-api-key: 12345' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"from_account_number\":10001,\"amount\":8}'\n  ```\n\n\n# Getting started\n\n## Run service dependencies\n\n```sh\nmake infra-up\n```\n\n## Run migration\nMigrates the database to the most recent version available.\n```\nmake migrate-up\n```\n\nUndo 1 step database migration.\n```\nmake migrate-down\n```\n\n## Run service application\n\n```sh\nmake serve\n```\n\n# Technology Used\n\n- Golang (with Fiber Web Framework)\n- MySQL\n\n# Unit Testing\n\nFor testability purpose, unit testings are provided.\nWe can use golang test package.\n\n```sh\n$ go test -v controller/*.go -race -coverprofile=coverage.out -covermode=atomic\n=== RUN   TestEWalletController_GetBalance\n--- PASS: TestEWalletController_GetBalance (0.02s)\n=== RUN   TestEWalletController_GetTransactionHistory\n--- PASS: TestEWalletController_GetTransactionHistory (0.01s)\n=== RUN   TestEWalletController_Transfer\n--- PASS: TestEWalletController_Transfer (0.02s)\n=== RUN   TestEWalletController_Deposit\n--- PASS: TestEWalletController_Deposit (0.01s)\n=== RUN   TestEWalletController_Withdrawal\n--- PASS: TestEWalletController_Withdrawal (0.02s)\n=== RUN   TestEWalletController_HealthCheck\n--- PASS: TestEWalletController_HealthCheck (0.00s)\nPASS\ncoverage: 81.1% of statements\nok      command-line-arguments  1.833s  coverage: 81.1% of statements\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauluswi%2Fbigben","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpauluswi%2Fbigben","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauluswi%2Fbigben/lists"}