Read this when you need the repository map, boot order, or generated-file boundaries. # File Structure | Path | Purpose | |---|---| | `index.php` | HTTP/CLI bootstrap: Composer autoload, F3 singleton, encrypted runtime config, plugin composition, then `run()`. | | `composer.json` | PHP 8.5 and Fat-Free Framework dependencies; PSR-4 maps `OpenMind\` and `Modules\`. | | `cfg/config.ini` | Plaintext source of F3 globals and MySQL DSN; used to produce the runtime config. | | `cfg/config.bin` | Runtime configuration consumed by `index.php`; generated locally and not tracked. | | `scripts/generate-config-bin.sh` | Creates `cfg/config.bin` from `cfg/config.ini` only if no target exists. | | `src/OpenMind/System/` | Bootstrap, plugin discovery, framework services, mappers, roles, notifications, and error handling. | | `src/OpenMind/Api/` | API route registry and JSON controllers. | | `src/OpenMind/Admin/` | Administration plugin that registers the `admin` role and menu hierarchy. | | `src/Modules/Blank/` | Example plugin registering the `demo` role and menu entry. | | `ui/app/` | Vite React source application. | | `ui/app/src/api/client.js` | Same-origin API client and in-memory CSRF token holder. | | `ui/app/src/features/` | Authentication, shell, administration, notification, home, and demo UI features. | | `assets/app/` | Vite build output, including hashed JS/CSS and the manifest; do not edit manually. | | `assets/images/` | Static images referenced by legacy menu entries and React pages. | | `vite.config.js` | Builds `ui/app` into `assets/app` with base `/phengine/assets/app/` and suppresses Rollup `"use client"` module-directive warnings. | | `omlink.sql` | MySQL schema and sample data dump. | ## Boot and Request Flow 1. `index.php` validates PHP, decrypts `cfg/config.bin`, and invokes `ApplicationComposition` over `src/`. 2. Composition boots `System` first, then each discovered same-name directory initializer that extends `PluginStrategy`. 3. `System` configures F3 errors, cache, and the `DB` connection; `Api` registers JSON routes. 4. Vite-built React assets load under the configured base path and call `/api/v1` through `ui/app/src/api/client.js`. See [module-index.md](module-index.md), [api-routes.md](api-routes.md), and [rules/add-plugin.md](rules/add-plugin.md).