# Features — siliconscan

Evidence date: 2026-10-03. Revision: `master` `56c90dc0` (2024-01-31, "latest code base , copy of label system").

The README lists four starter features. The label workflow is implemented and is not named in the README. Planned features written as a roadmap: **none found**. The README points at a Jira board and a wiki. Those pages were not read.

No feature is marked removed. The single commit does not show a deletion history.

## Current features (master)

| Feature | What it does | Evidence | Status |
|---|---|---|---|
| Login | Email plus password, session, redirect to home | `Welcome::index` | Implemented |
| Logout | Destroys the session | `Welcome::logout` | Implemented |
| Self-registration | Unique email, matching passwords, role forced to 1 | `Welcome::registration` | Implemented. README lists it |
| Forbidden page | Shown when menu access is denied | `Welcome::forbiddenPage`, route `blocked` | Implemented |
| Dashboard counts | Submission, pending, approved, provision, rejected, contested | `Home::index` | Implemented |
| App-session charts | Counts and charts from `app_session` on the same dashboard | `Home::index`, `AppSessionModel` | Implemented. Credit percentage is hardcoded to 0 |
| Label list | Role-filtered table of labels | `Labels::index`, `label/labelList.php` | Implemented |
| Label form | Admin form or member form, with files, history, notes, emails, provisions | `Labels::labelForm` | Implemented |
| Create label from PDFs | Inserts label status 1 and file rows | `Labels::createLabel`, `LabelModel::createLabelFiles` | Implemented |
| Resubmit a file version | New file row, version + 1, note | `resubmitLabelFile` | Implemented. Previous file stays active (TODO in the model) |
| Edit wine fields | Barcode, alcohol %, warning, bottle size, year | `updateLabelData` | Implemented |
| Delete a label file | Model `deleteLabelFiles` | `Labels::deleteLabelFile` | Implemented |
| Approve | Status 5, or 6 when provisions are flagged | `approveLabel` | Implemented |
| Reject | Status 4 and a note | `rejectLabel` | Implemented |
| Contest a rejection | Status 7 and a note. No email | `contestRejectedlabel` | Implemented |
| Per-file approve or reject | `file.file_approved` | `labelFileApprovalStatus` | Implemented |
| Manual status change | Sets any posted status id | `manualLabelSubmissionStatusUpdate` | Implemented |
| Previous file versions | JSON list by label and type | `getPreviousLabelFileVersions` | Implemented |
| Reassign meeting group | Batch update `meeting_group_id` | `reassignToMeetingGroup` | Implemented |
| Approval certificate PDF | Wine and Spirit Board HTML to `uploads/approvalcerts/` | `labelApprovalPDF` | Implemented. Checkbox mapping disagrees with status 5. See PRD W8 |
| Label statuses admin | List, create, update name, group, parent. Role 1 only | `LabelStatus.php` | Implemented |
| Meeting groups | Create, rename, activate, assign users in roles 1, 2, 3. Role 1 only | `LabelUserGroups.php` | Implemented |
| Email templates | Create and update. Role 1 sees the page; others get the 404 view | `LabelEmailTemplates.php` | Implemented |
| Outbound email | SMTP, placeholders, logo, tracking pixel, `sent_queue` | `Email.php`, `mail_helper.php` | Implemented |
| Open tracking pixel | Logs the code when the viewer is logged out | `EmailPixelTracking.php` | Implemented |
| Users, roles, menu grants | CRUD and permission toggles | `Users.php`, routes under `users/` | Implemented. README lists authorization |
| Menu management | Create category, menu, submenu | `Developers/MenuManagement.php` | Implemented. README lists it |
| CRUD generator | Developer screen | `Developers/CRUDGenerator.php`, route `crudGenerator` | Implemented as a screen. Generator behaviour was not executed |
| User profile | View and update | `Users::userProfile`, `updateUserProfile` | Implemented |
| System settings | Renders `label_status` rows | `SystemSettings::index` | Implemented |
| SAWIS header and menu | Logo and links to SAWIS Online modules. Hidden when role is 5 | `sawis-header.php`, `sawis-menu.php` | Implemented. The linked apps are not in this repo |
| Organisations API | Login and CRUD with a bearer token | `Organisations.php` | Implemented |
| Car catalogue | List, form, spreadsheet-style import into cost categories, image and detail update | `Car.php` | Implemented |
| Car session API | Stepped methods from login through recommend, apply, and fix-my-credit | `CarApi.php` | Implemented. Not registered as explicit routes. Auto-route can expose `CarApi` if the menu gate allows segment `carapi` |
| Master file | List, taste notes, history, Overland import, ModelliQ import, CSV export | `MasterFile.php` | Implemented |
| Site health list | Index and `sitelist` | `SiteHealth.php` | Implemented. Health rules were not read beyond the controller existing |
| Uploaded files and media | List, create, update, upload | `UploadedFile.php`, `MediaFile.php` | Implemented |
| Selenium `.side` runner | Upload, run one, run active, activate, deactivate, write `test_log` | `Test.php` | Implemented. `SIDEFILEPATH` is undefined in the tree that was searched |
| ChatGPT page | Form and `chatGPT/sent` | `ChatGPT.php`, `chatgpt_helper.php` | Implemented. API key in `env` is commented out |
| Database admin screen | `DbAdmin` index and sitelist | `DbAdmin.php` | Implemented |
| Adminer source | Full Adminer script stored as a view | `app/Views/projects/adminer.php` | Present. No controller was found that returns this view |
| Developer database browser | `developers/dbTableDataView` | `DbTableDataView.php` | Present |
| SonarQube scan | Pipeline on `master` | `bitbucket-pipelines.yml`, `sonar-project.properties` | Configured. Last scan result is **Unknown** |
| PHPUnit scaffold | Example tests and a health test | `tests/`, `phpunit.xml.dist` | Present. Not a product suite |

