# Features — bigpond_frontend

Evidence date: 2026-10-19.

Source: `bigpond_frontend` branch `master` at `c5ef2b1` (2025-11-26).

Status labels: **Current** (in the tree and reachable, or a backend that the UI calls), **Present but unwired** (code exists, navigation or route does not expose it), **Documented only** (described in README or changelog, not found as a live screen), **Removed or commented**.

## Current features

### Public site

| Feature | Where | Status |
|---|---|---|
| Audit Whizz landing copy and hero image | `src/components/welcome/index.jsx`, `src/images/bp_hero.svg` | Current |
| Login button to `/login` | `welcome/index.jsx` | Current |
| Contact Us modal | `src/components/contactForm/index.jsx` | Current |
| SES delivery of the contact message | `amplify/backend/function/contactmail` | Current |
| Footer and public nav | `src/components/footer`, `src/components/navigation/navigation.jsx` | Current |

### Authentication and session

| Feature | Where | Status |
|---|---|---|
| Cognito email sign-in, sign-up hidden | `src/components/login/index.jsx` | Current |
| MySQL user lookup and session table create on login | `src/context/authContext.jsx`, `bigpondexpress` `/initUser` | Current |
| Inactive-user screen | `src/components/inactivePage` | Current |
| Admin shell vs user shell | `src/router/index.jsx` | Current |
| Frontend error logger to Lambda | `src/util/errorLog`, `frontendLogs` | Current. Lambda prints the payload. It does not persist a row |

### Administration

| Feature | Where | Status |
|---|---|---|
| Audit firm list, add, edit, hard delete | `src/pages/companyPage`, `components/tableBasic/company`, `/getcompany`, `/addcompany`, `/updatecompany`, `/deletecompanybyid` | Current. Admin route only |
| Duplicate firm name blocked in the add modal | `addCompany.jsx` | Current. Browser list only |
| Client list scoped by role | `clietTable.jsx` | Current. Admin: all firms. Other roles: own `company_id` |
| Client add, edit, hard delete | `components/tableBasic/clients` | Current |
| Client deactivate attempts Xero connection delete | `bigpondexpress` `updatecompanyclient` | Current |
| Xero connect email and OAuth callback | `sendxeroemail`, `XeroExpress`, `xerotoken`, `xerotenants`, `xerorefresh`, `src/pages/callback` | Current |
| User add with Cognito admin create and group | `addUser.jsx`, `src/util/signUp.js`, `/adduser` | Current. Admin route only |
| User edit and hard delete | `managerUserModal.jsx`, `/updateuser`, `/deleteuserbyid` | Current |
| Bulk user CSV import | `bulkImportUser.jsx`, `/bulkaddusers` | Current. Role forced to User (3) |
| User role CRUD API | `/getuserrole`, `/adduserrole`, `/updateuserrole`, `/deleteuserrolebyid` | Current as API. No screen in `src/pages` was found that edits the role catalogue |

### Xero Testing

| Feature | Where | Status |
|---|---|---|
| Screen labelled Xero Testing | `NavAdmin.jsx`, `NavUser.jsx`, `src/pages/workflowPage` | Current. Both roles |
| Client and workflow-type dropdowns | `mainDropDown.jsx` | Current. Types: Expense Document, Revenue Document |
| Excel upload (`.xlsx`, max 1) | `WorkflowUploads.jsx` | Current |
| Invoice image upload for Expense Document | `WorkflowUploads.jsx` | Current. `.pdf`, `.png`, `.jpeg`, `.tiff`, max 50 |
| Bank CSV upload with bank dropdown | `WorkflowUploads.jsx`, `/getsessionbanknumbers`, `/updateuserselectedbank` | Current |
| Poll until JSON sidecars exist for Expense Document | `canGenerateWorkFlow.js` | Current |
| Generate workbook | `explorerButtons.jsx`, `generatefile` | Current |
| Zip of uploads / support documents | `ZipObjects`, `s3Objects.js` | Current |
| Delete session uploads | `deleteSessionUploads` | Current |
| Per-session MySQL table `master_table_{session}` | `bigpondexpress` `/initUser` | Current |

