Skip to content

webrium/webrium

Repository files navigation

Webrium Framework

Webrium

Fast, Lightweight PHP Framework for Modern Web Applications

Latest Stable Version Total Downloads License

Fast · Modular · Elegant


About Webrium

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


Installation

Create a new project using Composer:

composer create-project webrium/webrium my-app

Install frontend dependencies:

cd my-app && npm install

Start the Development Server

npm run dev

Then open your browser at:

http://localhost:8000

Documentation

🚀 Getting Started

Topic Description
Views Rendering views and Templating syntax : loops, conditions, layouts

🌐 Routing & Request

Topic Description
Routing Define GET, POST, PUT, DELETE routes, groups, middleware, named routes
Helper Functions Global shortcuts: url(), redirect(), input(), 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

🛡️ Security & Validation

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 auth

🗄️ Database

Topic Description
FoxDB — Query Builder Fluent query builder and ORM for database operations

🛠️ Files & Storage

Topic Description
File Manager Read, write, stream, download files and manage directories
File Upload Handle multipart file uploads safely
Session Manager Session data, flash messages, and counters

⚙️ Advanced

Topic Description
Email Send emails from your application
Console CLI commands and task automation

Quick Example

routes/web.php

use Webrium\Route;

Route::get('/', function () {
    return view('welcome');
});

Route::group(['prefix' => '/api', 'middleware' => 'AuthMiddleware@handle'], function () {
    Route::get('/users', 'UserController@index');
    Route::post('/users', 'UserController@store');
    Route::get('/users/{id}', 'UserController@show');
});

app/Controllers/UserController.php

class UserController
{
    public function index()
    {
        $users = User::all();
        return view('users.index', compact('users'));
    }

    public function show($id)
    {
        $user = User::find($id);
        return view('users.show', compact('user'));
    }
}

Core Library

Webrium is powered by webrium/core — a standalone PHP component library that can also be used independently in any project.


License

Webrium is open-sourced software licensed under the MIT license.

About

Webrium is a lightweight PHP framework for web development

Topics

Resources

License

Stars

Watchers

Forks

Contributors