Lokstra Roadmap
The future of Lokstra - features, improvements, and vision
Last Updated: October 2025
๐ฏ Current Status
Version: 2.x (dev2 branch)
Status: Active Development
Focus: Core stabilization + Essential features
Whatโs Working Now โ
- โ 29 handler forms
- โ Service as router (convention-based routing)
- โ Multi-deployment (monolith โ microservices)
- โ Built-in lazy dependency injection
- โ YAML configuration with environment variables
- โ Middleware system (direct + by-name)
- โ Request/response helpers
- โ Route groups and scopes
- โ Path parameter extraction
- โ Query parameter binding
- โ JSON request/response
- โ FastHTTP engine support
๐ Next Release (v2.1)
Target: Q4 2025
Theme: Developer Experience + Production Essentials
1. ๐จ HTMX Support
Goal: Make building web applications as easy as REST APIs
Features
- Template rendering integration
html/templatesupporttemplsupport (type-safe templates)- Auto content-type detection
- HTMX helpers
- Response headers (HX-Trigger, HX-Redirect, etc.)
- Request detection (HX-Request, HX-Target)
- Partial rendering utilities
- Form handling
- Form binding to structs
- Validation error rendering
- CSRF protection
- Examples
- Todo app with HTMX
- Dashboard with real-time updates
- Form validation patterns
API Design
// Handler returns templ component
r.GET("/users", func() templ.Component {
users := userService.GetAll()
return views.UserList(users)
})
// Partial update
r.POST("/users", func(req *CreateUserReq) templ.Component {
user := userService.Create(req)
return views.UserRow(user) // Returns single row
})
// HTMX helpers
r.POST("/toggle", func(ctx *request.Context) (*response.Response, error) {
return response.Success(data).
WithHeader("HX-Trigger", "itemToggled").
WithHeader("HX-Redirect", "/dashboard"), nil
})
2. ๐ ๏ธ CLI Tools
Goal: Speed up development workflow
Features
- Project scaffolding
lokstra new my-api --template=rest-api lokstra new my-web --template=htmx-app lokstra new my-mono --template=monolith - Code generation
lokstra generate service user lokstra generate router api lokstra generate middleware auth lokstra generate handler users/create - Development server
lokstra dev --port 3000 --hot-reload - Migration management
lokstra migrate create add_users_table lokstra migrate up lokstra migrate down lokstra migrate status - Testing utilities
lokstra test --coverage lokstra test --watch
Templates
- rest-api: Classic REST API with database
- htmx-app: Web app with HTMX + templ
- monolith: Single deployment with multiple services
- microservices: Multi-service deployment ready
- minimal: Bare bones setup
3. ๐ฆ Standard Middleware Library
Goal: Production-ready middleware out of the box
Authentication & Authorization
// JWT Authentication
r.Use(middleware.JWT(middleware.JWTConfig{
Secret: "your-secret",
SigningAlg: "HS256",
Header: "Authorization",
Prefix: "Bearer ",
}))
// OAuth2 Integration
r.Use(middleware.OAuth2(middleware.OAuth2Config{
Provider: "google",
ClientID: os.Getenv("OAUTH_CLIENT_ID"),
ClientSecret: os.Getenv("OAUTH_CLIENT_SECRET"),
RedirectURL: "http://localhost:8080/callback",
}))
// Basic Auth (simple use cases)
r.Use(middleware.BasicAuth(map[string]string{
"admin": "hashed-password",
}))
// API Key
r.Use(middleware.APIKey(middleware.APIKeyConfig{
Header: "X-API-Key",
Validator: func(key string) bool {
return db.ValidateAPIKey(key)
},
}))
Metrics & Monitoring
// Prometheus metrics
r.Use(middleware.Prometheus(middleware.PrometheusConfig{
Subsystem: "api",
Path: "/metrics",
}))
// OpenTelemetry tracing
r.Use(middleware.OpenTelemetry(middleware.OTelConfig{
ServiceName: "my-api",
Endpoint: "otel-collector:4317",
}))
// Custom metrics
r.Use(middleware.Metrics(func(ctx *request.Context, duration time.Duration) {
metrics.RecordRequest(
ctx.R.Method,
ctx.R.URL.Path,
ctx.ResponseStatus,
duration,
)
}))
Rate Limiting
// In-memory rate limiter
r.Use(middleware.RateLimit(middleware.RateLimitConfig{
Requests: 100,
Window: time.Minute,
KeyFunc: func(ctx *request.Context) string {
return ctx.R.RemoteAddr // By IP
},
}))
// Redis-backed rate limiter
r.Use(middleware.RateLimitRedis(middleware.RateLimitRedisConfig{
Redis: redisClient,
Requests: 1000,
Window: time.Hour,
KeyFunc: func(ctx *request.Context) string {
return ctx.Get("user_id").(string) // By user
},
}))
Security
// CSRF Protection
r.Use(middleware.CSRF(middleware.CSRFConfig{
TokenLength: 32,
CookieName: "_csrf",
HeaderName: "X-CSRF-Token",
}))
// Security Headers
r.Use(middleware.SecureHeaders(middleware.SecureHeadersConfig{
ContentSecurityPolicy: "default-src 'self'",
XFrameOptions: "DENY",
XContentTypeOptions: "nosniff",
}))
// Request ID
r.Use(middleware.RequestID(middleware.RequestIDConfig{
Header: "X-Request-ID",
Generator: uuid.New,
}))
4. ๐ฆ Standard Service Library
Goal: Common service patterns ready to use
Health Checks
health := lokstra_registry.GetService[*service.Health]("health")
// Add custom checks
health.AddCheck("database", func() error {
return db.Ping()
})
health.AddCheck("redis", func() error {
return redis.Ping()
})
health.AddCheck("external-api", func() error {
resp, err := http.Get("https://api.example.com/health")
if err != nil || resp.StatusCode != 200 {
return fmt.Errorf("external API down")
}
return nil
})
// Auto-register /health endpoint
r.GET("/health", health.Handler())
Metrics Service
metrics := lokstra_registry.GetService[*service.Metrics]("metrics")
// Record metrics
metrics.Counter("requests_total", labels).Inc()
metrics.Histogram("request_duration", labels).Observe(duration)
metrics.Gauge("active_connections").Set(count)
// Auto-register /metrics endpoint
r.GET("/metrics", metrics.Handler())
Tracing Service
tracer := lokstra_registry.GetService[*service.Tracing]("tracing")
// Manual spans
span := tracer.StartSpan(ctx, "user.create")
defer span.End()
span.SetAttribute("user.id", user.ID)
span.SetAttribute("user.email", user.Email)
// Automatic instrumentation
r.Use(tracer.Middleware()) // Auto-traces all requests
๐ฎ Future Releases
v2.2 - Advanced Features (Q1 2026)
Plugin System
// Load plugins
lokstra.LoadPlugin("auth-plugin", authPlugin)
lokstra.LoadPlugin("custom-logger", loggerPlugin)
// Plugins can:
// - Register services
// - Add middleware
// - Extend routers
// - Hook into lifecycle
Admin Dashboard
- Built-in API explorer
- Request/response inspector
- Performance metrics
- Log viewer
- Configuration editor
- Service registry viewer
API Documentation
// Auto-generate OpenAPI/Swagger
r.GET("/users", getUsers).
Doc("Get all users").
Response(200, []User{}).
Response(500, Error{})
// Generate docs
swagger := lokstra.GenerateOpenAPI(r)
r.GET("/swagger", swagger.Handler())
v2.3 - Real-time & GraphQL (Q2 2026)
WebSocket Support
r.WebSocket("/ws", func(conn *websocket.Conn) {
for {
msg, err := conn.ReadMessage()
if err != nil {
break
}
conn.WriteMessage(process(msg))
}
})
Server-Sent Events (SSE)
r.GET("/events", func(ctx *request.Context) error {
stream := sse.NewStream(ctx.W)
for event := range events {
stream.Send(event)
}
return nil
})
GraphQL Support
schema := graphql.NewSchema(...)
r.POST("/graphql", func(req *graphql.Request) (*graphql.Response, error) {
return schema.Execute(req)
})
v3.0 - Breaking Changes & Modernization (Q4 2026)
Focus: Lessons learned, API improvements, Go 1.24+ features
Potential changes:
- Refined handler signatures
- Improved error handling patterns
- Enhanced generics usage
- Streamlined configuration
- Better performance optimizations
๐ฏ Long-term Vision
Core Principles (Unchanging)
- Developer Experience First - Easy to learn, productive to use
- Flexible by Design - Multiple ways to solve problems
- Convention over Configuration - Smart defaults, configure when needed
- Production Ready - Battle-tested patterns
- Go Idiomatic - Feels natural to Go developers
Goals
- ๐ฏ Top 5 Go web framework by 2027
- ๐ฏ 10,000+ GitHub stars by 2027
- ๐ฏ 100+ production deployments by 2026
- ๐ฏ Active community with regular contributions
- ๐ฏ Comprehensive ecosystem of plugins and tools
๐ค How to Contribute
Immediate Needs
- ๐ Documentation improvements
- ๐งช More example applications
- ๐ Bug reports and fixes
- ๐ก Feature suggestions
- ๐จ Logo and branding
Getting Involved
- Check GitHub Issues
- Join discussions
- Submit PRs
- Write blog posts
- Share your projects
๐ Progress Tracking
Milestones
| Release | Target | Status | Features |
|---|---|---|---|
| v2.0 | โ Done | Released | Core framework, 29 handlers, service-as-router |
| v2.1 | Q4 2025 | ๐ก In Progress | HTMX, CLI tools, Standard middleware |
| v2.2 | Q1 2026 | ๐ Planned | Plugins, Admin dashboard, API docs |
| v2.3 | Q2 2026 | ๐ Planned | WebSocket, SSE, GraphQL |
| v3.0 | Q4 2026 | ๐ญ Concept | API refinement, modernization |
Feature Status
Next Release (v2.1)
- ๐ก HTMX Support (30% complete)
- โ Research and design
- ๐ Template integration
- โณ Helper functions
- โณ Examples
- ๐ก CLI Tools (20% complete)
- โ Project structure
- ๐ Scaffolding templates
- โณ Code generation
- โณ Hot reload
- ๐ก Standard Middleware (40% complete)
- โ Logging (done)
- โ CORS (done)
- ๐ JWT auth
- โณ OAuth2
- โณ Metrics
- โณ Rate limiting
- โณ Security headers
- ๐ก Standard Services (10% complete)
- โณ Health checks
- โณ Metrics
- โณ Tracing
Legend:
- โ Done
- ๐ In Progress
- โณ Not Started
- ๐ก Partial
- ๐ Planned
- ๐ญ Concept
๐ Release Process
Version Strategy
- Major (v3.0): Breaking changes
- Minor (v2.1): New features, backward compatible
- Patch (v2.0.1): Bug fixes only
Release Checklist
- All tests passing
- Documentation updated
- CHANGELOG updated
- Migration guide (if breaking changes)
- Examples updated
- Performance benchmarks
- Security review
- Community announcement
๐ฌ Feedback & Discussion
We want to hear from you!
- ๐ Found a bug? Open an issue
- ๐ก Have an idea? Open a feature request
- ๐ฌ Want to discuss? Start a discussion
- ๐ง Need help? Join our community
Last Updated: October 2025
Maintained by: Lokstra Core Team
๐ Back to Documentation Home