The Bank Service API is a backend web service for a bank, providing APIs for the frontend to perform various banking operations. This project is developed using Golang and incorporates several technologies and tools such as Docker, Kubernetes, Redis, AWS, PostgreSQL, unit testing, continuous integration, continuous deployment, gRPC, and Gin.
- The Simple Bank Service offers the following features through its APIs:
- Create and manage bank accounts, including owner's name, balance, and currency.
- Record all balance changes to each account by creating account entry records.
- Perform money transfers between two accounts, ensuring atomicity and consistency.
To set up the development environment locally, follow these steps:
- Docker Desktop
- TablePlus
- Golang
- Golang Migrate:
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
- DB Docs:
npm install -g dbdocs
- DBML CLI:
npm install -g @dbml/cli
- Sqlc:
docker pull kjconroy/sqlc
- Gomock:
go install github.com/golang/mock/[email protected]
- Start the PostgreSQL container:
make postgres
- Create the simple_bank database:
make createdb
- Run database migrations to set up the schema:
Up all versions: `make migrateup`
Down all versions: `make migratedown`
- Generate SQL CRUD with sqlc:
make sqlc