# Project plan — unity-skeleton

Evidence date: 2026-09-30.

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

Inspected revision: `master` at `7b94f92` (2020-10-29, Alex Kedian, "Documenting Unity..."). The scan-host path `~/projects/sonar_scan/repos/unity-skeleton` was not on this machine. The tree was read from that git revision. Identifier values in `src/config.js` (Cognito pool ids, app client id, identity pool id, API Gateway host) are omitted. The Google Maps key committed in `.env` is 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, and it is not `unity-soft-ui` (a separate Silicon Ark project). Both touch an Amplify API named `unity` in `eu-west-1`. Whether they share a backend is **Unknown / Requires Confirmation**.

## Product

The browser title is **UnityReact - Material Design Admin Template** (`public/index.html`). The shell logo text is **Unity** (`src/app/layouts/shared-components/Logo.js`). The npm package name is `fuse-react-app` at version `3.2.0` (`package.json`). `public/manifest.json` still says **React App** / **Create React App Sample**.

It is a Create React App single-page application built on the Fuse React admin template (page author meta `Withinpixels`; `LICENSE` is the ThemeForest regular-license URL). Sign-in uses Amazon Cognito through AWS Amplify. After sign-in the app loads a user row from an HTTP API named `unity`, then hard-codes the session role to `superuser`. Sales, ticketing, users, groups, privileges, and modules are stored in the browser through an axios mock (`src/@fake-db`), not through that API.

Provenance: **Implemented** in the files named above. **Documented** in `README.md` only as stock Create React App script help. The README does not mention Unity, Cognito, sales, or tickets. No formal project plan existed in the repository or in `silicon_ark/unity-skeleton/` before this file.

## Branch reality

| Line | Tip | Date | What it is |
|---|---|---|---|
| `master` (default; `origin/HEAD`) | `7b94f92` | 2020-10-29 | The only branch. Fuse React shell, Cognito auth, sales module, ticketing module, local mock database |

There are no other remote branches. History is 109 commits from `848f3d1` (2020-05-26, Donovan, "initial commit") to `7b94f92`. Authors in `git shortlog`: Donovan van der Linde (52), Donovan (30), Alex Kedian (20), Jaco Brits (7). Whether any deployed site still serves this tree is **Unknown / Requires Confirmation**.

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

No project plan or requirements document exists in the repository. The following objectives are **Inferred** from the routes, the sales client schema, and the commit subjects (sales tracking from August 2020, ticketing through October 2020):

- Provide a branded admin shell (Unity / UnityReact) that later products can extend with modules.
- Sign people up and in through Cognito, confirm email with a one-time code, then load a user record from the `unity` API.
- Track AWS-related sales clients (APN, CloudHealth, credits, Silicon billing) inside the browser.
- Track tickets, tasks, and ticket documents inside the browser.
- Administer users, groups, privileges, and nav modules against the same browser store.

The `README.md` still describes only `yarn start`, `yarn test`, `yarn run build`, and `yarn run eject`. It is **stale relative to the implementation**.

## Scope

### In this repository

- React 16 SPA, Material UI 4, Redux, redux-saga, redux-persist, React Router 5.
- Fuse layouts, navigation, settings, and splash screen, wrapped by `@unity` (theme, layout, navigation, route authorization).
- Cognito sign-in, sign-up, confirmation code, and resend (`src/app/store/sagas/auth`).
- One remote read: `GET /unity/uuid/{cognito username}` on the Amplify API named `unity`.
- Screens: profile, theme settings, users, modules, groups, privileges, sales, ticketing, example module, login, register, OTP, 404.
- Axios mock API and `localStorage` seeds under `src/@fake-db`.
- Tailwind 1 build step and PurgeCSS on production build.

### Not in this repository

- The `unity` API implementation (API Gateway is configured; the Lambda or other handler is not in this tree).
- A database server. Domain records live in `localStorage`.
- Infrastructure-as-code, Docker, Bitbucket Pipelines, or a committed SonarQube project file.
- Automated tests. `package.json` has a `test` script and the tree contains no `*.test.js` or `*.spec.js` files.
- A password-reset flow. The login screen has a button labelled "Reset Password" that submits the same form as Login.

