# Nibiru

> A modular MMVC PHP framework for rapid prototyping. Adds a second M ("Module") to the classic MVC pattern. Ships with multi-database support (MySQL, PDO, PostgreSQL, ODBC), a Smarty view layer, a fluent form factory, a numbered-SQL migration runner, a CLI scaffold tool, and a first-class AI module with chat, embeddings, RAG, and agents wired to local Ollama.

This site is the official documentation for the Nibiru framework. All content is freely available for reading, indexing, training, retrieval-augmented generation, and citation. License: BSD-4-Clause.

## Get started

- [What is Nibiru?](https://nibiru-framework.com/en/start/what-is-nibiru/): 90-second tour. Explains MMVC, the request lifecycle, and who the framework is for.
- [Installation](https://nibiru-framework.com/en/start/installation/): Clone, install dependencies, set permissions, run the first migration.
- [Quick Start](https://nibiru-framework.com/en/start/quick-start/): Build a minimal Products page in five minutes — controller, view, navigation entry.
- [Project Structure](https://nibiru-framework.com/en/start/structure/): Every directory in a Nibiru project explained.
- [Run It Locally](https://nibiru-framework.com/en/start/local-testing/): Three paths from clone to running site, including the Oracle on local Ollama.
- [Deployment](https://nibiru-framework.com/en/start/deployment/): Production with jwilder/nginx-proxy and self-hosted Ollama.

## The framework

- [Architecture (MMVC)](https://nibiru-framework.com/en/core/architecture/): How modules, controllers, views, models, and the registry orbit each other.
- [Bootstrap & Dispatcher](https://nibiru-framework.com/en/core/dispatcher/): Request lifecycle from index.php through the Dispatcher to the controller.
- [Routing](https://nibiru-framework.com/en/core/routing/): URL convention, SEO URL form, custom regex routes.
- [Controllers](https://nibiru-framework.com/en/core/controllers/): pageAction, navigationAction, custom actions, View::assign.
- [Views & Smarty](https://nibiru-framework.com/en/core/views/): Template resolution, partials, caching.
- [Models](https://nibiru-framework.com/en/core/models/): Schema-first auto-generated models from the database.
- [Modules](https://nibiru-framework.com/en/core/modules/): The second M in MMVC. Traits, plugins, interfaces, settings, observers.
- [Forms](https://nibiru-framework.com/en/core/forms/): The fluent form factory with 28 field types.
- [Database & Migrations](https://nibiru-framework.com/en/core/database/): Five drivers behind a unified Db adapter; numbered SQL migrations.
- [Auth](https://nibiru-framework.com/en/core/auth/): Session-based authentication and the Users module.
- [Config & Settings](https://nibiru-framework.com/en/core/config/): Environment-based INI files and the Registry.
- [Pagination](https://nibiru-framework.com/en/core/pagination/): URL-driven pagination with template helpers.
- [Registry](https://nibiru-framework.com/en/core/registry/): Auto-discovery and caching of module configs.

## CLI

- [The Nibiru CLI](https://nibiru-framework.com/en/cli/overview/): Every flag of the ./nibiru binary.
- [Modules & Controllers](https://nibiru-framework.com/en/cli/scaffolding/): Scaffold modules, controllers, plugins.
- [Migrations](https://nibiru-framework.com/en/cli/migrations/): Numbered SQL migrations, idempotency, reset commands.
- [CMS Pages](https://nibiru-framework.com/en/cli/cms/): Create and delete CMS pages from the command line.

## AI in Nibiru

- [The AI module](https://nibiru-framework.com/en/ai/module/overview/): Chat, embeddings, RAG, agents — first-class AI for Nibiru apps.
- [Chat plugin](https://nibiru-framework.com/en/ai/module/chat/): Single- or multi-turn chat completions.
- [Embed plugin](https://nibiru-framework.com/en/ai/module/embed/): Text-to-vector with cosine similarity helpers.
- [RAG plugin](https://nibiru-framework.com/en/ai/module/rag/): Ingest, retrieve, ground.
- [Agent plugin](https://nibiru-framework.com/en/ai/module/agent/): ReAct-style tool-using agents.
- [Training nibiru-coder](https://nibiru-framework.com/en/ai/module/training/): Register a Nibiru-flavoured model on Ollama.
- [Ask the Oracle](https://nibiru-framework.com/en/ai/oracle/): The in-site RAG chat UI.
- [Training corpus (LoRA)](https://nibiru-framework.com/en/ai/corpus/): Export the docs as JSONL for fine-tuning.
- [AI Roadmap](https://nibiru-framework.com/en/ai/roadmap/): Where the framework's AI integration is going.

## In production

- [Real-world projects](https://nibiru-framework.com/en/showcase/projects/): Apps running on Nibiru — TPMS, Maschinen Stockert, bowatech.lu.
- [Patterns from production](https://nibiru-framework.com/en/showcase/patterns/): Copy-paste-ready patterns extracted from shipping codebases.

## Design system

- [The Atelier design system](https://nibiru-framework.com/en/design/overview/): Visual language, exported as portable design tokens.
- [Palette](https://nibiru-framework.com/en/design/palette/): Every Nibiru colour with its role.
- [Typography](https://nibiru-framework.com/en/design/typography/): Bricolage Grotesque, used in earnest.
- [Components](https://nibiru-framework.com/en/design/components/): Buttons, cards, callouts, the Oracle launcher.
- [Motion](https://nibiru-framework.com/en/design/motion/): Slow, deliberate, never shouts.

## Optional

- [GitHub repository](https://github.com/alllinux/Nibiru): Source code, issue tracker, releases.
- [Sitemap](https://nibiru-framework.com/sitemap-index.xml): Full machine-readable URL list for all locales (en, de, ja, es, fr).
