A high-performance, security-focused PHP 8.4+ MVC framework built for modern, high-concurrency web development.
VibeFW v2.1 adds first-class SPA tooling, security improvements, and correctness fixes across the framework.
make:spacommand — Scaffold a production-ready Vue 3 + TypeScript + Vite SPA in seconds. Generates a full-stack starter (PHP API + Vue frontend) with auth, routing, and VibeUI components wired up. Runsnpm installandnpm run buildautomatically.- HTTPS-aware auth cookies — Remember-me cookies now set
Secure: trueautomatically in production. - QueryBuilder SELECT quoting — Column identifiers in SELECT clauses are now properly quoted.
- Worker-mode safe
Strcaches — Static conversion caches are now bounded at 512 entries.
See CHANGELOG.md for the full list of changes.
VibeFW v2.0 is a ground-up architectural refactor designed for persistent runtimes like FrankenPHP Worker Mode. It introduces true request isolation and massive performance gains.
- 40,000+ Requests/Sec - Optimized for high-concurrency worker environments.
- Fiber-Isolated State - Automatic request isolation using Fiber-local container singletons and
WeakMapcontext. - Zero-Side-Effect Response -
Responseis now a pure value object, decoupled from PHP's output buffer. - Strictly Immutable QueryBuilder - Prevents silent query contamination across branching logic.
- Bulletproof Memory Management - Automatic state resetting and container flushing prevents leaks in long-running processes.
- Blazing Fast - 40,000+ requests/sec with FrankenPHP worker mode.
- Security First - Built-in protection against CSRF, XSS, SQL injection, and timing attacks.
- True Async I/O - Non-blocking HTTP and Database execution using PHP Fibers and EventLoop.
- Result/Option Types - Null-safe, exception-free error handling.
- Active Record ORM - Elegant, immutable database interactions with mass assignment protection.
- CQRS & Events - Command/Query separation and event-driven architecture built-in.
- Modern PHP - Leveraging property hooks, asymmetric visibility, and readonly properties.
- PHP 8.4+
- Composer
- SQLite, MySQL, or PostgreSQL
composer create-project velkymx/vibefw my-app
cd my-appThat's it. Composer automatically:
- Creates
.envwith secure keys - Sets up storage directories
- Creates the SQLite database
- Runs all migrations
php fw make:spaGenerates a complete SPA with auth, routing, and VibeUI components. See the SPA Quick Start for details.
git clone https://github.com/velkymx/vibefw.git my-app
cd my-app
composer install
php fw setupVibeFW is designed to run at peak performance using FrankenPHP:
./frankenphp php-server --listen :8080 --worker public/index.phpphp fw # List all commands
# Project Setup
php fw setup # Initialize project (env, keys, database)
php fw make:spa # Scaffold Vue 3 + TypeScript SPA
# Code Generation
php fw make:model Post -m # Model + migration
php fw make:controller PostController -r # Resource controller
php fw make:migration create_posts_table
# Database
php fw migrate # Run pending migrations
php fw migrate:fresh # Drop all & re-migrate
# Development
php fw serve --port=8080 # Start standard dev server
php fw routes:list # List all routes
php fw security:check # Security scancomposer create-project velkymx/vibefw my-app
cd my-app && php fw make:spaThe SPA scaffold generates a complete Vue 3 + TypeScript + VibeUI frontend with:
- Home — Public landing page with feature cards
- Login / Register — Auth forms with validation, wired to the PHP API
- Dashboard — Protected stats page inside a sidebar + topbar shell
- Dark mode — Toggle with Bootstrap CSS variable support
- TypeScript types — Interfaces for all API responses
- SPA Quick Start — Build a full-stack app in 5 minutes
- Changelog
- Upgrading to v2.0.0
- Controllers
- Models
- Views
- Routing
- Middleware
- Result & Option Types
- Database & Migrations
- VibeUI Components — Full component reference
- VibeUI AI Blueprint — AI agent integration guide
Benchmarked with FrankenPHP worker mode on Apple M2 (MacBook Air):
| Metric | Result |
|---|---|
| Requests per Second | 40,058.37 |
| Average Latency | 5.15ms |
| Total Requests (30s) | 1,202,023 |
| Memory Stability | Perfect (Zero leaks after 1.2M requests) |
The QueryBuilder is now immutable. Chaining works normally, but conditional steps require re-assignment:
$query = User::where('active', true);
if ($adminOnly) {
$query = $query->where('role', 'admin'); // Capture the new instance
}
$users = $query->orderBy('name')->get();Controllers return Response objects which are emitted by the kernel. No more global header() calls or exit().
public function index(Request $request): Response
{
return $this->view('welcome')
->header('X-Framework', 'VibeFW')
->cache(3600);
}composer test # Runs all 920+ tests
composer ci # Full pipeline (Lint, Static Analysis, Tests)MIT License. See LICENSE for details.