A robust backend service for a banking ledger, built with Go and PostgreSQL.
- Language: Go 1.25.6
- Database: PostgreSQL (via Docker)
- DB Driver & Queries:
pgx/v5+sqlc - Configuration: Viper
- CI/CD: GitHub Actions
- Go installed.
- Docker installed and running.
Makeinstalled (optional, but recommended for running commands).
This project uses Viper for environment configuration. You must set up your local environment file before running the server or tests.
-
Copy the example config file: cp app.env.example app.env Open app.env and update the DB_SOURCE.
-
Database Setup Start a local Postgres instance using Docker:
docker run --name postgres18 -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=secret -d postgres:18-alpine
docker exec -it postgres18 createdb --username=root --owner=root simple_bank
- Running the Code To run the unit tests:
go test -v ./... To start the development server:
go run main.go