Unified API
One pattern across all packages. Learn Velocity's API once—apply it to caching, queuing, mail, storage, logging, and more.
21 packages. One API pattern. Zero configuration lock-in.
Full-stack or API-only. Your architecture, your choice.
Three Pillars
One pattern across all packages. Learn Velocity's API once—apply it to caching, queuing, mail, storage, logging, and more.
Develop with SQLite, deploy with PostgreSQL. Test with in-memory cache, run with Redis. Infrastructure decisions belong in configuration, not code.
Build what you need. Full-stack web app with Inertia + React, or API-only microservice. Same framework, same packages.
Driver-Based Architecture
Every package with multiple backends uses the driver pattern.
cache.Put("user:1", data, time.Hour)
cache.Get("user:1")# Development
CACHE_DRIVER=memory
# Production
CACHE_DRIVER=redis| Package | Available Drivers |
|---|---|
cache | redis, file, memory |
arc | postgres, sqlite |
queue | database, redis, sqs |
mail | smtp, mailgun, ses |
storage | local, s3 |
log | file, console |
Unified Pattern
One consistent interface across 21 packages.
cache.Get(key)
cache.Put(key, val, ttl)
storage.Get(path)
storage.Put(path, content)mail.Send(message)
mail.To(addr).Send()
queue.Push(job)
queue.Later(job, delay)Developer Experience
Go's power with modern developer experience.
Routes auto-register from your routes/ directory
Built-in support for RESTful handler patterns
Convention-based routing and auto-initialization
Full Go type checking throughout your application
Go performance with minimal framework overhead
Single binary deployment with embedded assets
How It Works
Velocity is explicit. No containers, no service providers.
No magic. Import the package, call the function. Your IDE understands it, your compiler checks it.
import "github.com/velocitykode/velocity/pkg/cache"
cache.Get("user:1")You decide when packages initialize. One line in your bootstrap, complete control over order and error handling.
func main() {
cache.InitFromEnv()
arc.InitFromEnv()
}No runtime surprises. If it compiles, your dependencies are wired correctly. The compiler is your safety net.
// Typo? Compiler catches it.
cache.Gett("key") // ❌ Build error
// Wrong type? Compiler catches it.
cache.Put(123, val) // ❌ Build errorNo framework black box. You control initialization, shutdown, and everything in between. Debug with standard Go tools.
// Graceful shutdown? Your code.
defer cache.Close()
defer arc.Close()Type to search...