bg
v1.0.0-rc19 — Release Candidate

Enterprise Go The Spring Way

SprinGo brings the power of Spring Boot patterns to Go. DI, JWT, Migrations, Event Bus, Scheduler & more — one framework, infinite speed.

terminal
$ springo new my-awesome-api
$ SPRINGO_PROFILES_ACTIVE=dev air
✅ SprinGo Engine active → http://localhost:8080
24+
Core Modules & Guides
v1.0 RC
Enterprise Ready
Go Native Speed
0
Config Hell
Core Features

Everything you need, nothing you don't

SprinGo packs 13+ enterprise modules into a clean Kernel architecture so you ship faster without sacrificing quality.

🚀

One-Line Bootstrap

Start your entire engine — Config, IoC, Router, Middleware, Swagger — with a single call to framework.Bootstrap().

app := framework.Bootstrap(framework.Options{
  Middlewares: []func(http.Handler)http.Handler{
    security.JwtAuthMiddleware,
  },
})
app.Start()
🔐

JWT Security (Kernel)

HS256 & RS256 support. JWKS dynamic key fetching for Keycloak/Auth0. Boundary-safe path whitelisting that prevents prefix-bypass attacks.

HS256 RS256 JWKS Keycloak Auth0 Role-Based

IoC & Auto-Wiring

Full dependency injection container. Components self-register via init() hooks. No reflection, no magic strings — pure Go speed.

func init() {
  ioc.GetContainer().RegisterBean(
    "UserService",
    func(db *gorm.DB) interface{} {
      return &UserService{}
    })
}
🗄️

Flyway-Style Migrations

Cluster-safe locking, SHA256 checksum validation, semantic version sorting, Rollback & Reset. Pure Go migrations with full programmatic control.

database.RegisterMigration(database.Migration{
  Name: "20260614_create_users",
  Up: func(db *gorm.DB) error {
    return db.AutoMigrate(&UserEntity{})
  },
})
🛡️

Database Auditing

Envers-style history for GORM entities. Add springo:"audited" and SprinGo creates mirror audit tables with user-aware revisions.

Automatic *_aud table mirroring
INSERT, UPDATE and DELETE callbacks
JWT/context user tracking
📢

Domain Event Bus

Transactional Outbox Pattern. Events only dispatch after a successful commit. Type-safe pub/sub, DLQ with configurable backoff, TraceID propagation.

Outbox persistence & cleanup
Dead Letter Queue (DLQ)
Worker pool (configurable concurrency)
Intelligent backoff retry
🕒

Scheduled Tasks

Cron, Fixed-Rate, and Startup Sequences. ShedLock-style distributed locks prevent parallel execution across cluster replicas.

scheduler.Register("DailyReport",
  func(ctx context.Context) error {
    return generateReport(ctx)
  })
💾

Smart Cache (@Cacheable)

Multi-provider (Memory, Redis). Granular TTL per region. Cache-Aside pattern with auto Get-or-Compute. Fail-safe fallback.

return cache.Execute(ctx, "users", id,
  func() (User, error) {
    // cache miss → fetch from DB
    return s.repo.FindByID(id)
  })
📊

Enterprise Actuator

Opt-in health endpoint. Auto-discovers all DB connections. GORM pool stats, disk monitoring, custom indicators. Priority-based status (DOWN > DEGRADED > UP).

Smart aggregation (DOWN > DEGRADED > UP)
GORM pool stats
Custom health indicators
🧪

Testing Framework

Auto-Rollback per test. Fluent HTTP client. IoC mocking. Full DB isolation without TRUNCATE. Spring Boot Test-style setup.

app := test.NewSprinGoTestContext(t)
defer app.TearDown()
app.Client.Post("/api/v1/users").
  WithJSON(payload).
  Execute().
  ExpectStatus(201)
🌐

Internationalization (i18n)

Lightweight properties-based translations matching Spring Boot's MessageSource. Automatic locale resolution from headers and query parameters.

Hierarchical YAML properties loading
Accept-Language & ?lang= query param
Automatic validation error translation
🔍

Distributed Tracing

W3C compliance and async Zipkin exporter for enterprise-grade observability and tracing.

W3C traceparent context propagation
Correlated trace & span logging
Non-blocking background Zipkin exporter
🛡️

Corporate Security

Centralized LDAP/Active Directory authentication, CSRF double submit cookie protection, and OWASP security headers.

LdapAuthenticationProvider integration
Double submit cookie CSRF filter
Automatic OWASP and HSTS headers
📊

Actuator UI Dashboard

