# Features — stock_system

Evidence date: 2026-10-02. Source: `main` at `02b62e87`.

Status words: **Current** (reachable in this tree), **Completed** (a repo task log says done), **Deferred**, **Absent** (route or doc names it; class or project is missing), **Unused** (class exists, no caller found).

## Current — public storefront

| Feature | Status | Evidence |
|---|---|---|
| Home at `/` | Current | `Storefront\Home::index`. Staff login is `/login`, not `/` |
| Faceted catalogue at `/search` | Current | `CatalogueQuery`. Filters: category, sub-category, item, gender, era, text. Default 40 per page |
| Horizontal filter bar, 5 products per row | Completed (2026-06-08) and Current | `README.md` recent changes; views under `app/Views/storefront/` |
| Product detail `/item/{slug}` | Current | `Storefront\Product::show`. Price hidden in `product.php` |
| Session cart | Current | `CartService`, routes `cart`, `cart/add`, `cart/update`, `cart/remove` |
| Enquiry checkout and confirmation | Current | `EnquiryService`, `enquiry/submit`, `order/confirmed/{segment}` |
| Dev catalogue seeder | Current as a command, not production data | README: `php spark db:seed ShopCatalogueSeeder` |
| Dev sync-log demo | Current | `app/Commands/ShopSyncDemo.php`, `php spark shop:sync-demo` |

## Current — shop data and sync log

| Feature | Status | Evidence |
|---|---|---|
| Tables `shop_products`, `shop_product_images`, `shop_orders`, `shop_order_items` | Current | Migration `2026-06-08-100000_CreateShopTables.php` |
| Extra product columns (`price`, `size`, `featured_sort`, `web_notes`, `image_url_*`) and `shop_sync_log` | Current | Migration `2026-06-08-110000_AddShopSyncLogAndProductColumns.php` |
| `sqlexpress_product_id` unique match key | Current | Migration `2026-06-17-100000_AddSqlexpressProductIdToShopProducts.php` |
| `POST /api/shop-sync/log` | Current | `ShopSyncApi`, `ShopSyncAuth`, `ShopSyncService::recordRun` |
| Settings → Shop Sync page | Current | `ShopSync` controller, `ShopSyncMenuSeeder` |
| Product upsert from SQL Express | Deferred | Contract in `docs/shop_sync_contract.md`. No writer in this repo |
| .NET Sync Coordinator | Absent from this tree | Described in `docs/sync_docs/`. No `.sln` / `.csproj` |
| Staff UI to edit visibility, images, web copy, enquiries | Deferred | `docs/tasks/TASK-015.md` Epic 6 |
| Image publish pipeline | Deferred (partial columns only) | Epic 7. `image_url_*` exist |

## Current — staff platform

| Feature | Status | Evidence |
|---|---|---|
| Username/password login, logout, inactive-user rejection | Current | `Welcome` |
| Email 2FA when setting `2FA` is on | Current | `Welcome::index`, `confirmCode` |
| TOTP setup and disable on the user profile | Current | `Users::totp*`, `TotpService` |
| Forgot / reset password | Current | `Welcome` reset routes, migration `2026-04-15-093426_AddPasswordResetTable.php` |
| Login history and blocked users | Current | `LoginHistory`, `BlockedUsersModel`, system settings routes |
| User and role admin | Current | `Users` routes, `user_role` |
| Menu management and CRUD generator | Current | `Developers\MenuManagement`, `Developers\CRUDGenerator` |
| Theme customise and logo | Current | `Developers\Customise` |
| Staff dashboard charts | Current | `Home::getDashboardStats` and document chart routes |
| Document upload, search, types, categories, share, audit | Current | `Documents`, `Admin\Documents`, `Categories` |
| Viewer document assignments and time windows | Current | `user_documents`, `TimeAccessFilter` |
| Document year and per-user type tabs | Current | Migrations dated 2026-05-27 and 2026-05-28 |
| OCR and optional semantic search | Current code, optional binaries | `OcrLibrary`, `PdfTextExtractor`, `MySQLVectorStore`, `README.md` |
| Mailbox tickets over IMAP | Current | `Mailbox` controller, mailbox libraries, `mailbox:poll` |
| Bulk email campaigns, CSV import, templates, tracking pixels | Current | `BulkEmail`, `EmailTracking`, migrations `2026-05-14-*` |
| AI template assistant for bulk email | Current | `BulkEmail::aiChat`, `BulkEmailAiTemplateAssistant` |
| WhatsApp support desk | Completed in `docs/index.md` (TASK-013) and Current | `Support`, `SupportWebhook`, support libraries |
| Scheduler UI, run-now, interval and cron expression | Completed in `docs/index.md` (TASK-014) and Current | `Scheduler`, `SchedulerService` |
| Email queue senders as scheduler handlers | Current | `SchedulerHandlers`: `sendScheduledEmails`, `getAllUnsentEmails` |
| Server resource monitor | Current | `ServerMonitoring`, `monitor:system` |
| Chat and ChatGPT screens, RAG status page | Current | `Chat`, `ChatGPT`, `RagStatus` |
| System settings (cron, holidays, templates, general settings, ChatGPT settings) | Current | `SystemSettings` |

## Absent or unused

| Feature | Status | Evidence |
|---|---|---|
| `Products`, `Orders`, `LabelStatus`, `LabelUserGroups`, `LabelEmailTemplates`, `GetXMLData`, `Company`, `FaultFinder`, `Invoices` controllers | Absent | Routes in `Routes.php`. No class files |
| `organisations` REST resource and `store-api` resource | Absent | Routes at the bottom of `Routes.php`. Seed `Organisations.php` and migration `2022-11-20-124016_Organisations.php` exist. No `Organisations` controller |
| Uninvoiced-orders report | Commented out | Route is commented in `Routes.php` |
| Invoice list route | Commented out | Same file |
| `Soap::processSoapRequest` and `Rest::processRestRequest` | Unused | PnP portal EDI client code. No caller under `app/` |
| Bitbucket Pipelines | Absent | Claimed in `docs/overview.md`. No pipeline YAML |
| Stock levels, reservations, SKUs as a data model | Absent by design in shop docs | `docs/db_docs/shop_products.md`. `code` and `barcode` are the identifiers |

## Changed relative to the admin starter

**Inferred** from README "Recent Changes" and route order, not from a full git log:

- Public storefront replaced `/` as the default page. Staff home moved to `/home`. Login moved to `/login`.
- Shop sync log and product office columns were added after the first shop tables (same day, 2026-06-08, plus `sqlexpress_product_id` on 2026-06-17).
- Support desk, scheduler, mailbox, and bulk email were added through May–June 2026 migrations.

## Removed

No feature is marked removed in a changelog entry that was verified against a deleted module. Commented routes (invoices, uninvoiced orders) are **Absent**, not proven deletions of previously shipped screens.

Legacy Wessels `products_master` is named in `docs/db_docs/shop_products.md` as something orphaned controllers would have used. Those controllers are not in this tree. **Documented** as not modeled here.
