clqms-be/.serena/memories/project_overview.md

32 lines
1.7 KiB
Markdown
Raw Normal View History

# CLQMS Project Overview
- **Name:** CLQMS (Clinical Laboratory Quality Management System)
- **Type:** Headless REST API backend (no view layer for product UX)
- **Purpose:** Manage clinical laboratory workflows (patients, orders, specimens, results, value sets, edge/instrument integration) via JSON APIs.
- **Framework/Runtime:** CodeIgniter 4 on PHP 8.1+
- **Database:** MySQL (legacy PascalCase column naming in many tables)
- **Auth:** JWT (firebase/php-jwt), typically required for protected `/api/*` endpoints.
## Architecture Notes
- API-first and frontend-agnostic; clients consume REST JSON endpoints.
- Controllers delegate business logic to models/services; avoid direct DB query logic in controllers.
- Standardized response format with `status`, `message`, `data`.
- ValueSet/Lookups system supports static lookup data and API-managed lookup definitions.
- OpenAPI docs live under `public/api-docs.yaml`, `public/paths/*.yaml`, `public/components/schemas/*.yaml` and are bundled into `public/api-docs.bundled.yaml`.
## High-Level Structure
- `app/Config` - framework and app configuration (routes, filters, etc.)
- `app/Controllers` - REST controllers
- `app/Models` - data access and DB logic
- `app/Services` - service-layer logic
- `app/Filters` - auth/request filters
- `app/Helpers` - helper functions (including UTC handling per conventions)
- `app/Libraries` - shared libraries (lookups/valuesets, etc.)
- `app/Traits` - reusable traits (including response behavior)
- `tests/feature`, `tests/unit` - PHPUnit test suites
- `public/paths`, `public/components/schemas` - modular OpenAPI source files
## Key Dependencies
- `codeigniter4/framework`
- `firebase/php-jwt`
- `mossadal/math-parser`
- Dev: `phpunit/phpunit`, `fakerphp/faker`