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/`).
4.0 KiB
4.0 KiB
Project Documentation Index - TinyQC
Project Overview
- Type: Monolith (single cohesive codebase)
- Primary Language: PHP 8.1+
- Architecture: MVC (Model-View-Controller)
- Framework: CodeIgniter 4
- Database: SQL Server 2016+
Quick Reference
- Tech Stack: PHP 8.1, CodeIgniter 4, SQL Server, TailwindCSS, Alpine.js, DaisyUI
- Entry Point:
public/index.php - Architecture Pattern: Model-View-Controller (MVC)
Generated Documentation
Core Documentation
- Project Overview - Executive summary and technology stack
- Architecture - Detailed architecture documentation
- Source Tree Analysis - Annotated directory structure
- Development Guide - Setup, development commands, and best practices
Supplementary Documentation
- README.md - Original project readme
Documentation Guide
For New Developers
- Start with Project Overview to understand the system
- Review Architecture for component details
- Read Development Guide for setup instructions
- Use Source Tree Analysis for code navigation
For Feature Development
- Reference Architecture for patterns and conventions
- Check Source Tree Analysis for file locations
- Follow Development Guide for implementation steps
For API Development
- Review Architecture - API Design section
- Check existing API controllers in
app/Controllers/Api/ - Follow naming conventions from Development Guide
Technology Stack Reference
| Layer | Technology |
|---|---|
| Backend | PHP 8.1+ |
| Framework | CodeIgniter 4 |
| Database | SQL Server |
| Frontend | TailwindCSS + Alpine.js + DaisyUI |
| Icons | FontAwesome 7 |
| Testing | PHPUnit |
Key Directories
| Directory | Purpose | Documentation |
|---|---|---|
app/Config/ |
Configuration files | Source Tree |
app/Controllers/ |
Request handlers | Architecture |
app/Models/ |
Data models | Architecture |
app/Views/ |
UI templates | Architecture |
public/ |
Web root | Source Tree |
tests/ |
Unit tests | Development Guide |
Common Tasks
| Task | Documentation |
|---|---|
| Setup development environment | Development Guide - Installation |
| Add new feature | Development Guide - Adding New Features |
| Run tests | Development Guide - Running Tests |
| Database operations | Development Guide - Database Operations |
| Debug application | Development Guide - Debugging |
| Deploy to production | Development Guide - Deployment |
Module Documentation
Dictionary Management
- Manage departments, tests, and control parameters
- Controllers:
Dept.php,Test.php,Control.php - API:
DeptApiController.php,TestApiController.php,ControlApiController.php
Data Entry
- Record daily and monthly QC results
- Controller:
Entry.php - API:
EntryApiController.php
Reporting
- Generate quality control reports
- Controller:
Report.php
API Endpoints Quick Reference
| Endpoint | Description |
|---|---|
/api/dept |
Department CRUD |
/api/test |
Test CRUD |
/api/control |
Control CRUD |
/api/entry/* |
Entry operations |
See Architecture for detailed API documentation.
Documentation generated on 2026-01-20 For updates, run the document-project workflow