# Project plan — unity-lite

Evidence date: 2026-09-30.

Source repository: `https://bitbucket.org/overdrive/unity-lite.git` (origin `git@bitbucket.org:overdrive/unity-lite.git`).

Inspected revision: `master` at `9b3a386` (2021-06-08 07:45:15 +0200, author `Jaco Brits`, subject "Merge branch 'master' of https://bitbucket.org/overdrive/unity-lite"). The scan-host path `~/projects/sonar_scan/repos/unity-lite` was not on this machine. The tree was read from a fresh clone of that git revision. Identifier values in `src/aws-config.js` (Cognito user pool id, app client id, identity pool id, API Gateway host) are omitted. The login form's initial email and password literals in `src/components/Login.js` are omitted.

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

This repository is not the Unity game engine. It is not `unity-lite-v2`, `unity-soft-ui`, or `unity-skeleton`. Those are separate Silicon Ark projects. See [Relationship to other Unity clients](#relationship-to-other-unity-clients).

## Product

The browser title is **UnityLite** (`public/index.html`). The navigation wordmark is **UnityLite** with "Lite" in bold (`src/components/common/TopNav.js`). The landing page credits "silicon overdrive" and links to `https://www.overdrive.co.za/`. The npm package name is `role-based-access-control` at version `0.1.0` (`package.json`). `public/manifest.json` still says **React App** / **Create React App Sample**.

The README title is **Unity - Lite**. Its body is one sentence: "Unity with out styling and redux components". It lists the benefit "Using Amplify / lambda" and the commands `yarn install` and `yarn start`. The only TODO is "Design same approach for components".

It is a Create React App single-page application (React 16.8, `react-scripts` 3.0.1, React Router 5, React Bootstrap 4). Signed-in state is a `localStorage` key named `roles`, not a live Cognito check. Sign-in calls Amazon Cognito through AWS Amplify, then `GET /unity/uuid/{cognito username}` on an API named `unity`. The calendar and the user list call that same API. Several other screens are title-only placeholders or hardcoded samples.

Provenance: **Implemented** in the files named above. **Documented** in `README.md` only as the short note above. No formal project plan existed in the repository or in `silicon_ark/unity-lite/` before this file.

## Branch reality

| Line | Tip | Date | What it is |
|---|---|---|---|
| `master` (default; `origin/HEAD`) | `9b3a386` | 2021-06-08 | The only branch. Bootstrap shell, Amplify auth, calendar and user API calls, placeholder screens, vendored pivot/plotly demos |

There are no other remote branches. History is sixteen commits from 2021-03-01 through 2021-06-08. Authors in the log: `Jaco Brits`, `Joshua Gatley-Dewing`, `RusselSauer`. 95 tracked files. No commits after 2021-06-08. Whether any deployed site still serves this tree is **Unknown / Requires Confirmation**.

Observable milestones from the commit subjects (not a written plan):

| Commit | Date | Author | Subject |
|---|---|---|---|
| `ae4c70b` | 2021-03-01 | Jaco Brits | Initial commit |
| `34b1a81` | 2021-03-02 | Jaco Brits | First commit |
| `31178ac` | 2021-03-08 | Jaco Brits | Update the latest component changes |
| `3a6ecbd` | 2021-03-11 | Jaco Brits | Update the helperfile and user screen (also deleted most of the in-repo `lambda/` tree) |
| `9ae35b9` / `9bdff19` | 2021-03-11 | Jaco Brits | Dashboard demo and styling |
| `7aa3a9b` | 2021-03-14 | Joshua Gatley-Dewing | Calendar functionality |
| `701f23e` | 2021-03-15 | Jaco Brits | Update Developer tools, and Tasklist |
| `e7e3180` / `22861a3` | 2021-03-16–17 | Joshua Gatley-Dewing | Fixes up routes; Add user details |
| `b358947` | 2021-03-17 | Joshua Gatley-Dewing | removes lambda code (remaining calendar handlers) |
| `0b14afe` | 2021-03-17 | RusselSauer | Add task list initial changes |
| `8ed31a0` / `9b3a386` | 2021-06-08 | Jaco Brits | import graph libs; merge |

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

No project plan or requirements document exists in the repository. The following objectives are **Inferred** from the README sentence, the route table, and the API calls:

- Provide a Unity client without the styling layer and without Redux (the README's own description).
- Sign a person in through Cognito, load a user row from the `unity` API, and keep a role list in the browser.
- Show a calendar that reads and writes events for the signed-in user through that API.
- Show a user table loaded from that API, with a link toward an edit form.
- Leave booking, kanban, profile, staff, cron jobs, register, and forgot-password as titled placeholders.
- Show a dashboard of charts using numbers written in the component.
- Show a hardcoded task list with an Add Task form that does not persist.

Provenance of the README sentence: **Documented**. Provenance of the screens: **Implemented**.

## Scope

### In this repository

- React 16 SPA, React Bootstrap 4, W3.CSS from a CDN, client-side routing, and a role filter on routes (`src/config/PrivateRoutesConfig.js`, `src/utils/index.js`).
- Cognito sign-in (`src/components/Login.js`). Register and forgot-password routes render a title and a link back to login.
- Calls to the Amplify API named `unity` (`src/index.js`, `src/components/unityRequests.js`, `Login.js`, `Calendar.js`, `Users.js`, `User.js`, `Quotes.js`).
- FullCalendar screen wired to calendar endpoints. Static task list. Static dashboard graphs. Title-only pages for booking, kanban, profile, staff, and cron jobs.
- A vendored pivot-table demo (`src/components/Pivot.js` and the `PivotTable*.jsx` / renderer files) that no route mounts. Timesheet and Quotes components exist; neither is mounted by `PrivateRoutesConfig.js`.
- One Jest smoke test (`src/App.test.js`) and Storybook script entries in `package.json`. There is no `.storybook` directory. Two story files exist under `src/components/common/`.

### Not in this repository (at tip)

- The Lambda (or other) implementation behind API Gateway. The README names Lambda. A `lambda/` directory existed earlier in history and was removed (`3a6ecbd`, `b358947`). Those deleted files used MySQL (`serverless-mysql`) against tables including `sysUser` and `crmCalendar`. Whether the live API Gateway stage still runs that code, or newer code elsewhere, is **Unknown / Requires Confirmation**.
- A database. User and calendar fields are only visible as JSON property names the UI sends or expects (and, historically, as table and column names in the deleted Lambda sources).
- Redux, a styling system, or a design-token layer. The README states the absence of styling and Redux as the point of this tree.
- Infrastructure-as-code, a Bitbucket pipeline, Docker, or a hosting config.
- A working registration or password-reset flow. The routes exist. The components do not call Cognito.
- `sonar-project.properties` and `sonarqube_scan.bat`. The onboarding issue listed both in the scan-host top-level snapshot (2026-09-28). Neither file is tracked at `9b3a386`. Whether they exist only as untracked files on the scan host is **Unknown / Requires Confirmation**.

## Architecture (as implemented)

```text
Browser
  └─ React SPA (Create React App, react-scripts 3.0.1)
       ├─ Bootstrap 4 + W3.CSS shell (TopNav, JumbotronWrapper)
       ├─ Public routes when localStorage "roles" is absent
       ├─ /app routes filtered by that roles value
       ├─ 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 under 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, then the route switch |
| Public vs private | `src/routes/index.js`, `Auth.js`, `PublicRoutes.js`, `PrivateRoutes.js` | `/app` requires a `roles` key; every other path is public unless that key is set |
| Route table | `src/config/PrivateRoutesConfig.js`, `src/config/Roles.js` | Screen list and which role strings may open Config, Dashboard, and Profile |
| Route filter | `src/utils/index.js` | `isLoggedIn`, `getAllowedRoutes` |
| Auth screen | `src/components/Login.js` | Cognito sign-in and the uuid lookup |
| Calendar | `src/components/Calendar.js` | FullCalendar plus four `unity` calendar paths |
| Users | `src/components/Users.js`, `User.js` | User table and an edit form |
| Placeholders | `Booking.js`, `Kanban.js`, `Profile.js`, `Staff.js`, `CronJobs.js`, `Register.js`, `ForgotPassword.js`, `Timesheet.js` | Title (and sometimes a link) only. Timesheet is not routed |
| Samples | `Dashboard.js`, `Tasklist.js`, `Kanban_data.json`, `Pivot.js`, `Quotes.js` | Hardcoded or vendored UI; Quotes duplicates Users API call but is not routed |
| HTTP helper | `src/components/unityRequests.js` | Amplify `API.post` by default against the `unity` endpoint |

## Milestones

No milestone list, release, or version tag exists in the repository. The observable history is the commit table above. There is no written implementation plan beyond the README TODO "Design same approach for components" and the comments in `src/config/PrivateRoutesConfig.js` (optional title, title as a React node, child-route support). Child links for Staff and Cron Jobs are already rendered by `Configer.js`. That TODO is **stale relative to Configer**. Provenance of the TODO: **Documented** in the comment. Provenance of the child links: **Implemented**.

## Known dependencies

Runtime libraries declared in `package.json`: React 16.8.6, React DOM 16.8.6, `react-scripts` 3.0.1, `react-router-dom` 5.2.0, `react-bootstrap` 1.0.0-beta.10, `bootstrap` 4.3.1, `aws-amplify` 3.3.21, FullCalendar 5.5 (`daygrid`, `timegrid`, `interaction`, `react`), `react-chartist` / `chartist`, `react-table` 7.6.3, `react-pivottable` 0.11.0, `plotly.js` / `react-plotly.js`, `react-trello` 2.2.10, `lodash` 4.17.15, `namor` 2.0.2, `prop-types`.

Dev dependencies: Storybook 5.2.1 (`@storybook/react` and addons), Prettier 1.18.2, `@babel/core` 7.6.0.

Both `package-lock.json` and `yarn.lock` are tracked. Which lockfile a developer is expected to use is **Unknown / Requires Confirmation**. The README names `yarn`.

Imports that are not declared in `package.json`:

| Import | Used by | Declared |
|---|---|---|
| `react-icon-checkbox`, `react-icons/bs` | `src/components/Tasklist.js` | No |
| `history` (`createBrowserHistory`) | `src/utils/history.js` | No direct dependency. It may resolve through `react-router-dom`. **Unknown** on a strict install |
| `react-dropzone`, `papaparse` | `src/components/Pivot.js` | No. `Pivot.js` is not mounted by a route |

`react-trello` is declared and is not imported by any file under `src/`. `Kanban_data.json` is shaped like a react-trello board and is not imported by `Kanban.js`.

External systems named in config, not implemented here: Amazon Cognito, API Gateway (endpoint name `unity`), S3 bucket `unity-lite-files`. Region in `src/aws-config.js` is `eu-west-1`. `MAX_ATTACHMENT_SIZE` is `5000000`. No `Storage.get` or `Storage.put` call was found.

CDN stylesheets in `public/index.html`: Bootstrap 4.3.1 from `maxcdn.bootstrapcdn.com`, W3.CSS from `www.w3schools.com`, and a Raleway font stylesheet from `fonts.googleapis.com`.

## Current project status

Dormant snapshot. Last change 2021-06-08. One branch. No pipeline file. No deployment manifest. Calendar and user list are the only domain screens that call the API from a mounted route. Register, forgot password, booking, kanban, profile, staff, and cron jobs do not. The task list and the dashboard do not call the API. Quotes would call the users endpoint if it were routed; it is not.

## Relationship to other Unity clients

| Project | What the Silicon Ark / tree shows | Relation to this repo |
|---|---|---|
| `unity-lite-v2` | Tip `46f8a1f` (2022-05-26), subject "Copy Unity Lite v1". Same package name, same Amplify shape, same route table and screen set | **Inferred** copy of this lineage. This repository's tip is earlier (2021-06-08). The v2 tip claim names "Unity Lite v1"; which exact commit was copied is **Unknown / Requires Confirmation** |
| `unity-soft-ui` | Soft UI shell, package `role-based-access-control`, bucket `unity-lite-files`, overlapping `unity` paths | Same product family signals. Different UI shell. Whether they share pool and API host is **Unknown / Requires Confirmation** |
| `unity-skeleton` | Fuse React shell, different role handling | Different shell |
| `unityNodejsApi` | Older Node/Lambda auth material (separate Silicon Ark entry) | This client calls API Gateway in `eu-west-1`. No evidence in this tree that it calls that repository |

Whether `unity-lite` and `unity-lite-v2` still share a user pool and an API Gateway stage is **Unknown / Requires Confirmation**. The host and pool ids live in each repo's `src/aws-config.js` and are omitted from both documents.

## Human confirmation

- Which product name is canonical: UnityLite, Unity - Lite, or `role-based-access-control`.
- Whether this repository or `unity-lite-v2` is the client still maintained or deployed.
- Whether this client and `unity-soft-ui` / `unity-lite-v2` share a user pool and an API Gateway stage.
- What `strRole` contains, and what the path segment `1` in `/unity/getusers/1` means.
- Whether a site is still deployed, and where.
- Whether the scan-host Sonar files were ever meant to be committed.
- Which lockfile is authoritative.
- Whether any repository still hosts the Lambda that used to live under `lambda/` here.