## Starter features named in the README

| README item | In the code |
|---|---|
| Authentication | `Authentication` filter and `Welcome::index` |
| Authorization | `Authorization` filter and `user_access` |
| User registration | `Welcome::registration` |
| Menu management with auto create controller and view file | Menu routes exist. Auto-creation of a controller file was not confirmed by reading `MenuManagement` end to end |

## Completed features

Nothing in the repository is marked completed or shipped as a release. The label migrations through 2024-01-29 are in the same commit as the controllers that use them, so the label workflow on `master` is the current tree, not a closed milestone.

## Planned features

No in-repo roadmap. Unfinished notes that are still in code:

| Note | Where |
|---|---|
| Tamper protection breaks create and is commented out | `Labels::createLabel` |
| Maybe set the replaced file inactive | `LabelModel::resubmitLabelFile` |
| Jira board SI and wiki space AO | `README.md` links only |

## In development

No branch other than `master`. No in-progress marker in the tree.

## Recently changed

The only commit is the 2024-01-31 copy. Inside that tree, the newest migrations (2024-01-18 to 2024-01-29) add `sent_queue`, meeting group and provisions on `label`, and a tracking code on the queue.

## Deprecated or leftover

These are still reachable as code. They are called leftover because they do not match the label letterhead or the README, and because names collide with an earlier product (cars, incidents, app sessions).

| Item | Why it looks leftover | Evidence |
|---|---|---|
| Car costs and `CarApi` steps | Vehicle range, mileage, affordability, "fix my credit" | `Car.php`, `CarApi.php`, `car_*` tables |
| Dashboard app-session widgets | Credit math is commented out and forced to 0 | `Home::index` |
| Organisations list key `incident_type` | Response name is not "organisations" | `Organisations::index` |
| Salesforce helper | Body commented out | `salesforce_helper.php` |
| Africa's Talking helper | Body commented out | `africastalking_helper.php` |
| `Users_old.php`, `Routes_old.php`, `Filters_old.php` | Filenames | `app/Controllers`, `app/Config` |
| Cronjob tables | `cronjob_actions`, `cronjob_log` | Migrations. No spark command directory was found that runs them |
| Adminer view | Not referenced by a controller | `app/Views/projects/adminer.php` |

Treating any of these as retired product decisions would be an inference. Confirm before deleting them.

## Not in the committed tree

| Item | Note |
|---|---|
| `sonarqube_scan.bat` | Listed when the onboarding task was created. Absent at `56c90dc0` |
| `composer.lock` | Absent |
| Label status seed data | Table exists. No seeder inserts the names the dashboard assumes |
