velocity

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2025 License: MIT Imports: 1 Imported by: 0

README

Velocity

A Laravel-inspired web framework for Go

Velocity brings joy and elegance to Go web development, without sacrificing Go's simplicity, performance, and type safety. Build web applications with expressive APIs and the speed of Go.

Why Velocity?

For Framework Users: Get familiar conventions and developer happiness you love, with Go's performance and concurrency.

For Go Developers: Skip the boilerplate and focus on building. Velocity provides a unified, elegant interface over common web development tasks.

Key Features
  • Single Binary: Deploy anywhere with zero dependencies
  • Type Safety: Full compile-time type checking with Go's type system
  • True Concurrency: Built-in goroutines and channels for high performance
  • Driver-Based Architecture: Swap implementations via config (Redis ↔ Memory, PostgreSQL ↔ MySQL)
  • Expressive DX: Familiar conventions, expressive APIs, and developer-friendly errors

Requirements

  • Go 1.25 or higher
  • Node.js 18+ (for frontend assets)

CLI Installation

Install the Velocity CLI to create and manage projects:

# Homebrew (macOS)
brew tap velocitykode/tap
brew install velocity

# Or with Go
go install github.com/velocitykode/velocity-cli@latest

Verify installation:

velocity version

Quick Start

Create a new project:

velocity new myapp
cd myapp
velocity serve

Your app runs at http://localhost:3000

Manual Setup

Add the framework to an existing project:

go get github.com/velocitykode/velocity
package main

import (
    "github.com/velocitykode/velocity/pkg/router"
    "github.com/velocitykode/velocity/pkg/log"
)

func main() {
    r := router.New()

    r.Get("/", func(c *router.Context) error {
        return c.JSON(200, map[string]string{
            "message": "Welcome to Velocity!",
        })
    })

    log.Info("Starting server on :8080")
    r.Run(":8080")
}

Feature Status

Package Status Description
async ✅ Complete Async primitives and concurrency patterns
auth ✅ Complete Authentication and session management
broadcast ✅ Complete Real-time event broadcasting
cache ✅ Complete Multi-driver caching (memory, file, redis)
config ✅ Complete Configuration management
crypto ✅ Complete Encryption and decryption
csrf ✅ Complete CSRF protection
events ✅ Complete Event system with listeners
log ✅ Complete Structured logging with multiple drivers
mail ✅ Complete Email sending with multiple drivers
orm ✅ Complete Database ORM with relationships
queue ✅ Complete Job queue system with workers
router ✅ Complete HTTP routing with middleware
scheduler ✅ Complete Task scheduling (cron-like)
storage ✅ Complete File storage abstraction
str ✅ Complete String manipulation utilities
testing ✅ Complete Testing helpers and utilities
validation ✅ Complete Input validation
view ✅ Complete Template rendering
vite ✅ Complete Vite.js integration for frontend
websocket ✅ Complete WebSocket support

Documentation

Full documentation at velocitykode.com/docs

Community

Philosophy

Velocity is built on three principles:

  1. Developer Happiness: Code should be a joy to write and read
  2. Convention over Configuration: Sensible defaults, configure only when needed
  3. Go's Strengths: Embrace simplicity, performance, and type safety

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

License

Velocity is open-source software licensed under the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App represents the Velocity application

func New

func New() *App

New creates a new Velocity application

func (*App) Run

func (a *App) Run()

Run starts the application

func (*App) Version

func (a *App) Version() string

Version returns the framework version

Directories

Path Synopsis
pkg
broadcast
Package broadcast provides a high-level broadcasting system for real-time communication built on top of the WebSocket package and supporting multiple drivers
Package broadcast provides a high-level broadcasting system for real-time communication built on top of the WebSocket package and supporting multiple drivers
log
mail/alldrivers
Package alldrivers imports all mail drivers to register them Import this package with _ to ensure all drivers are registered
Package alldrivers imports all mail drivers to register them Import this package with _ to ensure all drivers are registered
orm
router
Package router provides HTTP routing functionality for the Velocity framework.
Package router provides HTTP routing functionality for the Velocity framework.
str

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL