MMOframework
Why AI Playground Libraries Developers Agency
FR EN
Build a project live
Getting started · beginner

What MMOFramework is

  • 10 min
Packages instead of composer, the hub, projects, libraries and modules, and the two modes. - **You will know:** the words the rest of the guides use, and why the framework is laid out the way it is. - **You need:** nothing. Ten minutes of reading, no code. ## 1. A framework split into libraries MMOFramework is a PHP 8.3+ framework (namespace `MMO\`) made of libraries that work together. Each library is its own git repository: `mmo.core` (the application, routing, entities, events), `mmo.client` (pages, `.jhs` elements, the design system), `mmo.pdo` (SQLite and MySQL), `mmo.oauth` (users and rights), `mmo.admin` (deployment), and the others. An application takes only the ones it needs. There is no composer and no autoloader looking for your classes. A library is described by its manifest, `mmo.json`: its name, its version, its namespace, what it depends on. Each one declares a library at a major version, such as `"mmo.core": "21.*"`. ## 2. The hub The **hub** is a clone of the MMOFramework repository: every library, mounted as a git submodule under `libs/`, and an application that lists them all with their documentation, their demo and the state of their repository. It is where you develop: your projects run on the libraries of its `libs/`, through a link. It also holds the command line, `php tools/mmo.php`: creating a project, a library or a module, checking what a library is missing, and `verify`, the command that says whether a change is done. ## 3. Projects, libraries and modules Every `mmo.json` says which of three kinds of code it is. That decides who a change concerns. | Kind | `"type"` | What it is | A change of it concerns | |---|---|---|---| | **Project** | `project` | a web application: a repository of its own, outside the hub | that project | | **Library** | `library` | shared code of the framework, in the hub's `libs/` | every project that uses it | | **Module** | `module` | a library of one project only, in its `modules/` | that project only | A project can have **variants**, one per client: the same code, deployed to several servers, each with the modules it includes. ## 4. Two modes, decided by the tree An application runs in one of two modes: - **dev**: a developer's checkout. The libraries run from their sources, a page shows its log in a console drawer, the stylesheet is compiled again when you edit it. - **prod**: a release. The libraries and the project run from `.phar` packages built by mmo.admin. The mode is not read from the host name. A release never contains `src/`, so a folder with `src/` is a checkout, in dev mode, whether it runs on a laptop, on a server or on the command line. ## 5. Conventions you will meet everywhere - **Singletons, not `new`.** Services are shared instances: `Application::Shared()`, `Theme::Shared()`, your own `Company::Shared()`. Their public properties are set from the configuration. - **The configuration is keyed by class name.** `"MMO\\client\\Theme": {"pages": [...]}` configures the Theme. - **Path aliases.** `{root}`, `{bin}`, and one per package (`{AcmePortal}` for your project's `src/`) work in a checkout and in a release alike: `\MMO\filename('{AcmePortal}/pages')`. - **Every class is required by hand**, by its package's `src/bootstrap.php`. ## 6. Built for AI agents Every library documents itself for agents as well as for people. The framework's MCP server lets an agent search the documentation and describe any class, and a project comes with an `AGENTS.md` giving its rules. The same documentation is on this site, in the Developers section. ## Going further - Next: **Install the hub**, then **Your first project**. - [Creating a library](https://mmoframework.fr/en/documentation/mmo.core/NewLibrary.md): a library's manifest and layout in detail.
Your next step

Try it yourself, or build the first one with us.

I'm a developer

Try it now. Nothing to install, nobody to call.

Build a project live

Read the guides

I lead a team

A working prototype of your AI product, on your data, in one week.

Prototype in a week

Open the page for your team