tinyqc/docs/project-overview.md
mahdahar 14baa6b758 docs: add comprehensive documentation and refactor API structure
This commit introduces a complete documentation suite, refactors the API layer for
better consistency, and updates the database schema and seeding logic.

Key Changes:
- Documentation:
  - Added `CLAUDE.md` with development guidelines and architecture overview.
  - Created `docs/` directory with detailed guides for architecture, development,
    and source tree analysis.
- Database & Migrations:
  - Implemented `RenameMasterColumns` migration to standardize column naming
    (e.g., `name` -> `dept_name`, `name` -> `control_name`).
  - Added `CmodQcSeeder` to populate the system with realistic sample data
    for depts, controls, tests, and results.
- Backend API:
  - Created `DashboardApiController` with `getRecent()` for dashboard stats.
  - Created `ReportApiController` for managed reporting access.
  - Updated `app/Config/Routes.php` with new API groupings and documentation routes.
- Frontend & Views:
  - Refactored master data views (`dept`, `test`, `control`) to use Alpine.js
    and the updated API structure.
  - Modernized `dashboard.php` and `main_layout.php` with improved UI/UX.
- Infrastructure:
  - Updated `.gitignore` to exclude development-specific artifacts (`_bmad/`, `.claude/`).
2026-01-20 14:44:46 +07:00

3.2 KiB

TinyQC - Quality Control Management System

Executive Summary

TinyQC is a CodeIgniter 4 PHP application designed for quality control data management in laboratory settings. The system provides comprehensive tools for managing departments, tests, control parameters, daily/monthly entries, and generating QC reports. Built with a modern frontend stack (TailwindCSS, Alpine.js, DaisyUI) and SQL Server database.

Repository Type: Monolith (single cohesive codebase)


Technology Stack

Layer Technology Version
Backend PHP 8.1+
Backend Framework CodeIgniter 4 ^4.0
Database SQL Server 2016+
Frontend TailwindCSS Latest
Frontend Alpine.js Latest
UI Components DaisyUI Latest
Icons FontAwesome 7
Testing PHPUnit 10.5.16
Development Composer Latest

Architecture Classification

  • Architecture Pattern: MVC (Model-View-Controller)
  • Application Type: Backend Web Application
  • Project Type: Backend (PHP/CodeIgniter 4)
  • Entry Point: public/index.php

Core Modules

1. Dictionary Management

  • Departments (Dept): Manage department/category entries
  • Tests: Maintain test parameters and specifications
  • Controls: Configure control standards and limits

2. Data Entry

  • Daily Entry: Record daily QC test results
  • Monthly Entry: Aggregate monthly data and comments

3. Reporting

  • Generate quality control reports based on date ranges, test types, and control parameters

4. Comments System

  • Add notes and comments to results

Key Features

  • CRUD operations for departments, tests, and controls
  • Daily and monthly quality control data recording
  • Comment system for results annotation
  • Report generation and analysis
  • RESTful API endpoints for all modules
  • Responsive UI with modal-based interactions

Project Structure Overview

tinyqc/
├── app/
│   ├── Config/          # Configuration files
│   ├── Controllers/     # Application controllers
│   │   └── Api/         # API controllers
│   ├── Models/          # Database models
│   └── Views/           # View templates
├── public/              # Web root
├── tests/               # Unit tests
├── writable/            # Writable directory
├── _bmad/               # BMAD development artifacts
├── composer.json
└── phpunit.xml.dist

Quick Reference