Batteries included
Background jobs with retries (Redis or inline), a cron scheduler, cache,
typed events, SMTP mail with a dev log driver, and local/S3 file storage —
all opt-in, all configured through .env.


gin-kit is an opinionated layer around Gin. Everything included, nothing hidden: a new service gets everything a production service needs on day one, while your handlers, domains, services, and repositories stay in your repository.
Batteries included
Background jobs with retries (Redis or inline), a cron scheduler, cache,
typed events, SMTP mail with a dev log driver, and local/S3 file storage —
all opt-in, all configured through .env.
Explicit architecture
Handler → service → repository with constructor wiring. No dependency containers, no reflection magic, and raw Gin is always one call away.
Your database, either ORM
GORM or sqlx across SQLite, PostgreSQL, MySQL, and MariaDB — with goose migrations, seeders, model factories, and an allowlist-based query builder for filtering, sorting, and pagination.
Secure by default
A complete auth vertical (Argon2id passwords, rotating refresh tokens), cookie sessions with CSRF protection, security headers, spoof-resistant client IPs, rate limiting, and body limits.
Generators that write real code
generate resource scaffolds a compiling vertical slice — model,
repository, service, handler, tests, factory, and migration — then prints
the exact wiring snippet. Your files are never edited.
Tested and documented
A test harness for unit, integration (in-memory SQLite), and Playwright
browser tests — plus OpenAPI docs generated automatically at /docs,
with zero annotations.
go install github.com/Alfian57/gin-kit/cmd/gin-kit@latest
gin-kit new orders-apicd orders-apigin-kit generate resource Ticket --fields "title:string,done:bool,price:float64"gin-kit db up && gin-kit db seedgin-kit run # Swagger UI at http://localhost:8080/docsRuntime
A thin application that imports gin-kit’s versioned runtime. Generic lifecycle and HTTP policy stay out of your repository; upgrades are a version bump.
Standalone
A standalone, source-visible project for teams that want every infrastructure detail in their own module — no versioned runtime dependency.
Both project types are generated by the same CLI and keep business code yours.