# Project plan — unity-soft-ui

Evidence date: 2026-09-30.

Source repository: `https://bitbucket.org/overdrive/unity-soft-ui.git`.

Inspected revision: `main` at `afdeab6` (2022-01-24, Joshua Gatley-Dewing, "add more example data"). The scan-host path `~/projects/sonar_scan/repos/unity-soft-ui` was not on this machine. The tree was read from that git revision. Identifier values in `src/aws-config.js` (Cognito pool ids, app client id, API Gateway host) are omitted from this document. The login form's initial email and password literals in `src/components/Login.js` are also omitted.

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

## Product

The browser title is **UnityLite** (`public/index.html`). The navigation brand and web-app manifest name are **Unity Soft** (`src/components/common/Navbar/TopNav.js`, `public/manifest.json`). The npm package name is `role-based-access-control` (`package.json`). The README title is **Unity - Soft UI**.

It is a Create React App single-page application. It signs people in with Amazon Cognito (via AWS Amplify), calls an HTTP API named `unity`, and renders a Soft UI Dashboard shell (Creative Tim) around a small set of screens: home, calendar, task list, users, config, dashboard, profile, login, register, and password reset.

Provenance: **Implemented** in the files named above. **Documented** only in `README.md`, which is three short sections and a TODO list. No formal project plan existed in the repository or in `silicon_ark/unity-soft-ui/` before this file.

## Branch reality

| Line | Tip | Date | What it is |
|---|---|---|---|
| `main` (default; `origin/HEAD`) | `afdeab6` | 2022-01-24 | The only branch. React app, Soft UI theme, Amplify auth, sample dashboard data |

There are no other remote branches. History runs from `1032a6b` (2021-10-13, "Initial commit") to `afdeab6`. Every commit in that range is authored by Joshua Gatley-Dewing. Whether any deployed site still serves this tree is **Unknown / Requires Confirmation**.

## Objectives (inferred from the screens and the README, not from a written plan)

No project plan or requirements document exists in the repository. The README says the app is "Unity with the soft-ui-dashboard" and lists the benefit "Using Amplify / lambda". The following objectives are **Inferred** from that sentence and from the screens:

- Give a signed-in person a branded web shell (Unity Soft) with navigation driven by a role list.
- Register and sign in through Cognito, then load a user record from the `unity` API.
- Show a calendar that reads and writes events through that API.
- Show a user table loaded from that API.
- Show a dashboard of charts. The charts in this revision use data hardcoded in `src/components/Dashboard.js`, including sample series named Onions and Spaghett.
- Provide reusable table export and chart components even where no route mounts the table.

The README TODO still says "everything to do with Soft-ui", "styling", and "documentation probably". Soft UI theme files, `Sui*` components, and multiple "style changes" commits are already in the tree. The README is **stale relative to the implementation**. Provenance of the TODO: **Documented**. Provenance of the theme: **Implemented**.

## Scope

### In this repository

- React 17 UI, client-side routing, and a role filter on routes (`src/config/RoutingConfig.js`, `src/utils/index.js`).
- Cognito sign-in, sign-up, email confirmation, and forgot-password flows (`src/components/Login.js`, `Register.js`, `ForgotPassword.js`).
- Calls to the Amplify API named `unity` (`src/index.js`, `src/components/unityRequests.js`).
- Soft UI theme under `src/assets/theme/` and shared `Sui*` components under `src/components/common/`.
- FullCalendar screen, static task list, static dashboard graphs, profile form, and title-only pages for staff, cron jobs, and terms.
- One Jest smoke test (`src/App.test.js`) and Storybook script entries in `package.json`. There is no `.storybook` directory.
- `sonar-scanner.bat`, a stock SonarScanner 4.6.2.2472 Windows launcher that sets `SONAR_SCANNER_HOME` to `C:\sonar-scanner\bin\..`. It does not name a Sonar project key. `.scannerwork/.sonar_lock` is tracked.

### Not in this repository

- The Lambda (or other) implementation behind API Gateway. The README names Lambda. The handler source is **Unknown**.
- A database. User and calendar fields are only visible as JSON property names the UI sends or expects.
- Infrastructure-as-code, a Bitbucket pipeline, Docker, or a hosting config. None of those files are in the tree.
- A second factor UI. `Register.js` sets `isMultifactor` to `true`, but the branch it opens is Cognito email confirmation (`Auth.confirmSignUp`), not an authenticator-app step. Whether the user pool has MFA turned on is **Unknown**.