### Workpapers

| Feature | Where | Status |
|---|---|---|
| Screen labelled Workpapers | `/custommatch`, `src/pages/customMatchPage` | Current. Both roles |
| Add, remove, and renumber steps | `customMatchPage/index.jsx`, `StepCard.jsx` | Current |
| Document types and preset fields | `utils/constants.js` | Current. Statement, Invoices, Supporting Document, Custom |
| PDF and Excel processing | `services/fileProcessing` | Current |
| OpenAI extract and match | `openAIFileProcessing`, model `gpt-4.1` | Current |
| Confidence, amount, and date tolerances in the large-document prompt | `buildPrompt.js` | Current. Threshold constant is 6 |
| Save and load named flows per company | `custom_match_flows` routes | Current |
| Results table | `components/ResultsTable.jsx` | Current |
| Excel, CSV, and PDF export | `exportCSV.js`, `ResultsTable.jsx`, jsPDF / xlsx dependencies | Current |
| Hierarchical Excel export and S3 copy for zip | `exportExcelToS3.js`, `ZipWorkPapers` | Current. Chain behaviour is described in `CHANGELOG.md` |
| localStorage queue for result keys | `utils/safeLocalStorage.js`, `utils/storageQueue.js` | Current |
| Scheduled processing of unprocessed files | `processUnprocessedFiles`, `rate(5 minutes)`, model `gpt-4o` | Current |
| One-minute schedule on `openAIFileProcessing` | `openAIFileProcessing-cloudformation-template.json` | Current as CloudFormation. Relationship to the 5-minute function is **Requires Confirmation** |
| Workpaper log rows | `workpaper_logs` via `manageFileProcessTable` | Current |

### Logs and errors

| Feature | Where | Status |
|---|---|---|
| Logs page: date range, user filter, audit-firm filter, CSV download | `src/pages/logsPage` | Present but unwired in the sidebar. Route exists for role 1 only |
| `getLogs` API | `manageFileProcessTable` `handleGetLogs` | Current |
| Generic error card | `src/pages/errorPage` | Current route. Call sites not fully traced |
| Audit page heading | `src/pages/auditPage` | Present but unwired in the sidebar. Both roles can open `/audit` |

### Platform

| Feature | Where | Status |
|---|---|---|
| API Gateway gzip (`MinimumCompressionSize` 0) | `amplify/backend/api/*/override.js` | Current as of `c5ef2b1` |
| SonarQube scan on `master` | `bitbucket-pipelines.yml`, `sonar-project.properties` | Current |
| Create React App scripts `start`, `build`, `test` | `package.json` | Current |

## Completed features

These are in `master` and are not marked unfinished in code. “Completed” here means shipped in this tree, not that a product owner signed them off.

- Cognito login and admin-created users (since the 2023-03-28 auth commits, evolved since).
- Audit firm, client, and user maintenance.
- Xero Testing uploads and workbook generation.
- Xero OAuth token storage.
- Workpapers multi-step match and export (README dates the screen to 2025-01-27; git history continues through 2025-08).
- Bulk user import (commit `ef8d6ba` / `731bbc1`, message `adding bulk user import`).
- Workpaper logs API and page (2025-07-25, `f3f59bd`, `28cbe58`).
- Contact form (commit `bbd8977`).
- Prompt tolerances recorded in `CHANGELOG.md` on 2025-08-08 (commit `075c62d` the same day: `updating prompt and batch size`).

## In development

No branch, TODO, or issue in this repository states a feature as in development at `c5ef2b1`.

`rules.md` says the focus area is `src/pages/customFlowPage` and that the page is “currently correct”. That directory is not in `src/pages`. Treat `rules.md` as a stale instruction, not as an active build.

