Skip to content
Nibiru docsv0.9.2

What is Nibiru?

A 90-second tour of Nibiru — what MMVC means, what's in the box, and who it's for.

Stable Reading time ~ 2 min Edit on GitHub

Nibiru is a modular MVC PHP framework — MMVC — built for rapid prototyping without giving up the discipline of a real framework. It’s small enough to fit in your head, and powerful enough to back production apps you’ll find on the Showcase page.

The name is a wink at Babylonian astronomy: Nibiru was the celestial crossing-point associated with Marduk, the chief god of Babylon. The framework runs on the same idea — a single point through which your modules, controllers, views and data cross paths.

Routing & dispatchURL-pattern + SEO-URL parsing, soft 404, automatic action lookup.
MVC + a second MControllers, Views (Smarty), Models, plus first-class Modules with traits, plugins, interfaces, settings and an observer pattern.
Multi-databaseNative MySQL, PDO, PostgreSQL via libpq (psql/postgresql) and ODBC, all behind a unified Db adapter.
Forms28+ field types built fluently with Form::addInputType…() and a layout helper for divs.
PaginationURL-aware (/controller/action/page/N) with template helpers.
AuthSession-based with AES-decrypted credentials, login form prebuilt by the Users module.
CLI (./nibiru)Scaffolds modules, controllers, plugins; runs migrations; clears caches; bootstraps folder permissions; manages CMS pages.
Composer-readySmarty 3, PHPMailer, Guzzle, Laminas Diactoros, OpenAI client, Elasticsearch client, QR codes, barcodes, blockchain tools.

Most PHP frameworks give you Model–View–Controller. Nibiru adds a second M: Module.

A module is a self-contained unit that can hold:

  • a main class implementing IModule (and optionally SplSubject for the observer pattern),
  • traits for reusable behaviour,
  • plugins for stateless services injected into controllers,
  • interfaces for contracts,
  • settings as .ini files auto-discovered by the Registry.

Modules promote loose coupling and let you keep “users”, “billing”, “shop”, “tpms” etc. in their own folders without polluting application/controller/.

application/module/users/
├── users.php # main class (implements IModule, SplSubject)
├── interfaces/ # contracts
├── plugins/ # stateless services (User, Acl…)
├── settings/ # .ini config auto-loaded by the Registry
└── traits/ # reusable methods (loginForm, userForm…)
flowchart LR
A[index.php] --> B[core/framework.php]
B --> C[Dispatcher::run]
C --> D[Router::route]
D --> E[Auto::loader<br/>models + modules]
E --> F[applicationController.php]
F --> G[navigationAction]
G --> H[customAction?]
H --> I[pageAction]
I --> J[Display::display<br/>Smarty render]

Every request runs navigationAction() then (optionally) the matched _actionAction and finally pageAction(). If the controller file isn’t found, Nibiru renders the configured error template — a soft 404.

  • Hackers and prototypers who want to ship a working web app this weekend.
  • Solo founders and small teams maintaining real production apps without bringing the weight of a megaframework.
  • PHP-curious teams who want PostgreSQL, MySQL and a CLI from day one.

Ready? Install Nibiru →