Flowfull-Go
Community Starter Kit 🚧 Coming Soon
A Go implementation of Flowfull is currently in development by the community.
Status
🚧 In Development - Community-driven starter kit
The Go implementation will include all 7 core concepts adapted for Go's ecosystem and best practices.
Planned Features
- ✅ Go 1.21+ - Modern Go with generics
- ✅ Gin or Echo - Fast web framework
- ✅ GORM or sqlc - Database abstraction
- ✅ All 7 Core Concepts - Bridge Validation, HybridCache, Trust Tokens, etc.
- ✅ Type Safety - Leveraging Go's strong typing
- ✅ Goroutines - Concurrent request handling
Planned Structure
flowfull-go/
├── cmd/
│ └── server/
│ └── main.go
├── internal/
│ ├── bridge/ # Bridge Validation
│ ├── cache/ # HybridCache
│ ├── auth/ # Auth Middleware
│ ├── database/ # Database
│ ├── tokens/ # Trust Tokens (PASETO)
│ └── config/ # Configuration
├── api/
│ ├── handlers/ # HTTP Handlers
│ └── middleware/ # Middleware
├── migrations/ # Database Migrations
├── .env.example
├── go.mod
└── README.mdTechnology Stack (Planned)
| Technology | Purpose | Version |
|---|---|---|
| Go | Language | 1.21+ |
| Gin/Echo | Web Framework | Latest |
| GORM/sqlc | ORM | Latest |
| go-redis | Redis Client | Latest |
| paseto | Trust Tokens | v2 |
| viper | Configuration | Latest |
Core Concepts (Preview)
1. Bridge Validation
go
package bridge
import (
"context"
"net/http"
)
type Validator struct {
flowlessURL string
bridgeSecret string
}
func (v *Validator) ValidateSession(ctx context.Context, sessionID string, opts ValidationOptions) (*Session, error) {
// Implementation coming soon
return nil, nil
}2. HybridCache
go
package cache
import (
"context"
"time"
)
type HybridCache struct {
lru *LRUCache
redis *RedisCache
}
func (c *HybridCache) Get(ctx context.Context, key string, fetcher func() (interface{}, error)) (interface{}, error) {
// Layer 1: LRU
if val, ok := c.lru.Get(key); ok {
return val, nil
}
// Layer 2: Redis
if val, err := c.redis.Get(ctx, key); err == nil {
c.lru.Set(key, val)
return val, nil
}
// Layer 3: Database
val, err := fetcher()
if err != nil {
return nil, err
}
c.redis.Set(ctx, key, val, 5*time.Minute)
c.lru.Set(key, val)
return val, nil
}3. Auth Middleware
go
package middleware
import (
"github.com/gin-gonic/gin"
"net/http"
)
func RequireAuth(validator *bridge.Validator) gin.HandlerFunc {
return func(c *gin.Context) {
sessionID := c.GetHeader("X-Session-Id")
if sessionID == "" {
c.JSON(http.StatusUnauthorized, gin.H{"error": "Unauthorized"})
c.Abort()
return
}
session, err := validator.ValidateSession(c.Request.Context(), sessionID, bridge.ValidationOptions{
IP: c.ClientIP(),
UserAgent: c.GetHeader("User-Agent"),
})
if err != nil {
c.JSON(http.StatusUnauthorized, gin.H{"error": "Invalid session"})
c.Abort()
return
}
c.Set("user_id", session.UserID)
c.Next()
}
}Want to Contribute?
We're looking for Go developers to help build the official Go starter kit!
How to Contribute
- Join the discussion - discord.gg/pubflow
- Review the 7 Core Concepts - Core Concepts
- Implement in Go - Follow Go best practices
- Submit PR - github.com/pubflow/flowfull-go
Requirements
- Implement all 7 core concepts
- Follow Go conventions and best practices
- Include comprehensive tests
- Provide clear documentation
- Support Go 1.21+
Resources
- Core Concepts: 7 Core Concepts
- Official Node.js Implementation: flowfull-node
- Community Contributions: Getting Started - Community Contributions
Support
- Community: discord.gg/pubflow
- Email: support@pubflow.com
- Professional Support: notside.com - contact@notside.com
Interested in building this? Join us! 🚀