PHPackages                             wiznetic/corenetic-base - 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. wiznetic/corenetic-base

ActiveProject[Framework](/categories/framework)

wiznetic/corenetic-base
=======================

Corenetic Framework — bare core skeleton. A modular PHP framework with attribute-based routing, middleware pipeline and event-driven kernel.

v1.0.0(4mo ago)01MITPHPPHP ^8.2

Since Feb 21Pushed 4mo agoCompare

[ Source](https://github.com/wiznetic-git/base)[ Packagist](https://packagist.org/packages/wiznetic/corenetic-base)[ RSS](/packages/wiznetic-corenetic-base/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

Corenetic Framework
===================

[](#corenetic-framework)

A modular PHP framework with attribute-based routing, middleware pipeline, and an event-driven kernel. Install only what you need — nothing more.

Installation
------------

[](#installation)

```
composer create-project corenetic/base my-project
cd my-project
php -S localhost:8000 -t public
```

---

Directory Structure
-------------------

[](#directory-structure)

```
app/
├── System/          → framework core (module loader, helpers)
└── Base/            → your application code

app_modules/         → installed modules (Router, Blade, Cache, etc.)

public/
└── index.php        → HTTP entry point

console              → CLI entry point
.env                 → environment variables

```

### `app/Base/` — Your Application

[](#appbase--your-application)

All your application code lives here, organized by convention:

```
app/Base/
└── app/
    ├── Http/
    │   ├── Controllers/     → HTTP controllers
    │   └── Middleware/      → HTTP middleware
    ├── Console/
    │   └── Commands/        → CLI commands
    ├── Events/              → event classes
    ├── Listeners/           → event listeners
    ├── Jobs/                → queue jobs
    ├── Notifications/       → notification classes
    ├── Models/              → Eloquent models
    ├── Services/            → business logic
    ├── Config/              → configuration files
    └── Migrations/          → database migrations

```

---

The Kernel
----------

[](#the-kernel)

The kernel (`wiznetic/kernel`) is the heart of the framework. It runs a three-phase pipeline on every HTTP request:

```
request → process → response

```

Each phase has three hooks: `before`, `on`, `after`. Modules attach their logic to these hooks during `register()`.

```
// Example: a module that runs on every request
Kernel::on('request', function ($ctx) {
    // $ctx->request  — the incoming request
    // $ctx->response — set this to send a response
    // $ctx->data     — shared data between hooks
});
```

**HTTP entry** (`public/index.php`):

```
Kernel::handle(); // fires the full pipeline
```

**CLI entry** (`console`):

```
// bootstrap.php runs Modules::register() — all module register() methods are called
// Kernel::handle() is NOT called — CLI modules boot themselves in their commands
Application::create()->run();
```

---

Module System
-------------

[](#module-system)

### What is a Module?

[](#what-is-a-module)

A module is a self-contained directory in `app_modules/` that encapsulates a single responsibility. The framework auto-discovers and registers every module at startup — no manual wiring needed.

```
app_modules/
└── Cache/
    ├── module.json          → module metadata
    ├── required/            → dependencies and configuration
    │   ├── modules          → required module names (one per line)
    │   ├── env              → environment variables with example values
    │   ├── commands         → install commands (composer require, etc.)
    │   └── conflict         → conflicting module names
    └── app/
        ├── Bootstrap/       → registration — no logic here
        ├── Dependencies/    → one class per external dependency
        ├── Containers/      → assembles Dependencies, builds the module
        └── Services/        → public API — the only exit point

```

### Module Registration

[](#module-registration)

At startup, `System\Bootstrap\Modules` loops through every directory in `app_modules/`, registers its PSR-4 namespace, and calls `ModuleName\Bootstrap\ModuleName::register()`.

```
// app_modules/Cache/app/Bootstrap/Cache.php
class Cache
{
    public static function register(): void
    {
        Kernel::on('request', function () {
            $config = Config::get('cache');
            Store::boot(new CacheContainer($config));
        });
    }
}
```

### Module Architecture

[](#module-architecture)

```
Dependencies (input) ─┐
                       ├→ Container (assembly) → Services (logic) → Public API (output)
Models (data)         ─┘

```

LayerRole`Bootstrap`Registers the module with the Kernel. No logic.`Dependencies`One class per external dependency (Composer package or another module).`Containers`Assembles Dependencies and Models. The only place that knows how the module is built.`Services`Business logic. Receives the Container. **The only public API.****Rule:** Other modules only use `Services`. Never `Dependencies`, `Models`, or `Containers` directly.

---

Dependency Types
----------------

[](#dependency-types)

### Required Dependency

[](#required-dependency)

The module cannot function without it. Add to `required/modules` and import directly.

```
// required/modules
Discovery
Cache

```

### Optional Dependency

[](#optional-dependency)

The module works without it — the other module just enhances it. Use `class_exists()` in `Bootstrap` instead of listing in `required/modules`.

```
// Consumer Bootstrap — checks if provider exists before hooking in
if (class_exists(\Cache\Services\Store::class)) {
    \Cache\Services\Store::addResolver(
        fn(string $key, callable $cb) => Discovery::cache($key, $cb)
    );
}
```

**Rule:** If removing module B breaks module A → required. If removing module B only reduces performance or features of A → optional.

---

Creating a Module
-----------------

[](#creating-a-module)

### 1. Create the directory

[](#1-create-the-directory)

```
mkdir -p app_modules/MyModule/app/{Bootstrap,Dependencies,Containers,Services}
```

### 2. Add `module.json`

[](#2-add-modulejson)

```
{
    "name": "MyModule",
    "version": "1.0.0",
    "description": "What this module does"
}
```

### 3. Create the Bootstrap

[](#3-create-the-bootstrap)

```
// app_modules/MyModule/app/Bootstrap/MyModule.php
namespace MyModule\Bootstrap;

use Wiznetic\Kernel\Kernel;
use MyModule\Containers\MyContainer;
use MyModule\Services\MyService;

class MyModule
{
    public static function register(): void
    {
        Kernel::on('request', function () {
            MyService::boot(new MyContainer());
        });
    }
}
```

### 4. Create the Service (Public API)

[](#4-create-the-service-public-api)

```
// app_modules/MyModule/app/Services/MyService.php
namespace MyModule\Services;

class MyService
{
    private static ?MyContainer $container = null;

    public static function boot(MyContainer $container): void
    {
        static::$container = $container;
    }

    public static function doSomething(): string
    {
        return static::$container->dependency->run();
    }
}
```

### 5. Use it anywhere

[](#5-use-it-anywhere)

```
use MyModule\Services\MyService;

MyService::doSomething();
```

---

Running the Application
-----------------------

[](#running-the-application)

### HTTP Server

[](#http-server)

```
# Built-in PHP server
php -S localhost:8000 -t public

# Apache / Nginx — point document root to public/
```

### CLI

[](#cli)

```
php console list              # list all registered commands
php console          # run a command
```

---

Official Modules
----------------

[](#official-modules)

Install any module by copying it into `app_modules/` and running its required commands.

ModuleDescriptionRequires`Config`PHP config files, auto-discovered—`Discovery`Attribute &amp; class scanner (no direct Reflection)—`Router`Attribute-based HTTP routing `#[Get('/')]`Discovery`Middleware`HTTP middleware pipelineDiscovery`Blade`Blade template engine—`Cache`Multi-driver cache (file, Redis, APCu)—`Session`Session management—`Auth`Authentication &amp; authorizationSession, Cache`Eloquent`Eloquent ORM + migrations—`Storage`File storage—`Validator`Input validation—`RateLimiter`Rate limiting by IP or userCache`Events`Synchronous event dispatcher—`Notifications`Multi-channel notification dispatcher—`Queue`Async job queue (file driver built-in)—`QueueEloquent`Database driver for QueueQueue, Eloquent`Mail`Email via Symfony Mailer, async via QueueQueue, Notifications`MailBlade`Blade templates for MailMail, Blade`Scheduler`Cron task scheduler—`HttpClient`Fluent HTTP client (Guzzle)—`Pagination`Pagination data container—`Lang`Key-based multi-language translationsEloquent---

Naming Conventions
------------------

[](#naming-conventions)

PatternExampleMeaning`Queue{Driver}``QueueEloquent`, `QueueRedis`Queue driver extension`Mail{Template}``MailBlade`, `MailMarkdown`Mail template engine extension`Notifications{Channel}``NotificationsTwilio`, `NotificationsSlack`Notification channel---

Environment Variables
---------------------

[](#environment-variables)

Each module declares its env variables in `required/env`. Copy them to your `.env` file as needed.

```
# Minimum .env for bare core
APP_URL=http://localhost
APP_DEBUG=true
```

---

License
-------

[](#license)

MIT

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance75

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

133d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/72b6b44e38976134b60fc4a3328357203b842bab10cb25ee6f327aba49ac93af?d=identicon)[wiznetic](/maintainers/wiznetic)

---

Top Contributors

[![wiznetic-git](https://avatars.githubusercontent.com/u/250726010?v=4)](https://github.com/wiznetic-git "wiznetic-git (2 commits)")

### Embed Badge

![Health badge](/badges/wiznetic-corenetic-base/health.svg)

```
[![Health](https://phpackages.com/badges/wiznetic-corenetic-base/health.svg)](https://phpackages.com/packages/wiznetic-corenetic-base)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k75.6M259](/packages/laravel-telescope)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)

PHPackages © 2026

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