# Project plan — unity-lite-v2

Evidence date: 2026-09-30.

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

Inspected revision: `master` at `46f8a1f` (2022-05-26 10:25:20 +0200, author `liamkleyn_od`, subject "Copy Unity Lite v1"). The scan-host path `~/projects/sonar_scan/repos/unity-lite-v2` was not on this machine. The tree was read from 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-soft-ui` and it is not `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-v2/` before this file.

## Branch reality

| Line | Tip | Date | What it is |
|---|---|---|---|
| `master` (default; `origin/HEAD`) | `46f8a1f` | 2022-05-26 | The only branch. Bootstrap shell, Amplify auth, calendar and user API calls, placeholder screens |

There are no other remote branches. History is two commits:

| Commit | Date | Author string | Subject |
|---|---|---|---|
| `fb4879c` | 2022-05-26 07:53:29 +0000 | Jaco Brits | Initial commit |
| `46f8a1f` | 2022-05-26 10:25:20 +0200 | liamkleyn_od | Copy Unity Lite v1 |

95 tracked files. No commits after 2022-05-26. Whether any deployed site still serves this tree is **Unknown / Requires Confirmation**.

The commit subject says the tree was copied from Unity Lite v1. Which repository that copy came from is **Unknown / Requires Confirmation**. It is not recorded in the commit message beyond that subject.

## 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.

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.
- 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

- The Lambda (or other) implementation behind API Gateway. The README names Lambda. The handler source is not in this tree. **Unknown** which repository implements it.
- A database. User and calendar fields are only visible as JSON property names the UI sends or expects.
- 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 `46f8a1f`. 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` | Title (and sometimes a link) only |
| Samples | `Dashboard.js`, `Tasklist.js`, `Kanban_data.json`, `Pivot.js` | Hardcoded or vendored UI, not loaded from the API |
| 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 a single day:

1. `fb4879c` — initial commit (2022-05-26).
2. `46f8a1f` — "Copy Unity Lite v1" (2022-05-26). This is the tip.

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 2022-05-26. One branch. No pipeline file. No deployment manifest. Calendar and user list are the only domain screens that call the API. Register, forgot password, booking, kanban, profile, staff, and cron jobs do not. The task list and the dashboard do not call the API.

`unity-soft-ui` (Silicon Ark, inspected `main` `afdeab6`, 2022-01-24) is a later-looking Soft UI shell with the same npm package name and overlapping `unity` paths. This repository's tip is four months after that Soft UI tip and is the unstyled copy described by its own README. They do not share a git history.

## Relationship to other Unity clients

| Project | What the Silicon Ark record says | What this tree shows |
|---|---|---|
| `unity-soft-ui` | Package `role-based-access-control`. Bucket `unity-lite-files`. Paths include `/unity/getcalendarevents/`, `/unity/uuid/`, `/unity/getusers/1`. Brand "Unity Soft". Tip `afdeab6` (2022-01-24) | Same package name, same bucket name, same path strings for calendar, uuid, and getusers. Brand "UnityLite". Different authors, default branch `master`, tip `46f8a1f` (2022-05-26). No Soft UI theme |
| `unity-skeleton` | Fuse React shell, bucket not `unity-lite-files`, role hard-coded to `superuser` after uuid lookup | Different shell, different role handling |
| `unityNodejsApi` | Lambda `unityAuth` in `us-east-2`, MySQL login module, tip 2019-12-01 | This client calls API Gateway in `eu-west-1`. No evidence in this tree that it calls `unityAuth` |

Whether `unity-lite-v2` and `unity-soft-ui` use the same API Gateway host and the same Cognito pool is **Unknown / Requires Confirmation**. The host and pool ids live in each repo's `src/aws-config.js` and are omitted from both documents. They were not compared as part of this write-up.

## Human confirmation

- Which product name is canonical: UnityLite, Unity - Lite, or `role-based-access-control`.
- Which repository "Copy Unity Lite v1" was copied from, and whether that source is still the one to maintain.
- Whether this client and `unity-soft-ui` 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.