## Planned

| Item | Evidence | Status |
|---|---|---|
| Custom Flow nav item | Commented block in `NavAdmin.jsx` pointing at `/customflow` | Removed or commented. Page directory absent |
| POC nav item | Commented block pointing at `/poc` | Removed or commented. Page directory absent |
| Logs nav item | Commented block in `NavAdmin.jsx`. `CHANGELOG.md` says it was added for admin and user | **Requires Confirmation.** Code has the page and admin route. Nav is off |
| `CONTRIBUTING.md` | `README.md` “Please refer to CONTRIBUTING.md” | Documented only. File absent |

No other roadmap file exists.

## Recently changed

Git timestamps on `master`:

| Date | Commit | Change |
|---|---|---|
| 2025-11-26 | `c5ef2b1` `change overide` | Renamed API `override.ts` files to `override.js`. `apibigpond/override.js` still has a TypeScript annotation |
| 2025-11-26 | `a9bba99` `api encoding` | Added override files that set `MinimumCompressionSize` to 0. Also edited `backend-config.json`, OpenAI CloudFormation, `amplify/backend/package.json`, and `team-provider-info.json` |
| 2025-08-11 | `7b3e6a1` | `Update date format` |
| 2025-08-08 | `075c62d` | `updating prompt and batch size` |
| 2025-07-30 | `9f0e115` | `update fight filtering prompt` |
| 2025-07-25 | `28cbe58`, `f3f59bd` | Logs and SonarQube hotspots |
| 2025-07-24 | `6300be8` | Export matches across all steps, not only step 1 |

`CHANGELOG.md` also has an `[Unreleased]` section about Excel field-type detection trusting Excel formatting, and bulk user import. Those behaviours are in the tree (see `formatters.js` and `bulkImportUser.jsx`). The “Unreleased” heading is **Documented** and does not match a git tag. There is no release tag evidence in this pass.

## Deprecated or removed

| Item | Evidence |
|---|---|
| `customFlowPage` | Named in `rules.md` and `README.md`. Not under `src/pages` |
| `pocPage` | Named in commented nav and `rules.md`. Not under `src/pages` |
| Logs sidebar link | Commented in `NavAdmin.jsx`. Page remains |
| `sonarqube_scan.bat` | Listed at task creation. Not in `master` at `c5ef2b1` |
| Create React App demo test | `src/App.test.js` still asserts “learn react”. The app does not render that link |

## Documented behaviour that the code does not match

| Documented | Implemented |
|---|---|
| README: product is BigPond, GPT-4o, custom flows, `customFlowData` v2.1 | Landing page says Audit Whizz. Workpapers UI is `customMatchPage`. `openAIFileProcessing` uses `gpt-4.1`. `processUnprocessedFiles` uses `gpt-4o` |
| README: `REACT_APP_OPENAI_API_KEY` is a frontend env var for matching | The only read found is in the Lambda `openAIFileProcessing/src/index.js` |
| Changelog 2025-08-08: confidence `≥ 6` when filtering, `≥ 8` otherwise | `buildLargeDocumentPrompt` sets `confidenceThreshold = 6` and a light-filtering sentence in all cases |
| Changelog: Logs link in admin and user menus | Admin link commented out. User nav and user routes have no Logs entry |
| Changelog: export downloads Excel | Logs page writes a `.csv` file |
| `rules.md`: do not preview or test the site | Instruction to authors. Not a product feature |

## Source map

```text
src/pages/landingPage          public page
src/pages/companyPage          audit firms
src/pages/clientPage           clients
src/pages/userPage             users
src/pages/workflowPage         Xero Testing
src/pages/customMatchPage      Workpapers
src/pages/logsPage             workpaper logs
src/pages/callback             Xero return
src/pages/auditPage            placeholder heading
src/pages/errorPage            generic error
amplify/backend/function/*     Lambdas listed in technical-documentation.md
```
