This repository showcases how to build a Vertical Slice API that supports multiple SQL dialects using huma and sqlt.
// Run as local In-memory sqlite app and fill with fake data
go run ./cmd/sqlite/main.go --fill
// open: http://localhost:8080/docs
// Or run as postgres app with docker
docker run --name postgres -e POSTGRES_USER=user -e POSTGRES_PASSWORD=password -e POSTGRES_DB=db -p 5432:5432 -d postgres:16
go run ./cmd/postgres/main.go --fill
// open: http://localhost:8080/docs
// stop and remove container:
docker stop postgres && docker rm postgres
// create new fake data
go run ./cmd/fake-data/main.go
- https://www.jimmybogard.com/vertical-slice-architecture/
- https://www.milanjovanovic.tech/blog/vertical-slice-architecture
Minimize coupling between slices, and maximize coupling in a slice. (Jimmy Bogard)