Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samuelagm/walletservice
https://github.com/samuelagm/walletservice
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/samuelagm/walletservice
- Owner: samuelagm
- Created: 2020-11-10T16:48:58.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-09T16:37:37.000Z (almost 4 years ago)
- Last Synced: 2024-11-10T16:12:51.391Z (2 months ago)
- Language: C#
- Size: 5.21 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Wallet Service
![.NET Core](https://github.com/samuelagm/walletApi/workflows/.NET%20Core/badge.svg)
---
#### Getting Started
.Net Core version: 3.1
Install Deps: `dotnet restore`
Run: `dotnet run -p WalletApi`
Test: `dotnet test`
#### Brief
A simple wallet service that performs the following functions
1. Creating a wallet and yields an account number.
2. Depositing funds to wallet.
3. Withdrawing funds from wallet.
4. Returning wallet transaction.Deposit and Withdrawals (2&3) are handled by the `api/Wallet/CreateTransaction` endpoint. A Transaction with a negetive value is treated as a withdrawal and a positive value is a deposit. This was designed with event sourcing in mind where the state of an object can be recreated by replaying all events or in our case by summing up the values of the events.
Creating and Retrieving transactions are handled by the `api/Wallet` and `api/Wallet/GetTransactions` API endpoints respectively.
**Note**: The Wallet Id is a 10 digit number that could be used as the account number
#### Security
This API was designed to be run behind a gateway that would provide security and authentication, API security is a complex and specialised challenge that should be handled by a different service especially in a microservice environment. No security feature was implemented in this API.