All Projects β†’ GSabadini β†’ Go Bank Transfer

GSabadini / Go Bank Transfer

Licence: mit
Simple API for banking routines using a Clean Architecture in Golang. πŸ’³ πŸ’° πŸ’Έ

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Go Bank Transfer

Go Clean Architecture
πŸ‘¨β€πŸ’» REST API example, built by following Uncle Bob’s clean architecture principles
Stars: ✭ 133 (+8.13%)
Mutual labels:  mongodb, architecture, clean-architecture, clean-code
Architecture
.NET 6, ASP.NET Core 6, Entity Framework Core 6, C# 10, Angular 13, Clean Code, SOLID, DDD.
Stars: ✭ 2,285 (+1757.72%)
Mutual labels:  architecture, clean-architecture, clean-code
Cleanarchitecture.workerservice
A solution template using Clean Architecture for building a .NET Core Worker Service.
Stars: ✭ 142 (+15.45%)
Mutual labels:  architecture, clean-architecture, clean-code
Android Kotlin Clean Architecture
Android Sample Clean Architecture App written in Kotlin
Stars: ✭ 1,562 (+1169.92%)
Mutual labels:  architecture, clean-architecture, clean-code
Android Modular Architecture
πŸ“š Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.
Stars: ✭ 2,048 (+1565.04%)
Mutual labels:  architecture, clean-architecture, clean-code
Modular Monolith With Ddd
Full Modular Monolith application with Domain-Driven Design approach.
Stars: ✭ 6,210 (+4948.78%)
Mutual labels:  architecture, clean-architecture, clean-code
Dev Stuff
😎 Programming stuff for everyone. Collection of articles, videos about architecture, Domain Driven Design, microservices, testing etc.
Stars: ✭ 105 (-14.63%)
Mutual labels:  architecture, clean-architecture, clean-code
Dotnet New Caju
Learn Clean Architecture with .NET Core 3.0 πŸ”₯
Stars: ✭ 228 (+85.37%)
Mutual labels:  mongodb, clean-architecture, clean-code
Cleanaspnetcorewebapi
Starter project for creating APIs built on ASP.NET Core using clean architecture.
Stars: ✭ 279 (+126.83%)
Mutual labels:  architecture, clean-architecture, clean-code
iOS-Clean-Architecture-Example
An iOS app designed using clean architecture and MVVM.
Stars: ✭ 50 (-59.35%)
Mutual labels:  clean-code, architecture, clean-architecture
Aspnet Core Clean Arch
It is a clean architecture project template which is based on hexagonal-architecture principles built with .Net core.
Stars: ✭ 60 (-51.22%)
Mutual labels:  mongodb, clean-architecture, clean-code
Clean Ts Api
API em NodeJs usando Typescript, TDD, Clean Architecture, Design Patterns e SOLID principles
Stars: ✭ 619 (+403.25%)
Mutual labels:  mongodb, clean-architecture, clean-code
Event Sourcing Castanha
An Event Sourcing service template with DDD, TDD and SOLID. It has High Cohesion and Loose Coupling, it's a good start for your next Microservice application.
Stars: ✭ 68 (-44.72%)
Mutual labels:  mongodb, clean-architecture, clean-code
Ios Architectures
Sample app for iOS architectures
Stars: ✭ 90 (-26.83%)
Mutual labels:  architecture, clean-architecture
Android Base
Android Clean Architecture MVP RESTful client template app
Stars: ✭ 87 (-29.27%)
Mutual labels:  clean-architecture, clean-code
Study Path
An organized learning path about Clean Code, Test-Driven Development, Legacy Code, Refactoring, Domain-Driven Design and Microservice Architecture
Stars: ✭ 1,357 (+1003.25%)
Mutual labels:  clean-architecture, clean-code
Clean Architecture
A (work-in-progress) guide to the methodology behind Made Tech Flavoured Clean Architecture
Stars: ✭ 101 (-17.89%)
Mutual labels:  clean-architecture, clean-code
Sample Dotnet Core Cqrs Api
Sample .NET Core REST API CQRS implementation with raw SQL and DDD using Clean Architecture.
Stars: ✭ 1,273 (+934.96%)
Mutual labels:  clean-architecture, clean-code
Adminer Custom
Customizations for Adminer, the best database management tool written in PHP.
Stars: ✭ 99 (-19.51%)
Mutual labels:  mongodb, postgresql
Spring Boot 2.x Examples
Spring Boot 2.x code examples
Stars: ✭ 104 (-15.45%)
Mutual labels:  mongodb, postgresql

Welcome to Go Bank Transfer 🏦

Version Build License: MIT Build

  • Go Bank Transfer is a simple API for some banking routines, such as creating accounts, listing accounts, listing balance for a specific account, transfers between accounts and listing transfers.

Architecture

Clean Architecture

Example create account use case

Clean Architecture

Requirements/dependencies

  • Docker
  • Docker-compose

Getting Started

  • Environment variables
make init
  • Starting API
make up
  • Run tests in container
make test
  • Run tests local (it is necessary to have golang installed)
make test-local
  • Run coverage report
make coverage-report-browser
make coverage-report-func
  • View logs
make logs
  • Enter in container
make enter-container

API Request

Endpoint HTTP Method Description
/v1/accounts POST Create accounts
/v1/accounts GET List accounts
/v1/accounts/{{account_id}}/balance GET Find balance account
/v1/transfers POST Create transfer
/v1/transfers GET List transfers
/v1/health GET Health check

Test endpoints API using curl

  • Creating new account

Request

curl -i --request POST 'http://localhost:3001/v1/accounts' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Test",
    "cpf": "070.910.584-24",
    "balance": 100
}'

Response

{
    "id":"5cf59c6c-0047-4b13-a118-65878313e329",
    "name":"Test",
    "cpf":"070.910.584-24",
    "balance":1,
    "created_at":"2020-11-02T14:50:46Z"
}
  • Listing accounts

Request

curl -i --request GET 'http://localhost:3001/v1/accounts'

Response

[
    {
        "id": "5cf59c6c-0047-4b13-a118-65878313e329",
        "name": "Test",
        "cpf": "070.910.584-24",
        "balance": 1,
        "created_at": "2020-11-02T14:50:46Z"
    }
]
  • Fetching account balance

Request

curl -i --request GET 'http://localhost:3001/v1/accounts/{{account_id}}/balance'

Response

{
    "balance": 1
}
  • Creating new transfer

Request

curl -i --request POST 'http://localhost:3001/v1/transfers' \
--header 'Content-Type: application/json' \
--data-raw '{
	"account_origin_id": "{{account_id}}",
	"account_destination_id": "{{account_id}}",
	"amount": 100
}'

Response

{
    "id": "b51cd6c7-a55c-491e-9140-91903fe66fa9",
    "account_origin_id": "{{account_id}}",
    "account_destination_id": "{{account_id}}",
    "amount": 1,
    "created_at": "2020-11-02T14:57:35Z"
}
  • Listing transfers

Request

curl -i --request GET 'http://localhost:3001/v1/transfers'

Response

[
    {
        "id": "b51cd6c7-a55c-491e-9140-91903fe66fa9",
        "account_origin_id": "{{account_id}}",
        "account_destination_id": "{{account_id}}",
        "amount": 1,
        "created_at": "2020-11-02T14:57:35Z"
    }
]

Git workflow

  • Gitflow

Code status

  • Development

Author

License

Copyright Β© 2020 GSabadini. This project is MIT licensed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].