Webrium is a PHP web application framework built for developers who value simplicity, speed, and clean structure. It provides everything you need to build web applications and REST APIs without unnecessary complexity.
✔ Fast and lightweight
✔ MVC architecture
✔ Powerful routing system
✔ Blade-compatible templating
✔ Built-in database query builder (FoxDB)
✔ Vite + TailwindCSS configured out of the box
composer create-project webrium/webrium my-app
cd my-app && npm install
npm run devThen open your browser at http://localhost:8000
Webrium's routing API will feel immediately familiar if you've used Laravel.
use Webrium\Route;
Route::get('/', function () {
return 'Hello, World!';
});
Route::get('/users', 'UserController@index');
Route::post('/users', 'UserController@store');
Route::get('/users/{id}', 'UserController@show');
Route::group(['prefix' => '/api', 'middleware' => 'AuthMiddleware@handle'], function () {
Route::get('/profile', 'ProfileController@index');
});<?php
namespace App\Controllers;
class UserController
{
public function index()
{
$users = User::all();
return view('users/index.php', compact('users'));
}
public function show($id)
{
return view('users/show.php', ['user' => User::find($id)]);
}
public function store()
{
User::create(input());
return ['status' => 'created'];
}
}Documentation is currently being written.
The full docs site is under construction. In the meantime, you can find the available references below.
| Topic | Description |
|---|---|
| Views | Rendering views and templating syntax: loops, conditions, layouts |
| Topic | Description |
|---|---|
| Routing | Define routes, groups, middleware, named routes |
| Helper Functions | Global shortcuts: url(), redirect(), input(), respond(), env() and more |
| URL Utilities | Generate and manipulate URLs |
| Header Management | Control HTTP response headers |
| HTTP Client | Make outgoing HTTP requests with a fluent API |
| Topic | Description |
|---|---|
| Form Validation | Validate and sanitize user input |
| Hash & Password | Secure password hashing, HMAC, tokens, and UUIDs |
| JWT | Issue and verify JSON Web Tokens for API authentication |
| Topic | Description |
|---|---|
| FoxDB — Query Builder | Fluent query builder and ORM for database operations |
| Topic | Description |
|---|---|
| File Manager | Read, write, stream, and download files |
| File Upload | Handle multipart file uploads safely |
| Session Manager | Session data, flash messages, and counters |
| Topic | Description |
|---|---|
| Console | CLI commands and task automation |
Webrium is powered by webrium/core — a standalone PHP component library that can be used independently in any project.
Kernelclass introduced as the application execution core- Controller dispatch decoupled from
FileandDirectory Header::respond()as the canonical HTTP response methodUrl::input()handles all request body parsingRoute::source()supports custom directory paths- Class-based middleware support (
Middleware@handleorMiddleware::class) - Middleware failure returns
403instead of falling through to the next route - Both string (
'Controller@method') and array ([Controller::class, 'method']) route syntax supported boot()andteardown()controller lifecycle hooksEvent::once()fixeddeclare(strict_types=1)across all source filesMailstub removed
Webrium is open-sourced software licensed under the MIT license.