Skip to content

Repository files navigation

gokit

A Go RESTful API boilerplate built on stdlib + SQLite + sqlc with full observability (OpenTelemetry, Tempo, Loki, Grafana).

Quick Start

# Install dependencies
go mod download

# Run DB migrations
make migrate

# Start hot-reload dev server
make dev

The API is available at http://localhost:4040/api. Swagger UI at http://localhost:4040/swagger/.

Stack

Layer Technology
HTTP Echo v5
Database SQLite (modernc — pure Go, no CGO)
SQL codegen sqlc
Validation go-playground/validator v10
API docs swaggo/swag (OpenAPI)
Tracing OpenTelemetry (OTLP HTTP)
Metrics Prometheus
Logs slog + Loki

Development Commands

make dev        # hot-reload server (air)
make run        # run without hot-reload
make migrate    # apply DB migrations
make check      # fmt + vet + lint + test (full quality gate)
make sqlc       # regenerate sqlc Go code
make swagger    # regenerate OpenAPI docs
make build      # build binaries
make obs/up     # start observability stack (Grafana, Tempo, Loki, Prometheus)
make obs/down   # stop observability stack

Project Documentation

Full architecture, patterns, conventions, and developer guide are in CLAUDE.md, including:

  • Directory structure and module layout
  • Modular monolith architecture
  • Key coding patterns (handler pipeline, error handling, validation, DI)
  • HTTP API reference
  • How to add a new domain (/new-domain skill)
  • Observability stack setup
  • SQLite configuration notes

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages