Fork me on GitHub

Documentation

Introduction

JiNexus Framework is a modular, lightweight, and component-based PHP MVC framework for PHP 8.5+. It provides a minimal request-dispatch-render pipeline by wiring together small, focused, independently testable components — each with zero external dependencies — so you pay only for what you use.

Quick start

This documentation guides you through creating an application with JiNexus Framework — from setting up your modules and configuration, to defining routes and dispatching controllers, models, and views.

The fastest way to get started is via the skeleton project:

composer create-project jinexus-framework/jinexus-framework-skeleton path/to/my-project
cd path/to/my-project
composer run --timeout=0 serve

Browse to http://localhost:8000 and you should see the default application page.

Release and Development

JiNexus Framework is under active development. If you are interested in following the development of this project, you may check its GitHub repositories. This is a great resource for staying up to date with the latest developments! Head to the GitHub page.

Components

The framework is composed of six packages, arranged in a layered architecture. Each component lives in its own repository, has its own test suite at 100% coverage, and is installable via Composer independently.

Config

jinexus-framework/jinexus-config it provides simple, in-memory access to configuration data. It stores configuration as an associative array and exposes it through explicit accessors (get(), set(), has()), magic property access (__get/__set), and optional reflection-based getters/setters. It has zero external dependencies — you decide where the data comes from (files, environment, a database, or plain arrays). Head to the GitHub page.

HTTP

jinexus-framework/jinexus-http provides an object-oriented interface over PHP's HTTP request super-globals — $_GET, $_POST, $_FILES, $_COOKIE, and $_SERVER. Each is wrapped in a Parameter bag providing get(), has(), add(), remove(), all(), and iterator support. Convenience helpers (isAjax(), isSecure(), baseUrl()) are also included, and request data can be injected explicitly for easy testing. Head to the GitHub page.

Route

jinexus-framework/jinexus-route provides route matching against a name-keyed table of route definitions, together with a redirect helper. getMatchRoute() resolves a URI against the route table and returns the matching entry. getRouteUri() resolves a route name back to its URI. getUri() derives the current request URI from $_SERVER by stripping the front-controller directory and query string. The Redirect helper sends Location headers for named routes (301/302) and terminates the request — with protected seams for testing. Head to the GitHub page.

Module Manager

jinexus-framework/jinexus-module-manager keeps an ordered registry of module namespaces and resolves any of them to a configuration array by convention. Register a namespace (e.g. Acme\Blog), and getConfig() instantiates Acme\Blog\Module and returns its config — resolution is independent of registration. Modules extend AbstractModule and override getConfig(): array to contribute routes, view paths, and services. The manager has zero external dependencies. Head to the GitHub page.

MVC

jinexus-framework/jinexus-mvc is the kernel that wires the four components above into a request-dispatch-render pipeline. ApplicationFactory::build() assembles module config aggregation (via ModuleManager), route matching (via Route), an HTTP container (via Http), and Whoops error handling into an Application instance. Calling run() dispatches the view, matches the route, instantiates the controller, calls the action, and renders the layout template — including a 404 path when no route matches. Pipeline properties (matchRoute, controllerName, actionName, etc.) are exposed via read-only PHP 8.5 property hooks. Head to the GitHub page.

Skeleton

jinexus-framework/jinexus-framework-skeleton is the official starter application. Use composer create-project to scaffold a new project with a pre-configured directory layout: Application\Module, an IndexController with a default indexAction(), route definitions, layout/error view templates, and a PHPUnit test suite. It is the recommended starting point for any new JiNexus project. Head to the GitHub page.

Community

Stay up to date on the development of JiNexus Framework and reach out to the community with these helpful resources.