# Features — edi_shopfront (EDI ShopFlow / Transactflow Shopfront)

Evidence date: 2026-10-16.

Source: `git@bitbucket.org:overdrive/edi_shopfront.git`, `main` at `9d1d726` (2025-11-24).

Status values: **Current** (present and wired), **Completed** (no changelog; treated as delivered when fully wired), **In development** (TODO or stub still in the tree), **Planned** (named as future and not built), **Changed** (recent relative to older starter docs), **Deprecated / removed** (left in tree but not on the active path), **Unknown** (needs a person).

There is no features catalogue or changelog in the source repository. `README.md` "Features" lists only authentication, authorization, user registration, and menu management. `overview.md` infers features from Composer packages and is not domain-accurate for AWS/testing.

## Current — shop and ordering

| Feature | What it does | Evidence |
|---|---|---|
| Buyer shop shell | Browse products in store context | `Products.php`, `app/Views/shop/` |
| Multi-cart | Multiple carts, combine carts | `Carts.php`, cart migrations |
| Standard order create | Create orders from cart items, group by seller company | `Orders::createOrder` |
| Scheduled orders | Order date / scheduled status support | `Orders` + `OrdersModel` status `Scheduled` |
| JAB multi-store orders | Distribute quantities across stores | `JabOrders.php`, order type fields |
| Order history / reorder | History views; reorder flows | `Orders` routes under `shop` |
| Regrets | Item/order regret status; add regrets back to cart | `OrdersModel` / `OrderItemsModel`, shop routes |
| Print / export orders | Buyer-side print/export | shop order routes |
| External TAF submission | Submit orders to StoreFront API | `ExternalOrderService.php`, `StoreApi.php` |
| Failed submission retry | Retry failed external submissions | failed-order routes + service |
| Circuit breaker | Opens after repeated API failures | `ExternalOrderService` |

## Current — seller portal

| Feature | Evidence |
|---|---|
| Seller login / logout | `SellerPortal\SellerAuth`, `/seller` routes |
| Seller dashboard / switch seller | `SellerHome` |
| Seller products | `SellerProducts` |
| Seller orders process / status / export | `SellerOrders` (Excel/PDF) |
| Seller analytics | `SellerAnalytics` |
| Seller settings | `SellerSettings` |
| Seller portal menu flag | `seller_portal` on `user_menu` (migration + Authorization) |

## Current — partner and catalog admin

| Feature | Evidence |
|---|---|
| Seller management | `SellerManagement.php`, `seller-management/*` |
| Seller groups management | `SellerGroupsManagement.php` |
| Buyer group management | `BuyerGroupManagement.php` |
| Store management + links | `StoreManagement.php` |
| Industry management | `IndustryManagement.php` |
| Company / company users | `Company.php`, `CompanyUsers.php` |
| Product management screens | `productmanagement/*` routes, `Products` |
| Brands / categories / variations | Models + seeders + migrations |
| Price file upload & data | `PriceFiles`, `PriceFileData` |
| Price file mapping rules | `PriceFileMappingRules` |
| Price file applications | `PriceFileApplications`, `PriceFileTransformationService` |

## Current — platform / admin

| Feature | Evidence |
|---|---|
| Login / logout | `Welcome.php` |
| Email 2FA | 2FA routes, `email_authentication_codes` |
| Password reset / unlock | `forgot-password`, `UnlockController` |
| Portal selection | `portal-selection`, `select-portal` |
| User administration | `Users.php`, `SystemUsers.php` |
| Roles & permissions UI | `RolesPermissions.php` |
| Menu-based RBAC | `Authentication` / `Authorization` filters |
| System settings (tabs) | `SystemSettings.php` — transport methods, cron, email templates, holidays, etc. |
| System notifications | `SystemNotifications.php` |
| Adverts management | `AdvertsManagement.php` |
| Login history | `LoginHistory.php` |
| Blocked users | system settings / migrations |
| Reports | `Reports.php` |
| Fault finder | `FaultFinder.php` |
| Server monitoring UI | `ServerMonitoring.php` |
| Site health | `SiteHealth.php` |

## Current — EDI and integrations