## System shape

```text
Browser
  index.js
    Amplify.configure (Cognito, S3 bucket name, API "unity")
    App
      redux-persist + sagas
      Auth → INIT_AUTH_REQUEST (restore jwt_access_token if unexpired)
      UnityAuthorization (route.auth vs user.role)
      UnityLayout
        static nav (profile, theme, manage)
        INIT_MODULE_ACCESS → mock /api/getAllowedModules → extra nav items
        lazy routes

Sign-in
  Auth.signIn (Cognito)
  store access token in localStorage jwt_access_token
  API.get("unity", /unity/uuid/{username})
  role forced to "superuser"

Everything else
  axios POST /api/...  →  axios-mock-adapter  →  localStorage tables
```

## Major components

| Area | Where | Role |
|---|---|---|
| Shell | `src/@unity`, `src/@fuse`, `src/app/layouts` | Layout, theme, nav, route gate |
| Auth | `src/app/store/sagas/auth`, `src/app/main/pages/auth` | Cognito login, register, OTP |
| Config | `src/config.js`, `src/index.js`, `.env` | Region, pool ids, API host, maps key |
| Sales | `src/app/main/modules/sales` | Client grid, new/view client, credit types, sales types, AWS team |
| Ticketing | `src/app/main/modules/ticketing` | Ticket list, view, tasks, documents |
| Admin | `src/app/main/pages/users`, `groups`, `privileges`, `src/app/main/modules` | Users, groups, privileges, module list |
| Mock data | `src/@fake-db` | Seeds and `/api/*` handlers |
| Example | `src/app/main/modules/ExampleModule` | Fuse widget gallery |

## Milestones visible in git (not a written plan)

| When | Evidence | What landed |
|---|---|---|
| 2020-05-26 | `848f3d1` initial commit | Fuse-based app start |
| 2020-05 to 2020-08 | Donovan commits | Auth, nav, theme, user/group screens, sales CRUD |
| 2020-08-27 onward | Donovan van der Linde | Sales table, multipicker, sales client updates |
| 2020-09 to 2020-10 | Alex Kedian | Sales tracking, add/update/delete ticket, ticket tasks, ticket documents |
| 2020-10-29 | `7b94f92` | Last commit. No commits after this date on `master` |

## Implementation plan

There is no forward plan in the repository. `src/app/configs/routesConfig.js` opens with the comment `This must be automated .....` and then lists route configs by hand. Ticketing tabs other than the list are empty placeholders (`src/app/main/modules/ticketing/Ticketing.js`). A ticketing dashboard route is commented out in `TicketingConfig.js`.

Current status: **frozen at `7b94f92` (2020-10-29)**. Active development, a deployed environment, and an owner for the next change are **Unknown / Requires Confirmation**.

## Known dependencies

Runtime libraries are declared in `package.json` (React 16.13, react-scripts 3.0.1, Material UI 4.11, aws-amplify 3, axios 0.19, Redux Toolkit, redux-saga, redux-persist). Dev: Tailwind 1.0.5, PurgeCSS 1.3.0.

External systems named in config, whether or not the app calls them:

- Amazon Cognito user pool, app client, and identity pool in `eu-west-1` (`src/config.js`). Called by Amplify Auth.
- API Gateway URL in `eu-west-1`, Amplify endpoint name `unity`. Called for the uuid lookup only.
- S3 bucket `unity-app-files` in `eu-west-1`. Configured on Amplify Storage. No `Storage.*` call was found under `src`.
- Google Maps: `google-map-react` is a dependency and `REACT_APP_MAP_KEY` is set in `.env`. No import of `google-map-react` was found under `src`.

`firebase` is a dependency. Application code does not import it. A register rewrite screen shows a Firebase logo image (`RegisterReWrite.js`).

## Discrepancy with the onboarding scan

The task that created this onboarding listed `sonar-project.properties` and `sonarqube_scan.bat` at the top of the scan-host working tree. Neither file is in commit `7b94f92`. They were not part of the git tree inspected here. Whether they exist only as untracked files on the scan host is **Unknown / Requires Confirmation**.
