Skip to content
CI Go Stars codecov

Build services with clear boundaries

An opinionated, runnable Go backend skeleton for services that need explicit layering, independently deployable processes, and a delivery path verifiable from local development through CI.


Why GinBlade

Separate processes

API, Asynq worker, and migration are independent binaries. Deploy, scale, and release each on its own cadence.

Explicit layering

Application flow is handler -> service -> repository. Dependencies point inward; outer layers depend on interfaces they call.

Hand-written DI

No DI framework. Resources assembled in bootstrap, passed down explicitly as structs. The dependency graph is visible in one place.

Optional infrastructure

Redis and JWT are optional. When not configured, routes are skipped, health reports not_configured, the rest keeps working.

Verified delivery

Unit, race, integration, lint, and container smoke tests in CI. Multi-stage non-root image + complete Compose stack.

Framework-swappable

Only the HTTP shell depends on Gin. Everything below handler is plain Go — swap the router without touching business logic.


Start your first feature

From cloning the repo to writing your first route, service method, model, and cross-table transaction — the on-ramp walks through each layer with real code from the skeleton.

Read the Quick Start guide →

Project layout

Path Purpose
cmd/api HTTP API process
cmd/worker Asynq worker process
cmd/migrate GORM migration entrypoint
config Environment loading and typed configuration
internal/bootstrap Process-level resource initialization
internal Application wiring, routes, middleware, layers
pkg Reusable infrastructure helpers (JWT, cache, log, …)

Dive deeper