{"id":22264242,"url":"https://github.com/pauluswi/driftmark","last_synced_at":"2026-05-19T07:32:02.461Z","repository":{"id":266106530,"uuid":"893001050","full_name":"pauluswi/driftmark","owner":"pauluswi","description":"A microservice that implement a real-time transaction processing system using gRPC that streams transactions between a client and a server","archived":false,"fork":false,"pushed_at":"2024-12-15T14:30:22.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T14:14:12.361Z","etag":null,"topics":["golang","grpc","microservice"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-23T09:13:03.000Z","updated_at":"2024-12-15T14:33:49.000Z","dependencies_parsed_at":"2024-12-02T16:36:08.275Z","dependency_job_id":"c2ba2cb5-cbc6-42aa-bf49-e308a367b6d8","html_url":"https://github.com/pauluswi/driftmark","commit_stats":null,"previous_names":["pauluswi/driftmark"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pauluswi/driftmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauluswi%2Fdriftmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauluswi%2Fdriftmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauluswi%2Fdriftmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauluswi%2Fdriftmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pauluswi","download_url":"https://codeload.github.com/pauluswi/driftmark/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauluswi%2Fdriftmark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000700,"owners_count":26082819,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"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":["golang","grpc","microservice"],"created_at":"2024-12-03T10:08:16.210Z","updated_at":"2025-10-08T20:08:32.661Z","avatar_url":"https://github.com/pauluswi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# driftmark - Fund Transfer Service (gRPC)\n\n![Go Version](https://img.shields.io/badge/Go-1.23-blue)\n[![Build Server](https://github.com/pauluswi/driftmark/actions/workflows/go.yml/badge.svg)](https://github.com/pauluswi/driftmark/actions/workflows/go.yml)\n![gRPC](https://img.shields.io/badge/gRPC-Enabled-blueviolet?logo=grpc\u0026logoColor=white)\n\n\nA **gRPC-based Fund Transfer Service** implemented in Go for real-time transaction processing between accounts. This project demonstrates structured logging with **Zap**, robust error handling with gRPC status codes, and unit tests for ensuring reliability.\n\n---\n\n## Features\n\n- **Real-Time Fund Transfer**: Process fund transfers between accounts with transaction details.\n- **Structured Logging**: Logs using [Zap](https://github.com/uber-go/zap) for better observability.\n- **Error Handling**: Implements gRPC error codes for precise error reporting.\n- **Proto Definitions**: Based on `Protocol Buffers` for defining the service and messages.\n\n---\n\n## Project Structure\n\n```python\n.\n├── proto\n│   └── fund_transfer.proto    # Protocol Buffer definitions for the Fund Transfer Service\n├── server\n│   ├── main.go                # Server implementation for the gRPC service\n├── client\n│   └── main.go                # Client implementation to test the service\n├── logs\n│   └── logs.json              # (Optional) Sample structured logs generated by the service\n├── go.mod                     # Go module dependencies\n├── go.sum                     # Go module checksums\n├── README.md                  # Documentation for the project\n└── LICENSE                    # License for the project\n```\n\n\n---\n\n## Getting Started\n\n### Prerequisites\n\n- [Go](https://golang.org/dl/) (1.21 or later)\n- [Protocol Buffers Compiler](https://grpc.io/docs/protoc-installation/)\n- Install `protoc-gen-go` and `protoc-gen-go-grpc`:\n  ```bash\n  go install google.golang.org/protobuf/cmd/protoc-gen-go@latest\n  go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest\n  ```\n  \n### Installation\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/your-username/golang-grpc-portfolio.git\n   cd golang-grpc-portfolio\n   ```\n2. **Generate the gRPC code**:\n   ```bash\n   protoc --go_out=. --go-grpc_out=. proto/fund_transfer.proto\n   ```\n3. **Install dependencies**:\n   ```bash\n   go mod tidy\n   ```\n\n### Running the Application\n1. **Start the Server**:\n   ```bash\n   go run server/main.go\n   ```\n2. **Run the Client**:\n   ```bash\n   go run client/main.go\n   ```\n\n## API Definition\nThe Fund Transfer Service is defined in proto/fund_transfer.proto:\n\n### **Service**: FundTransferService\n#### **RPC Method**: ProcessFundTransfer\n\n- **Request**:\n  - ***transaction_id***: Unique ID for the transaction.\n  - ***source_account***: Source account number.\n  - ***destination_account***: Destination account number.\n  - ***amount***: Amount to transfer.\n  - ***currency***: Currency of the transaction (e.g., USD).\n  - ***transfer_type***: Type of transfer (debit or credit).\n- **Response**:\n  - ***transaction_id***: Same as the request ID.\n  - ***status***: SUCCESS or FAILED.\n  - ***message***: Additional details about the transfer.\n\n#### **Sample Request/Response**:\n\n- **Request**:\n   ```json\n      {\n         \"transaction_id\": \"TXN12345\",\n         \"source_account\": \"1234567890\",\n         \"destination_account\": \"9876543210\",\n         \"amount\": 100.0,\n         \"currency\": \"USD\",\n         \"transfer_type\": \"debit\"\n      }\n   ```\n\n- **Response**:\n   ```json\n      {\n         \"transaction_id\": \"TXN12345\",\n         \"status\": \"SUCCESS\",\n         \"message\": \"Fund transfer processed successfully\"\n      }\n   ```\n\n## Logging\nStructured logs are implemented using Zap and stored in the logs/log.json file. Logs include transaction details, statuses, and errors.\n\nExample logs/log.json:\n```json\n{\"level\":\"info\",\"msg\":\"Processing fund transfer\",\"transaction_id\":\"TXN12345\",\"source_account\":\"1234567890\",\"destination_account\":\"9876543210\",\"amount\":100,\"currency\":\"USD\",\"transfer_type\":\"debit\"}\n{\"level\":\"info\",\"msg\":\"Fund transfer successful\",\"transaction_id\":\"TXN12345\",\"source_account\":\"1234567890\",\"destination_account\":\"9876543210\",\"amount\":100}\n{\"level\":\"info\",\"msg\":\"Received response\",\"transaction_id\":\"TXN12345\",\"status\":\"SUCCESS\",\"message\":\"Fund transfer processed successfully\"}\n      \n```\n\n## License\nThis project is licensed under the Apache License. \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauluswi%2Fdriftmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpauluswi%2Fdriftmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauluswi%2Fdriftmark/lists"}