https://github.com/danilobandeira29/ms-wallet
microservice application to users create account and transfer money
https://github.com/danilobandeira29/ms-wallet
docker docker-compose docker-image go golang kafka microservices
Last synced: 2 months ago
JSON representation
microservice application to users create account and transfer money
- Host: GitHub
- URL: https://github.com/danilobandeira29/ms-wallet
- Owner: danilobandeira29
- Created: 2024-10-10T21:25:16.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-16T17:08:43.000Z (over 1 year ago)
- Last Synced: 2024-10-19T10:50:31.074Z (over 1 year ago)
- Topics: docker, docker-compose, docker-image, go, golang, kafka, microservices
- Language: Go
- Homepage:
- Size: 151 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# ms-wallet

to run the project, start api
```shell
$ docker compose pull
$ docker compose build --no-cache
$ docker compose up
```
[microservice balance](https://github.com/danilobandeira29/ms-wallet-balance)
## routes
available in `./api/client.http`
### ports
- `8080` ms-wallet
- `3003` balance
```http request
#### Microservice wallet
POST http://localhost:8080/clients HTTP/1.1
Content-Type: application/json
{
"name": "Ana Banana",
"email": "ana@banana.com"
}
####
POST http://localhost:8080/accounts HTTP/1.1
Content-Type: application/json
{
"client_id": "5876bd47-1165-45a6-a9c8-f41a992f81c7"
}
####
POST http://localhost:8080/transactions HTTP/1.1
Content-Type: application/json
{
"account_id_to": "0502ee10-1536-435e-99c0-123c265e96c3",
"account_id_from": "a42582b5-9a81-4a34-a7f9-573ed825b189",
"amount": 10
}
#### Microservice balance
# verify balance "account to" in microservice balance
GET http://localhost:3003/balances/0502ee10-1536-435e-99c0-123c265e96c3 HTTP/1.1
####
# verify balance "account from" in microservice balance
GET http://localhost:3003/balances/a42582b5-9a81-4a34-a7f9-573ed825b189 HTTP/1.1
```
# TODO
- [ ] Create migration files
- [ ] Create seed files
- [ ] Uses func init to start connection with external services(kafka, databsase)