# Features — bigpond_frontend_qa

Evidence date: 2026-10-19.

Source: `git@bitbucket.org:overdrive/bigpond_frontend_qa.git`, `main` at `6b421ff` (2025-07-21).

Status words:

- **Current** — routed or deployed as code on this commit.
- **Completed** — present and not marked temporary. Git history is only two commits on 2025-07-21, so “completed” means “in the tree”, not “released on a date”.
- **Planned** — commented navigation or a doc that names work that is not routed.
- **In development** — not established. Only `main` was on the remote.
- **Recently changed** — cannot be tied to a commit after `init`. `CHANGELOG.md` and `README.md` list dates in January 2024 and January 2025. Those dates are **Documented** in those files. They are not visible as separate git commits.
- **Removed or leftover** — docs, tests, or comments that point at code that is not in the tree.

## Current features

### Public site

- Audit Whizz landing copy, hero image `src/images/bp_hero.svg`, LOGIN, CONTACT US. `src/components/welcome/index.jsx`.
- Contact modal with validation and SES send. `src/components/contactForm/index.jsx`, `amplify/backend/function/contactmail`.
- Login with Amplify Authenticator, sign-up hidden. `src/components/login/index.jsx`.
- Generic error card. `src/pages/errorPage`.

### Identity and shell

- Cognito session plus MySQL `users` row. `src/context/authContext.jsx`, `GET /initUser`.
- Per-identity session table `master_table_{session}`.
- Inactive-user wall. `src/components/inactivePage`.
- Sidebar: Admin vs User. `src/components/navigation/NavAdmin.jsx`, `NavUser.jsx`.
- Logout. `src/components/logoutButton`.
- Client error post to `/log`. `src/util/errorLog.js`, `frontendLogs`.

### Audit firms, clients, users

- Company CRUD (nav: Audit Firms). `src/pages/companyPage`, `/getcompany`, `/addcompany`, `/updatecompany`, `/deletecompanybyid`.
- Client CRUD with contact name, email, active flag. `src/pages/clientPage`, `src/components/tableBasic/clients`.
- Xero connect from the client table, callback token exchange, disconnect on deactivate. `xeroModal.jsx`, `src/pages/callback`, `XeroExpress`, `xerotoken`, `xerotenants`, `xerorefresh`, `sendxeroemail`, `/updatecompanyxero`.
- User list, add, edit, hard delete. `src/pages/userPage`, `src/components/tableBasic/users`.
- Cognito admin-create plus group `Admin` or `User`. `src/util/signUp.js`.
- CSV bulk import (MySQL only). `src/components/tableBasic/users/bulkImportUser.jsx`, `POST /bulkaddusers`.
- Role list API (`/getuserrole` and write routes). No screen calls it in the search performed.

### Xero Testing

- Client and workflow dropdowns (Expense Document, Revenue Document). `src/components/fileComponents/mainDropDown.jsx`.
- Private S3 uploads: xlsx, invoice images (expense only), csv with bank number. `WorkflowUploads.jsx`.
- Poll until `users.xlsx_process` is 1 after Excel upload. `WorkflowUploads.jsx`, `/getuseruploadprocess`.
- Generate Excel from the session table. `GET /generatefile/{identityId}`, `amplify/backend/function/generatefile`.
- Download that workbook from `big-pond-uploads-bucket123209-dev`. `explorerButtons.jsx`.
- Expense zip of uploads. `ZipObjects`, `src/util/zipFile.js` / `s3Objects.js`.
- Bank numbers discovered from the session table. `/getsessionbanknumbers`.

### Workpapers

- Step list, document types, field builder, multi-row flag, Excel-vs-PDF flag. `src/pages/customMatchPage`, `utils/constants.js`, `components/StepCard.jsx`.
- File processing services: upload, page images to S3, Excel export to S3. `services/fileProcessing`.
- OpenAI extract and match, model `gpt-4.1`, prompts in `openAIFileProcessing/src/buildPrompt.js`.
- Confidence colours 0–3 / 4–6 / 7–10. `CONFIDENCE_LEVELS`.
- Results drawer, DataTables search, paging, copy/CSV/Excel/PDF. `ResultsTable.jsx`, `MatchTable.jsx`.
- Queued localStorage for `custom_match_page`, `result_table_db`, `match_table_db`, `match_results`. `utils/safeLocalStorage.js`.
- Save / load / update / delete company flows in `custom_match_flows`. `bigpondexpress` custom-match routes.
- Workpaper zip plus `Results.xlsx` and step-folder hyperlinks. `ZipWorkPapers`, `exportExcelToS3.js`.
- OpenAI usage log to `workpaper_logs`. `openAIFileProcessing/src/utils/loggingUtils.js`. **Documented** in `NewKnowledgeBase.md`.
- Scheduled processors: `processUnprocessedFiles` every 5 minutes (`gpt-4o`); `openAIFileProcessing` CloudFormation schedule every 1 minute; `openaistart` invokes `openAIFileProcessing-dev`.

