PHPackages                             lizzyman04/mvccore - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. lizzyman04/mvccore

ActiveLibrary[Framework](/categories/framework)

lizzyman04/mvccore
==================

A lightweight PHP MVC core with Next.js-style file-based routing, elegant Flow syntax, and powerful features

71PHP

Since Oct 27Pushed 1mo agoCompare

[ Source](https://github.com/lizzyman04/mvccore)[ Packagist](https://packagist.org/packages/lizzyman04/mvccore)[ RSS](/packages/lizzyman04-mvccore/feed)WikiDiscussions main Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Fluxor Core 🚀
=============

[](#fluxor-core-)

**The lightweight PHP MVC core that powers Fluxor framework** - File-based routing, elegant Flow syntax, and zero bloat.

[![Latest Stable Version](https://camo.githubusercontent.com/57762310c2c3c9bccc9b47582e0169951bcd8cde72ae0f9254de5155a1da6883/68747470733a2f2f706f7365722e707567782e6f72672f6c697a7a796d616e30342f666c75786f722f762f737461626c65)](https://packagist.org/packages/lizzyman04/fluxor)[![Total Downloads](https://camo.githubusercontent.com/d6bd503887e358e9641a52b448a12e4ad05a0c66c21ee629f3d1d5840497a96f/68747470733a2f2f706f7365722e707567782e6f72672f6c697a7a796d616e30342f666c75786f722f646f776e6c6f616473)](https://packagist.org/packages/lizzyman04/fluxor)[![License](https://camo.githubusercontent.com/30a941ccf9517f5aa4f59a8783a1a7b8136ec35912777d1c5041dc33ce4119aa/68747470733a2f2f706f7365722e707567782e6f72672f6c697a7a796d616e30342f666c75786f722f6c6963656e7365)](https://packagist.org/packages/lizzyman04/fluxor)[![PHP Version Require](https://camo.githubusercontent.com/ce2a1d7f331f5edf49551cce728b43c6ccbb6d84668cf9e7a3f84337a81515ae/68747470733a2f2f706f7365722e707567782e6f72672f6c697a7a796d616e30342f666c75786f722f726571756972652f706870)](https://packagist.org/packages/lizzyman04/fluxor)

📦 What is Fluxor Core?
----------------------

[](#-what-is-fluxor-core)

Fluxor Core is the **engine behind the Fluxor PHP framework** - a minimal, elegant, and powerful MVC core designed for developers who want **simplicity without sacrificing functionality**.

Unlike monolithic frameworks, Fluxor Core gives you:

- 🚀 **Blazing fast performance** (boot under 10ms)
- 📦 **Zero dependencies** - just pure PHP!
- 🔍 **Transparent code** - no magic, you can read everything
- 🎯 **File-based routing** inspired by Next.js
- 💎 **Beautiful Flow syntax** for route definitions

✨ Core Features
---------------

[](#-core-features)

FeatureDescription**🎯 File-based Routing**Routes defined by folder structure - like Next.js**💎 Flow Syntax**Ultra-clean, chainable route definitions**🔄 MVC Architecture**Clean separation with Controllers and Views**🎨 View System**Layouts, sections, stacks, and partials**🛡️ Security First**Built-in CSRF, XSS protection, secure sessions**🚦 Middleware**Flexible request filtering (global + per-route)**🎭 Error Handling**Hierarchical error pages (404, 500, etc.)**🔧 Zero Config**Auto-detects base path and URL**🌍 Environment Support**Built-in .env file parser with type casting🚀 Quick Start
-------------

[](#-quick-start)

```
# Add Fluxor Core to your project
composer require lizzyman04/fluxor

# Basic usage
run();
```

🏗️ Core Architecture
--------------------

[](#️-core-architecture)

```
fluxor/
├── src/
│   ├── Core/
│   │   ├── App.php              # Application facade
│   │   ├── Controller.php       # Base controller
│   │   ├── View.php             # View engine
│   │   ├── App/                 # Application internals
│   │   │   ├── Application.php
│   │   │   ├── Config.php
│   │   │   ├── Environment.php
│   │   │   └── ExceptionHandler.php
│   │   ├── Foundation/          # Service container
│   │   │   ├── ServiceContainer.php
│   │   │   └── ServiceProvider.php
│   │   ├── Http/                # HTTP layer
│   │   │   ├── Request.php
│   │   │   ├── Response.php
│   │   │   ├── Router.php
│   │   │   └── Router/          # Router components
│   │   │       ├── Dispatcher.php
│   │   │       ├── ErrorHandler.php
│   │   │       └── Matcher.php
│   │   ├── Routing/             # Flow syntax
│   │   │   └── Flow.php
│   │   ├── Resources/           # Built-in resources
│   │   │   └── views/errors/    # Error templates
│   │   └── View/                # View components
│   │       ├── ViewFactory.php
│   │       └── Compilers/
│   │           └── PhpCompiler.php
│   ├── Contracts/
│   │   └── ControllerInterface.php
│   ├── Exceptions/
│   │   ├── AppException.php
│   │   ├── HttpException.php
│   │   ├── NotFoundException.php
│   │   └── ValidationException.php
│   ├── Helpers/
│   │   ├── Functions.php        # Global helper functions
│   │   ├── HttpStatusCode.php
│   │   └── Str.php
│   └── Fluxor.php                # Re-exports for clean API

```

🎯 Zero Config Import
--------------------

[](#-zero-config-import)

All core classes are automatically re-exported for cleaner code:

```
use Fluxor\App;
use Fluxor\Request;
use Fluxor\Response;
use Fluxor\Flow;
use Fluxor\View;
```

💡 Core Concepts
---------------

[](#-core-concepts)

### Application Instance

[](#application-instance)

```
$app = new Fluxor\App();
$basePath = $app->getBasePath();  // Auto-detected!
$baseUrl = $app->getBaseUrl();    // Auto-detected!
```

### File-based Routing

[](#file-based-routing)

```
// app/router/users/[id].php
use Fluxor\Flow;
use Fluxor\Response;

Flow::GET()->do(function($req) {
    $userId = $req->param('id');
    return Response::success(['user' => $userId]);
});
```

### Router with Middleware

[](#router-with-middleware)

```
$router = $app->getRouter();
$router->addMiddleware('auth', function($request) {
    if (!$request->isAuthenticated()) {
        return Fluxor\Response::redirect('/login');
    }
});
```

### Request &amp; Response

[](#request--response)

```
use Fluxor\Response;

$id = $request->param('id');
$email = $request->input('email');
$token = $request->bearerToken();

return Response::json(['user' => $user]);
return Response::view('profile', ['user' => $user]);
```

### Flow Syntax

[](#flow-syntax)

```
use Fluxor\Flow;

// Simple route
Flow::GET()->do(fn($req) => 'Hello World');

// Controller binding
Flow::POST()->to(UserController::class, 'store');

// Middleware
Flow::use(fn($req) => $req->isAuthenticated() ? null : redirect('/login'));
```

### View System

[](#view-system)

```
// In controller
return Response::view('home', ['title' => 'Home']);

// In view (home.php)
View::extend('layouts/main');
View::section('content');

View::endSection();
```

### Global Helpers

[](#global-helpers)

```
// Environment variables
$debug = env('APP_DEBUG', false);
$dbName = env('DB_NAME', 'database');

// Path helpers
$root = base_path();
$url = base_url('api/users');
$asset = asset('css/app.css');

// HTTP helpers
abort(404, 'Not Found');
return redirect('/dashboard');

// Debug helpers
dump($user);
dd($data);  // Dump and die
```

📊 Performance
-------------

[](#-performance)

- **Boot time**: &lt; 10ms
- **Memory footprint**: ~2MB
- **Zero dependencies** - no external packages required
- **Zero magic** - no reflection overhead
- **File-based routing** - no route caching needed

📚 Documentation
---------------

[](#-documentation)

**Full documentation available at:** 👉 [**https://lizzyman04.github.io/fluxor-php**](https://lizzyman04.github.io/fluxor-php)

The documentation includes:

- Installation guide
- File-based routing
- Flow syntax reference
- Views and layouts
- Controllers and middleware
- Environment configuration
- Complete API reference with helper functions

🎯 Who is this for?
------------------

[](#-who-is-this-for)

- **Framework authors** building custom solutions
- **API developers** who want minimal overhead
- **MVC learners** who want to understand internals
- **Performance purists** who hate bloat
- **Developers** who love Next.js-style routing

📄 License
---------

[](#-license)

MIT License - see [LICENSE](LICENSE) file for details.

---

**Fluxor** - Build elegant PHP applications with joy! 🎉

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance59

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c63cd1742d8aae770cbb4c9e3f290107358345a0e1bd99037e0af6ce85acd42c?d=identicon)[lizzyman04](/maintainers/lizzyman04)

---

Top Contributors

[![lizzyman04](https://avatars.githubusercontent.com/u/130801183?v=4)](https://github.com/lizzyman04 "lizzyman04 (7 commits)")

---

Tags

file-based-routingflow-syntaxlightweightnextjs-inspiredphpphp-frameworkrouter

### Embed Badge

![Health badge](/badges/lizzyman04-mvccore/health.svg)

```
[![Health](https://phpackages.com/badges/lizzyman04-mvccore/health.svg)](https://phpackages.com/packages/lizzyman04-mvccore)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
