Skip to content

Introduction ​

The Labmin LIMS Framework is a modern PHP 8.2+ and Angular toolkit for building self-contained modules inside existing Labmin LIMS installations.

Instead of rewriting legacy LIMS applications from scratch, modern modules live alongside legacy pages under admin/Modules/<ModuleName>/ — sharing the existing session, sidebar, and MySQL/MariaDB database while giving you typed routing, declarative schemas, shadow-DOM Angular UIs, and SPA-style navigation.


How the pieces fit together ​

LayerPackagesRole
Routing & PlatformLIMS\Platform, labmin/routerLimsRouter handles attribute-based routing, constructor DI (DatabaseManager, CurrentUser), automatic per-request DB transactions, input normalization, and built-in Master admin pages (?feature=migrations, ?feature=access, ?feature=flags).
Frontend UIlabmin/fusion, @labmin/fusion-angular-uiControllers return Fusion::render(...) with typed props. Angular components mount inside a shadow root with Tailwind/daisyUI styling isolated from legacy CSS, and navigate without full-page reloads over X-App-Request.
Data & Validationlabmin/materialize, labmin/materialize-my-sql, labmin/database-managerDefine tables as PHP schema classes, generate and run SQL migrations from the browser, hydrate/validate #[DataObject] form inputs (with automatic 422 errors), and query through Platform\Repository.
Permissions, Flags & Fileslabmin/access-control, labmin/feature-flags, labmin/file-storageDeclare module permissions in access_config.php, toggle rollouts in flag_config.php, and handle authenticated file uploads/downloads via LimsFileStorage.

Core principles ​

  • Self-contained modules: Every module owns its Controllers/, Core/, Database/, UI/, access_config.php, and flag_config.php in one folder. Only code inside Export/ may be imported by other modules.
  • Clean separation of layers: Thin controllers parse requests and return FusionResponse, JsonResponse, or FileResponse. Business rules and authorization live in Core/Services/ (which never import from UI/), and SQL lives in Core/Repositories/.
  • Transactional by default: Every non-migration request runs inside a single database transaction — committing on 2xx and rolling back automatically on validation errors (422), HttpException (403/404/409), or uncaught exceptions.
  • Coexists with legacy LIMS: admin/engine.php detects Fusion/AJAX requests (X-App-Request: true) and routes them straight to the module's index.php, while full browser loads render seamlessly inside the existing LIMS shell.

Where to go next ​

Next: set up your local environment in Installation.

Labmin LIMS Module Developer Documentation