### Data helpers

- Account-number normalisation helpers described in `CHANGELOG.md` and present under custom-match utilities (`normalizeAccountNumber`, `extractAccountNumber` named in the changelog). Field-type detection in `utils/formatters.js` (`isDateValue`, `isDecimalValue`, `isNumericValue`, `detectFieldTypeFromData`).
- Excel styling via `xlsx-js-style` (changelog: hyperlink colour and underline). Dependency is in `package.json`.

## Completed features

Everything listed as current is in the `init` tree. There is no version tag and no release branch. Treat “completed” as “shipped in this snapshot”, not as a product sign-off.

`CHANGELOG.md` “Unreleased” section is the only changelog heading. It still describes bulk import, contact form, OpenAI logging, zip workpapers, and localStorage queues as added. Those items are in the code, so the “Unreleased” heading is stale relative to `main`.

## Planned features

- Custom Flow nav item, commented out, path `/customflow`. `NavAdmin.jsx`.
- POC nav item, commented out, path `/poc`. `NavAdmin.jsx`.
- `rules.md` still tells developers to work in `src/pages/customFlowPage` and to copy styling from `src/pages/pocPage`. Neither directory exists.

No issue tracker or roadmap file is in the repo. Further planned work is **Unknown**.

## In development

Not established from this remote. Only `main` is published.

## Recently changed

Not established from git. The `init` commit is the whole tree.

**Documented** change notes (dates are from the markdown, not from `git log`):

| Date in the doc | Claim |
|---|---|
| 2024-01-09 | Matching tables, export, confidence 0–10, localStorage, tooltips (`README.md`) |
| 2024-01-10 | Scheduled Lambda every 5 minutes (`README.md`). Matches `processUnprocessedFiles` `rate(5 minutes)` |
| 2025-01-22 | localStorage v2.1 for custom flow (`README.md`) |
| 2025-01-27 | Custom Match Page (`README.md`) |
| 2025-01-28 | Custom match state fixes (`README.md`) |
| 2025-01-30 | localStorage queue (`README.md`) |
| Unreleased in `CHANGELOG.md` | Bulk import, contact form, `workpaper_logs`, zip workpapers, `xlsx-js-style`, field-type detection, large-PDF batches |

## Removed or leftover

| Item | What remains |
|---|---|
| Create React App test | `src/App.test.js` looks for “learn react” |
| `CONTRIBUTING.md` | Linked from `README.md`, file missing |
| `customFlowPage` / `pocPage` | Named in `rules.md` and README, not in `src/pages` |
| Custom Flow and POC menu | Commented JSX in `NavAdmin.jsx` |
| `audit` route | Routed, not linked, body is an `<h2>Audit Page</h2>` |
| `tempFileProceesTable` and `tempFileProcessTable` | Two function directories. The API resource is spelled `tempFileProceesTable` |
| `sonarqube_scan.bat` | Named in the task-creation tree. It is not in this clone’s top level (`.gitignore` may not be the cause). `sonar-project.properties` and `bitbucket-pipelines.yml` are present |
| Pipeline branch `{master}` | Remote HEAD is `main` |
| Duplicate Amplify build JSON | `amplify/#current-cloud-backend` and `amplify/backend` both carry generated templates, including long filenames |
| `Untitled-1.json` | Scratch JSON at the repo root in the shape of a custom-flow settings/files blob, including one sample invoice extract. Not loaded by the app |

## Feature map (UI path → code)

| Nav label | Path | Who | Main code |
|---|---|---|---|
| (public) | `/`, `/login` | Anonymous | `landingPage`, `login` |
| Audit Firms | `/companies` | Role 1 | `companyPage` |
| Clients | `/clients` | Role 1 and 3 | `clientPage` |
| Users | `/users` | Role 1 | `userPage` |
| Xero Testing | `/workflow` | Role 1 and 3 | `workflowPage` |
| Workpapers | `/custommatch` | Role 1 and 3 | `customMatchPage` |
| (no nav) | `/audit` | Role 1 and 3 | `auditPage` |
| (no nav) | `/callback` | Signed in or out | `callback` |
| (no nav) | `/error` | Signed in or out | `errorPage` |
