Appearance
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
| Layer | Packages | Role |
|---|---|---|
| Routing & Platform | LIMS\Platform, labmin/router | LimsRouter 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 UI | labmin/fusion, @labmin/fusion-angular-ui | Controllers 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 & Validation | labmin/materialize, labmin/materialize-my-sql, labmin/database-manager | Define 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 & Files | labmin/access-control, labmin/feature-flags, labmin/file-storage | Declare 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, andflag_config.phpin one folder. Only code insideExport/may be imported by other modules. - Clean separation of layers: Thin controllers parse requests and return
FusionResponse,JsonResponse, orFileResponse. Business rules and authorization live inCore/Services/(which never import fromUI/), and SQL lives inCore/Repositories/. - Transactional by default: Every non-migration request runs inside a single database transaction — committing on
2xxand rolling back automatically on validation errors (422),HttpException(403/404/409), or uncaught exceptions. - Coexists with legacy LIMS:
admin/engine.phpdetects Fusion/AJAX requests (X-App-Request: true) and routes them straight to the module'sindex.php, while full browser loads render seamlessly inside the existing LIMS shell.
Where to go next
- Installation — Configure the Labmin Gitea registry, install the PHP and Angular Fusion packages, wire
admin/engine.php, and run Vite locally. - Build Your First Module — Walk through building a module end to end, from a 3-file Fusion view to migrations, repositories, forms, permissions, and submodules.
- Deploy to Production — Learn how CI builds and swaps
dist/andvendor/, plus the post-deploy Master checklist. - Core Concepts — Explore the full Request Lifecycle, Module Architecture, and Database & Migrations.
Next: set up your local environment in Installation.