惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tailwind CSS Blog
博客园 - Franky
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
L
LangChain Blog
博客园_首页
Recent Announcements
Recent Announcements
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Hackread – Cybersecurity News, Data Breaches, AI and More
爱范儿
爱范儿
博客园 - 叶小钗
博客园 - 【当耐特】
The Cloudflare Blog
J
Java Code Geeks
G
Google Developers Blog
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
aimingoo的专栏
aimingoo的专栏
A
About on SuperTechFans

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Your first Velocity app in 60 seconds
VelocityKode · 2026-04-28 · via DEV Community

Velocity is a full-stack web framework for Go. Pre-1.0 and shipping in public. vel.build.

Prerequisites

You need:

  • Go 1.26+go version should print go1.26 or newer.
  • Homebrew — for installing the velocity CLI on macOS or Linux. (Other platforms can build from source; see the installer repo.)
  • Bun (recommended) or Node + npm — for the JS side. The installer picks up whichever it finds.

No Docker, no external services to start. The project-local ./vel binary handles the dev server, migrations, and code generation once the project exists.

💡 Pro tip — install Bun. Bun is meaningfully faster than npm for both dependency installs and Vite startup, and velocity new will use it automatically when present. One-liner: curl -fsSL https://bun.sh/install | bash. If you'd rather stick with npm, the tutorial works exactly the same.

1. Install the installer

brew install --cask velocitykode/tap/velocity

Enter fullscreen mode Exit fullscreen mode

Verify it landed:

velocity --version

Enter fullscreen mode Exit fullscreen mode

You should see the installed version string. The velocity CLI is project-bootstrap-only; once a project exists, you'll use the project-local ./vel binary for everything else.

2. Scaffold a new project

velocity new acme

Enter fullscreen mode Exit fullscreen mode

acme is the placeholder name I use throughout these tutorials — pick whatever fits your project.

The installer asks three quick questions:

Install the CLI, scaffold a project, and hit localhost. The shortest path from zero to a running Velocity application.

  • Project typeFull stack (Inertia + Vite) for the React + Tailwind setup this tutorial uses.
  • Databasesqlite for the easiest local default. Postgres and MySQL are available and swap in via env var later.
  • Enable Inertia server-side rendering?N for development. Flip to Y later if you need it.

Use ← / → to toggle, enter to confirm.

Once you've answered, the installer clones the template, configures the Go module, initializes git, installs dependencies, builds the project-local ./vel binary, runs the initial migrations, and prints the next two commands you need:

Install the CLI, scaffold a project, and hit localhost. The shortest path from zero to a running Velocity application.

The whole thing takes well under a minute on a warm machine.

3. Start the dev server

cd acme
./vel serve

Enter fullscreen mode Exit fullscreen mode

This boots the Go backend with hot-module-reload, runs Vite for the frontend in parallel, and prints something like:

[velocity] listening on http://localhost:4000
[vite]     dev server ready in 230ms

Enter fullscreen mode Exit fullscreen mode

4. Open the app

Navigate to http://localhost:4000.

You'll land on the login page. Register an account, log in, and you're on the dashboard. Every primitive Velocity ships — auth, ORM, queues, cache, mail, storage, broadcasting, scheduling — is wired and ready to use.

Find your way around

Here is what velocity new acme produced. The directories you'll touch most are at the top.

acme/
├── main.go               # Bootstrap chain: Providers, Middleware, Routes, Run
├── go.mod
├── .env                  # Local config (DB driver, secrets, etc.)
│
├── routes/
│   └── web.go            # Web routes (the first file you edit)
│
├── internal/
│   ├── app/              # App-level wiring (kernel, middleware stacks, events)
│   ├── handlers/         # HTTP handlers (auth, dashboard, home, health)
│   ├── middleware/       # Custom middleware
│   ├── models/           # ORM models (the starter ships User)
│   └── commands/         # Custom ./vel commands
│
├── config/               # Typed config: app.go, auth.go, crypto.go, view.go
│
├── database/
│   ├── migrations/       # Go migration files
│   ├── factories/        # Model factories for tests and seeds
│   └── database.sqlite   # The local DB after first migration
│
├── resources/
│   ├── js/               # React + TypeScript (app.tsx, pages/, components/, layouts/)
│   ├── css/              # Tailwind entrypoint
│   └── views/            # Server-rendered HTML shell for Inertia
│
├── public/               # Static assets served at the URL root
├── storage/              # File storage default (uploads, logs)
└── vite.config.ts        # Frontend build config

Enter fullscreen mode Exit fullscreen mode

The shortest possible walk-through:

  • main.go. The bootstrap chain. Anything you wire (providers, middleware, routes, commands, events) flows through it.
  • routes/web.go. Where you'll spend most of the first hour. Add a route, point it at a handler in internal/handlers/.
  • internal/handlers/. HTTP handlers. The starter has auth (login, register, logout), dashboard, home, and health.
  • internal/models/. Your ORM models. Starts with User. New models go here, scaffolded by ./vel make:model.
  • database/migrations/. Schema. Go files, not SQL strings or YAML. New migrations come from ./vel make:migration or ./vel make:model -m.
  • resources/js/. The React frontend. pages/ maps 1:1 to the Inertia responses your handlers return: c.Inertia("Posts/Index", props) renders resources/js/pages/Posts/Index.tsx.
  • config/. Typed Go config files. Reads from .env at startup, exposes typed values to the rest of the app.

That is the loop. routes/web.go declares the URL. internal/handlers/ runs the logic. internal/models/ talks to the database. resources/js/pages/ renders the response.

What's next

  • Add a model. ./vel make:model Post -m scaffolds a model and migration in one shot.
  • Add a handler. ./vel make:handler PostsHandler gives you a handler wired to the router.
  • Read the docs. vel.build/docs covers the full API surface.

That's it. Four commands, one running app. Velocity gets out of your way after that.


Originally published at vel.build/blog/your-first-velocity-app.