## Architecture (as implemented)

```text
Browser
  └─ React SPA (Create React App, react-scripts 4.0.3)
       ├─ Soft UI / MUI theme and TopNav + Footer shell
       ├─ Route table filtered by localStorage "roles"
       ├─ Amplify Auth  → Amazon Cognito (region eu-west-1, ids in src/aws-config.js)
       ├─ Amplify API   → API Gateway endpoint named "unity" (same file)
       └─ Amplify Storage config → S3 bucket unity-lite-files
            (configured in src/index.js; no Storage.* call was found in src/)
```

The API and the user pool are external. This repository is the client only.

## Major components

| Area | Path | Role in the product |
|---|---|---|
| Bootstrap | `src/index.js`, `src/App.js` | Amplify config, theme, router |
| Routes and roles | `src/config/RoutingConfig.js`, `src/config/Roles.js`, `src/utils/index.js` | Which screens exist and who may open them |
| Auth screens | `src/components/Login.js`, `Register.js`, `ForgotPassword.js` | Cognito plus `unity` user registration |
| API helper | `src/components/unityRequests.js` | POST (default) or GET to API name `unity` |
| Calendar | `src/components/Calendar.js` | FullCalendar CRUD against `/unity/*calendarevent*` |
| Users | `src/components/Users.js` | Table from `/unity/getusers/1` |
| Dashboard | `src/components/Dashboard.js`, `src/components/common/Graphs.js` | Charts from an in-file sample payload |
| Profile | `src/components/Profile.js` | Edit form loaded from `/unity/getdetails`; save is not wired |
| Shell | `src/components/common/Navbar/TopNav.js`, `Footer.js` | Brand, links, logout |
| Unused or unrouted | `Quotes.js`, `Timesheet.js`, `Pivot.js`, `ExportableTable.js` | Present in source; not mounted by the route table (ExportableTable is a component only) |

## Milestones visible in git history

These are commit groups, not an approved roadmap.

| When | Commits | What landed |
|---|---|---|
| 2021-10-13 | `1032a6b` … `efe1348` | Initial app, routing, permissions, README |
| 2021-10-14 to 2021-10-28 | `d910f43` … `079cebb` | Soft UI dependencies, navigation, footer, `StyledEngineProvider` |
| 2021-12-06 to 2021-12-08 | `3ff1bff` … `a1284f6` | Package update, footer fix, table search over formatted columns |
| 2022-01-13 to 2022-01-24 | `5b33ed4` … `afdeab6` | Graph numeric coercion, exportable table, dashboard sample data |

No commit after 2022-01-24 is on `main`.

## Implementation plan

There is no forward plan in the repository. The README TODO is the only written backlog, and it disagrees with the code (see Objectives). Anything beyond "the client at `afdeab6`" is **Unknown / Requires Confirmation**, including:

- Whether this UI is still the front end for a live Unity or Unity Lite product.
- Which backend repository implements the `unity` API.
- Whether the placeholder copy (Paymyfines.com on the register form, `helpme@please.com` in the footer, company "Silicon Overdrive" on the profile) is intentional branding or leftover template text.

## Known dependencies

Runtime libraries are declared in `package.json`. The ones the screens actually use:

- `react` 17, `react-scripts` 4.0.3, `react-router-dom` 5.
- `aws-amplify` 3.3.21.
- `@mui/material` 5 and `@material-ui/core` 4 together (both are imported).
- `react-bootstrap` 1 and `bootstrap` 5.
- `@fullcalendar/react` 5 and plugins daygrid, timegrid, interaction.
- `recharts` for `Graphs.js`.
- `react-table` 7 on the Users screen.
- `lodash` `intersection` for the route filter.

Dev-only: Prettier, Storybook 5.2 packages. No `.storybook` config is in the tree, so `yarn storybook` as written is **not shown to be runnable**. One story file exists: `src/components/common/JumbotronWrapper.stories.js`.

## Current project status

**Implemented client, inactive in git since 2022-01-24, single branch `main`.** Several screens are shells or static samples. Route permissions do not distinguish SUPER_ADMIN, ADMIN, MANAGER, and CUSTOMER from each other. The backend is outside this repository.

Human confirmation is required before treating any of the following as a current product decision: live deployment, the meaning of the five role names, the Paymyfines.com sentence, and whether dashboard numbers are supposed to stay as examples.