| Feature | Evidence |
|---|---|
| HTTP cron runner | `CronJobs::index`, route `cronJobs` |
| DB-driven cron actions | `cronjob_actions`, `cronjob_log` |
| Folder XML EDI | `GetXMLData`, `writable/*` XML templates |
| Pick n Pay SOAP | `Soap.php` |
| Shoprite REST | `Rest.php`, Shoprite paths in GetXMLData |
| M2North SOAP | `Soap.php` |
| Store API proxy | `StoreApi.php`, `store-api/*` (filter-excepted) |
| Email queue | `sent_queue`, `Email.php` |
| Email open tracking | `EmailPixelTracking`, `tracking-pixel` |
| Slack notifications | `Slack.php`, `slack_helper.php` |
| Organisations REST + JWT | `organisations` resource, `JwtLibrary.php` |
| CSV utilities | `Csv.php`, League CSV |
| File upload helpers | `Upload.php`, `UploadedFile.php`, `File.php` |

## Current — developer / starter platform

These ship in the same tree. README names the first four. Whether all are in production scope is **Unknown / Requires Confirmation**.

| Feature | Evidence |
|---|---|
| Authentication | `Welcome`, filters |
| Authorization | `Authorization` filter, seeds |
| User registration | register routes (starter pattern) |
| Menu management with file generation | `Developers\MenuManagement` |
| CRUD generator | `Developers\CRUDGenerator` |
| DB table data view | `Developers\DbTableDataView` |
| DbAdmin | `DbAdmin.php` |
| ChatGPT page | `ChatGPT.php`, `chatgpt_helper.php` |
| API simulation | `ApiSimulation.php` |
| Test / TestLog controllers | `Test.php`, `TestLog.php` |

## Current — CLI / background

| Feature | Evidence |
|---|---|
| Deactivate expired adverts | `php spark adverts:deactivate-expired` |
| Monitor system usage (loop + PID) | `php spark monitor:system` |
| Email scheduled sends via cron actions | CronJobs + sent_queue methods |

## In development / incomplete

| Item | Evidence | Status |
|---|---|---|
| EDI Email transport for orders/invoices | Comments in `GetXMLData` | In development |
| Salesforce helper | Stub `salesforceConnect()` | In development / unused |
| Africa's Talking SMS | Stubbed helper | In development / unused |
| AWS SDK features | Composer only; overview claims AWS integrations | Not implemented in `app/` |
| Payment gateway | `payments` table; no gateway code | Unknown / incomplete |
| Domain PHPUnit tests | Only Health/Example tests | Incomplete |

## Changed (relative to README / overview)

| Change | Notes |
|---|---|
| Product domain | Starter README → full shop + EDI platform |
| User model | Added `user_type` / `default_portal` (2025-09 migration) |
| Seller portal | Dedicated namespace and routes |
| External Store API | Config + service with circuit breaker |
| Pipeline branches | `main`, `qa`, `storefront` FTP deploys |

## Deprecated / removed / suspicious

| Item | Evidence | Status |
|---|---|---|
| Label* routes without matching controllers | Routes reference LabelStatus / LabelUserGroups / LabelEmailTemplates style paths in some starters; controllers not in this Controllers list | Deprecated / dead routes — **Requires confirmation** |
| Buyer invoice UI | Invoice routes largely commented or EDI-side only | Partial / unclear |
| SAWIS Online login | Commented legacy references in some Overdrive starters; confirm absence here | Unknown for this tree |

## Planned

No in-repo roadmap or "planned features" document was found. Jira SI board is linked from README as the development TODO source (**Documented** link only; contents not verified).

## Feature ↔ requirement map (sample)

| Feature area | PRD refs |
|---|---|
| Auth / RBAC / portals | FR-001 … FR-004 |
| Shop / JAB / statuses | FR-005 … FR-008 |
| Store API | FR-009 |
| Seller portal | FR-010 |
| Master data / price files | FR-011, FR-012 |
| EDI / cron / retailers | FR-013, FR-014 |
| Ops / adverts / notifications / email | FR-015 … FR-018 |
| Orgs API / developer tools | FR-019, FR-020 |
| Payments | FR-021 |
