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

55 lines
1.7 KiB
Markdown

# CLQMS Project Overview
## Project Purpose
CLQMS (Clinical Laboratory Quality Management System) is a headless REST API backend for clinical laboratory workflows. It provides comprehensive JSON endpoints for:
- Patient management
- Order/test management
- Specimen tracking
- Result management and verification
- Reference ranges
- Laboratory instrument integration (Edge API)
## Tech Stack
- **Language**: PHP 8.1+
- **Framework**: CodeIgniter 4 (API-only mode)
- **Database**: MySQL with MySQLi driver
- **Authentication**: JWT (JSON Web Tokens)
- **Testing**: PHPUnit 10.5+
- **Documentation**: OpenAPI/Swagger YAML
## Architecture
- **API-First**: No view layer, headless REST API only
- **Stateless**: JWT-based authentication per request
- **UTC Dates**: All dates stored in UTC, converted for display
- **PSR-4 Autoloading**: `App\``app/`, `Config\``app/Config/`
## Key Directories
```
app/
Controllers/ # API endpoint handlers
Models/ # Database models
Libraries/ # Helper classes (Lookups, ValueSet)
Database/
Migrations/ # Schema migrations
Seeds/ # Test data seeders
Helpers/ # json_helper.php, utc_helper.php
Traits/ # ResponseTrait
Config/ # Configuration files
Filters/ # AuthFilter, CORS
public/ # Web root
paths/ # OpenAPI path definitions
components/schemas/ # OpenAPI schemas
tests/
feature/ # Feature/integration tests
unit/ # Unit tests
_support/ # Test support files
```
## Key Dependencies
- `codeigniter4/framework` - Core framework
- `firebase/php-jwt` - JWT authentication
- `fakerphp/faker` - Test data generation (dev)
- `phpunit/phpunit` - Testing (dev)