About blackCurrent

A minimal PHP 8.1+ framework — barebones, fast, secure.

How a request flows

  1. index.php registers the autoloader and calls Boot::run().
  2. Boot loads config, sends security headers, starts the session, captures the request.
  3. Url::parse() splits the path into currentClass / currentFunction / param.
  4. Dispatcher maps /aboutApp\Controllers\About.
  5. The controller calls $this->view->render('index'), the View engine finds the template via cascade.
  6. Controller::renderPage() wraps the body in layouts/app with header + footer.
  7. Boot echoes the output. Add ?_speed=1 from a safe IP for a per-stage profile.

Template cascade

When rendering index from the About controller, View looks in order:

  1. app/Views/about/index.phpthis page (most specific)
  2. app/Views/index.php (project default)
  3. core/Views/index.php (framework fallback)

Override only what you need; the rest cascades up.

Where things live

blackCurrent/
├── index.php                  ← front controller (15 lines)
├── config/config.php          ← all configuration
├── core/                      ← framework code — don't edit
│   ├── Mvc/        Controller / View / Model / ApiController / AdminController
│   ├── Http/       Request / Response / Csrf / Headers
│   ├── Routing/    Url / Dispatcher
│   ├── Db/         Connection / Database
│   ├── Cache/      Redis / APCu / File / Null
│   ├── Security/   Sanitize / Session / Auth / CleanInput
│   ├── Debug/      Logger / Profiler / ErrorHandler
│   └── Ab/         Bucket
└── app/                       ← YOUR code goes here
    ├── Controllers/           page controllers (Home, About, Contact, …)
    ├── Models/                data-access classes
    ├── Views/                 templates
    │   ├── layouts/           page shells (app, admin)
    │   ├── partials/          shared chunks (header, nav, footer)
    │   └── <controller>/      per-controller views
    ├── Api/V1/                JSON API endpoints
    └── Admin/                 admin-gated pages