Skip to content

Changelog ​


v2.x (Latest Template & CLI) ​

Security Hardening (d666864) ​

  • Auth & Startup: Constant-time X-App-Key comparison (crypto/subtle), fail-closed ValidateForServe(), and APP_DEBUG=true gating for /api/docs*.
  • CORS: CORSWithConfig with strict origin matching; wildcard * never emits Access-Control-Allow-Credentials.
  • HTTP Hardening: SetTrustedProxies(nil) default (TRUSTED_PROXIES), ReadHeaderTimeout/ReadTimeout/WriteTimeout/IdleTimeout defaults, MaxHeaderBytes (1 MiB), TLS MinVersion: tls.VersionTLS12, RequestID() middleware, and GET /ready readiness probe wired to db.Ping.
  • Rate Limiter: Replaced unbounded global map with bounded LimiterStore (10,000-client cap, 3m idle TTL, Close() lifecycle, canonical 429 JSON).
  • gRPC: Added GRPC_TLS_ENABLED, full stream interceptors alongside unary interceptors, port-stripped peerIP() for per-IP rate limiting, and grpc_health_v1.
  • Database: Injection-safe DSN formatting (mysqldriver.Config.FormatDSN, url.URL), SQLite WAL/FK/busy_timeout pragmas, DB_SSL_MODE, connection pooling, and 5s startup ping.
  • Clients: Non-mutating HttpClient.Do() request cloning; GrpcClient migrated to grpc.NewClient with overridable TLS defaults.
  • Docker: Multi-stage golang:1.25-alpine + alpine:3.21, -tags prod (excludes loader), non-root appuser, HEALTHCHECK, serve --no-tui.

Architecture, TUI & Seeders ​

  • Pure-Go DI Container (core/di): Modular di.Module, Bind[I] / BindBoth[I], AutoCollect[I], CollectModels, 3-color DFS cycle detection, OnStart/OnStop LIFO lifecycle hooks, and boot.New / boot.NewWithConfig.
  • Interactive TUI Dashboard & Pretty Logger: Bubble Tea split-panel server dashboard (--no-tui to disable), zerolog prettyWriter, Gin route redirection, and LOG_COLOR.
  • Seeder Framework: database.Seeder registry, transactional database.Call, DatabaseSeeder, TodoSeeder, and CLI db:seed, gen:seeder, rem:seeder.
  • CLI (goforge-cli v2.0.2+): Added module.go + DI event wiring in gen:service / gen:event / gen:proto, gen:config, rem:grpc, and seeder commands.

v0.1.0 ​

  • Initial GoForge CLI (v0.1.0) and template release: Gin HTTP server, gRPC server, Atlas + GORM + SQLC database layer, generic EventBus, AppError, validator/v10, and initial Todo service.

Released under the Apache-2.0 License.