webrium/core

A lightweight set of PHP utility classes for common web tasks: routing, HTTP requests and headers, sessions, validation, file uploads, JWT, and hashing.

Maintainers

Package info

github.com/webrium/core

pkg:composer/webrium/core

Statistics

Installs: 1 389

Dependents: 5

Suggesters: 0

Stars: 6

Open Issues: 0


README

Webrium Core Cover

Webrium Core

The Lightweight Engine for Modern PHP Applications

Latest Stable Version Total Downloads License

Fast · Modular · Elegant

webrium.dev · Documentation · GitHub

🌟 Overview

Webrium Core is a high-performance PHP component library designed to simplify web development. While it serves as the backbone of the Webrium Framework, it is built to be completely standalone — drop it into any PHP project and use only what you need.

It provides routing, controllers, requests/responses, sessions, validation, file uploads, an HTTP client, JWT, hashing, events, filesystem helpers, localization, and a unified error handler — with no required dependencies beyond PHP itself.

🚀 Quick Start

1. Installation

composer require webrium/core

2. Basic Setup (index.php)

<?php
require_once __DIR__ . '/vendor/autoload.php';

use Webrium\App;
use Webrium\Route;

App::initialize(__DIR__);

Route::get('/', fn() => "Welcome to Webrium Core! 🚀");

App::run();

Then run:

php -S 127.0.0.1:8000 index.php

📚 Documentation

The complete documentation for Webrium Core lives at webrium.dev/docs/v5/core. It covers every component the package ships with:

  • Routing — defining routes, groups, middleware, named routes, typed parameters
  • Controllers — class structure, boot() / teardown() lifecycle hooks
  • Requests & Responses — reading input, sending responses, headers, CORS, redirects
  • Sessions — sessions, flash messages, validation errors, old input
  • Validation — fluent input validation
  • File Uploads — secure uploads with safe defaults
  • HTTP Client — calling external APIs
  • JWT — issuing and verifying signed tokens
  • Hashing — passwords, HMACs, tokens, UUIDs
  • Events — publish/subscribe system
  • FilesystemFile and Directory utilities
  • Localization — file-based translations
  • Error Handling — unified handling of errors, exceptions, and fatal shutdowns
  • Helper Functions — the complete reference of global helpers

The same documentation is also available as plain Markdown in the webrium/docs repository.

Part of the Webrium Ecosystem

Webrium Core is one of four packages that make up the full Webrium Framework:

Each is independently usable, except webrium/console which is framework-coupled.

License

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