# Project plan — ohlief-app-client

Evidence date: 2026-10-08.

Source repository: `git@bitbucket.org:overdrive/ohlief-app-client.git`.

Inspected revision: `master` at `98891e4` (2020-07-05, Jaco Brits, "Update the major screen product screen"). The scan-host path `~/projects/sonar_scan/repos/ohlief-app-client` was not on this machine. The tree below was read from that git revision (57 commits, full history fetched).

This plan describes what the repository contains. It does not decide what the product should become.

There is no product requirements document in the source repository and no prior Silicon Ark set for `ohlief-app-client/`. `README.md` is the Create React App readme. `public/index.html` sets the page title to **Oh-lief EDI**. `public/manifest.json` names the app **oh-lief EDI for xProcure**. The package name is `ohlief-app-client` version `0.1.0`.

The navbar reads **Powered by Overdrive & X/procure®**. Silicon Ark has other documents that mention `helpdesk@xprocure.com` (`pernod_ricard`, `pernod-ricard-prod`). This repository does not name those directories. Whether they are one product is **Unknown / Requires Confirmation**.

## Product

A browser application for viewing EDI order lines, turning an order number into an invoice, and maintaining a product list. Signed-in users call a remote API named `ohlief` on Amazon API Gateway. Guests see a landing line: **Oh-lief** / **FTP EDI Orders Invoices**.

**Documented** title and manifest name: `public/index.html`, `public/manifest.json`. **Documented** landing copy: `src/containers/Home.js`. **Implemented** behaviour: the React tree under `src/`. There is no FTP client, file transfer, or EDI parser in this repository. The words "FTP EDI" are UI copy only.

## Scope in this repository

In scope for this knowledge set:

- The Create React App shell (React 16.12, react-scripts 3.4.0, React Router 5, React Bootstrap 0.33).
- Cognito sign-in and sign-out through AWS Amplify.
- Home tabs: Orders, Invoices, Products.
- Order detail (invoice quantity), invoice row view, product create and edit.
- The HTTP paths this client calls. The server that implements them is not in this repository.

Out of scope, because it is not in this repository:

- The API Gateway implementation, database, EDI mapping, and any FTP pickup or drop.
- Hosting, DNS, and whether anyone still runs the app.
- Other X/procure or Pernod Ricard repositories.

## System shape

```text
Browser
  public/index.html   ("Oh-lief EDI")
  src/index.js        React 16, Amplify.configure, service worker unregistered
  src/App.js          Cognito session check, navbar, routes
       |
       +-- Auth.currentSession / Auth.signIn / Auth.signOut
       +-- API name "ohlief"
                |
                +-- https://0tsz4u0k70.execute-api.eu-west-1.amazonaws.com/prod
                +-- S3 bucket ohlief-app-uploads (private Amplify vault; file input is only on the unused-in-nav note screen)
```

There is no `Dockerfile`, pipeline file, or `.env` in the tree at `98891e4`. AWS identifiers are hardcoded in `src/config.js`.

## Major components

| Area | Where | What it is |
|---|---|---|
| Shell | `src/App.js`, `src/index.js`, `src/Routes.js` | Navbar, session flag, route table |
| Auth gates | `src/components/AuthenticatedRoute.js`, `UnauthenticatedRoute.js` | Redirect guests to login; redirect signed-in users away from `/login` |
| Home | `src/containers/Home.js` | Three tabs, search, sort, pagination, invoice action |
| Order edit | `src/containers/OrderDetail.js` | Load one line, edit invoice quantity, save |
| Invoice view | `src/containers/InvoiceDetail.js` | Load one line, read-only, Cancel only |
| Products | `src/containers/NewProduct.js`, `src/containers/ProductDetail.js` | Create and edit a product |
| Notes leftover | `src/containers/NewNote.js`, `src/containers/Notes.js`, `src/containers/Orders.js`, `src/containers/NewOrder.js`, `src/containers/Processed.js` | Serverless-Stack-style note screens. Some are still routed; some are not imported |
| AWS helpers | `src/config.js`, `src/libs/awsLib.js` | Region, pool, API URL, S3 upload |

## Observed history

There is no written milestone plan in the repository. The commit subjects, from `c214a93` (2020-02-16, "React base") through `98891e4` (2020-07-05), show this sequence:

1. CRA base and AWS Amplify wiring (`c214a93`, `5e2cc7f`).
2. Notes page and an orders page (`9d563c6`, `636c50d`).
3. Order and invoice lists, totals, and table layout (March 2020, Jaco Brits and Alex Kedian).
4. Product table, then product create/edit. A 2020-04-03 subject says the add-product button was removed (`d79d6af`). At HEAD the Products tab has a **Create Product** button again.
5. Pagination (`fe52e72`, 2020-04-17).
6. Product screen update (`98891e4`, 2020-07-05). No commits after that date.

Authors on `master`: Jaco Brits (39 commits), Alex Kedian (18 commits). The only branch on the remote is `master`.

## Current status

The client at HEAD can show a guest lander, sign in, list orders, invoices, and products, edit an invoice quantity on an order line, request an invoice for an order number, and create or edit a product. Several screens left over from the note-taking starter are still in the tree. Signup does not complete in the UI. See the open items below.

Whether this build is deployed, and what the API does after each call, is **Unknown / Requires Confirmation**.

## Known dependencies

| Dependency | Role |
|---|---|
| `react` 16.12, `react-scripts` 3.4.0 | UI and build |
| `aws-amplify` 2.2.5 | Cognito, API Gateway, S3 |
| `react-router-dom` 5.0.1, `react-router-bootstrap` 0.25.0 | Routes and navbar links |
| `react-bootstrap` 0.33.0 | Bootstrap 3 components |
| `react-bootstrap-table-next` and the filter, paginator, and toolkit packages | Home tables |
| Amazon Cognito, API Gateway, S3 | Named in `src/config.js`. Not implemented here |

## Requires confirmation

- What the API does for `GET /invoiceupdate/{orderNumber}`, and whether invoicing one line is supposed to change every line with that order number.
- Whether list money should be euro (`€`, as `Home.js` renders) or rand (a March 2020 commit subject says rand was added; leftover screens still hardcode `R48.00`).
- Whether an order line from the API includes a `content` string. Save on the order screen stays disabled when that string is empty.
- Whether `/signup` is still a product feature. The route requires an existing session, the navbar has no Signup link, and the confirmation-code form is never shown.
- Whether `Notes.js` (`/ohlief/:id`) should still be reachable. Its load call is commented out and the form shows fixed sample values.
- The relationship, if any, to the other X/procure repositories in Silicon Ark.
- Whether the app is still operated, and where the production host is.
- The task scan listed `sonar-project.properties` and `sonarqube_scan.bat` at the repository root. They are not in git at `98891e4`.
