- Create and manage bank accounts with owner's name, balance, and currency.
- Record all balance changes, generating entry records for each transaction.
- Perform secure money transfers between two accounts, ensuring transactional consistency.
Designed a robust database schema. Implemented SQL code generation for seamless database interaction.
Executed database migration using Golang, ensuring consistency and reliability. Conducted extensive unit tests for database CRUD operations.
Constructed a set of RESTful HTTP APIs using Gin. Covered various aspects, including config loading, unit testing, error handling, and user authentication with JWT and PASETO tokens.
Built a minimal Golang Docker image and deployed the service to a production Kubernetes cluster on AWS. Set up HTTPS, automatic TLS certificate renewal with Let's Encrypt, and domain registration with Route53.
Implemented advanced features such as managing user sessions, gRPC APIs, and Swagger documentation (Not finished yet) Explored partial record updates, structured logging, and role-based access control (RBAC).
Integrated background workers with Redis for asynchronous processing. Covered email integration and unit testing for asynchronous tasks.
Covered topics like updating dependency packages, improving refresh token security, and implementing graceful server shutdown.
-
brew install golang-migrate
-
npm install -g dbdocs dbdocs login
-
npm install -g @dbml/cli dbml2sql --version
-
brew install sqlc
-
go install github.com/golang/mock/[email protected]
-
Create the bank-network
make network
-
Start postgres container:
make postgres
-
Create simple_bank database:
make createdb
-
Run db migration up all versions:
make migrateup
-
Run db migration up 1 version:
make migrateup1
-
Run db migration down all versions:
make migratedown
-
Run db migration down 1 version:
make migratedown1
-
Generate DB documentation:
make db_docs
-
Access the DB documentation at this address. Password:
secret
-
Generate schema SQL file with DBML:
make db_schema
-
Generate SQL CRUD with sqlc:
make sqlc
-
Generate DB mock with gomock:
make mock
-
Create a new db migration:
make new_migration name=<migration_name>
-
Run server:
make server
-
Run test:
make test
-
Install nginx ingress controller:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.48.1/deploy/static/provider/aws/deploy.yaml
-
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.4.0/cert-manager.yaml