Embedded glassmorphic real-time administration panel with live logs levels toggling, goroutines thread dumps, and DLQ event retry control.

Embedded UI (go:embed self-contained)
Dynamic logging levels and goroutine dump
DLQ retry re-dispatch & purge controls
Quick Start

From zero to production-ready

Up and running in under 5 minutes.

1

Generate your project

Use the SprinGo CLI to scaffold a complete hexagonal architecture project in seconds.

2

Configure your application

Edit resources/application.yaml. Convention over configuration — everything has sensible defaults.

3

Run with hot-reload

Air watches for changes and auto-regenerates Swagger docs on every build.

Terminal — bash
springo@mac:~$
Architecture

Hexagonal Architecture — Professional Structure

Flattened Hexagonal Architecture with a dedicated Kernel. Your business logic stays clean, testable, and decoupled.

project structure
.
├── cmd/
│   └── app/main.go          # Bootstrapper
├── internal/                # 🧠 Hexagonal Core
│   ├── domain/
│   │   ├── model/               # Domain Entities
│   │   └── errors/              # Sentinels (ErrNotFound)
│   ├── application/
│   │   ├── port/input/          # Inbound Ports (Use Cases)
│   │   ├── port/output/         # Outbound Ports (Repositories)
│   │   └── service/             # Domain Orchestration
│   └── infrastructure/          # Adapters
│       ├── config/              # YAML bindings & Lifecycle
│       ├── dtos/request/        # Validated Request DTOs
│       ├── dtos/response/       # Response DTOs
│       ├── input/rest/          # Chi Controllers (Dispatch)
│       └── output/persistence/  # GORM Adapters
└── resources/
    ├── application.yaml     # Multi-profile config
    └── db/migration/        # AutoMigrate / SQL scripts

Architectural Rules

1
DTOs at the Boundary
The controller receives a RequestDTO. The response always returns a ResponseDTO wrapped in ApiResponse.
2
DTO → Domain in Controller
The controller converts DTO to Domain before calling the UseCase. A controller never sends a DTO to the UseCase.
3
UseCase Returns Domain
Use cases always return the same Domain. The controller uses a Mapper to convert Domain → ResponseDTO.
4
ApiResponse at the Exit
The ResponseDTO is wrapped in ApiResponse.OK(dto) before returning to the client.
Documentation

Deep dive into every module

JWT Security — Kernel Managed

No middleware logic in your application. Everything is configured from YAML. Supports HS256 self-signed tokens and RS256 via JWKS (Keycloak, Auth0) or static PEM.

Boundary-safe whitelisting: /swagger matches /swagger/index.html but NOT /swagger-admin
Context injection: Valid tokens inject User and Roles into request context
Role-based authorization: Inline in web.Dispatch(handler, "ADMIN")
r.Get("/{id}", web.Dispatch(c.get))
r.Post("/", web.Dispatch(c.create, "ADMIN"))
r.Put("/{id}", web.Dispatch(c.update, "ADMIN", "MANAGER"))
HS256 — Self-Signed
security:
  jwt:
    algorithm: "HS256"
    secret: "your-super-secret-32-chars"
    expiration: 60
    public-paths:
      - "/api/v1/auth/login"
      - "/swagger"
RS256 — Keycloak / Auth0
security:
  jwt:
    algorithm: "RS256"
    # Keycloak JWKS endpoint
    jwks-url: "https://<host>/realms/
<realm>/protocol/openid-connect/certs"
    # Auth0: "https://<tenant>.auth0.com/
    #  .well-known/jwks.json"
    expiration: 60
Interactive Tool

Configuration Generator

Customize and generate your resources/application.yaml file instantly.

resources/application.yaml

                        
Comparison

SprinGo vs Spring Boot

Same enterprise patterns, Go's native speed. No JVM overhead.

Feature
🍃Spring Boot
🚀SprinGo
Dependency Injection @Bean, @Autowired init() + RegisterBean
Transactions @Transactional database.Transactional()
DB Migrations Flyway / Liquibase Built-in + SHA256
JWT Security Spring Security YAML config only
Event Bus ApplicationEvents Type-safe + Outbox + DLQ
Database Auditing Hibernate Envers springo:"audited" + *_aud
Startup Time ~3-8 seconds <100ms
Memory Usage ~200-500 MB ~10-30 MB
Native Binary No (JVM required) ✓ Single binary
Docker Image ~200 MB+ ~15 MB (scratch)
Release Candidate

Ready to build enterprise Go APIs?

Join the beta. Get the power of Spring Boot in Go, without the JVM overhead.