# Project plan — unity-frontend

Evidence date: 2026-09-30.

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

Inspected revision: `master` at `0de9d02` (2019-08-14, Jaco Brits, "README.md edited online with Bitbucket"). `origin/HEAD` points at `master`. The scan-host path `~/projects/sonar_scan/repos/unity-frontend` was not on this machine. The tree was read from that git revision, plus the three other remote branches.

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 also not `unityFrontend` (`git@bitbucket.org:overdrive/unityfrontend.git`, Silicon Ark directory `unityFrontend/`), which is a later Fuse React work-management app. The names are similar. The remotes, histories, and screens are different.

No formal project plan existed in the repository or in `silicon_ark/unity-frontend/` before this file.

## Product

The root `README.md` titles the project **Unity**. It describes a WAMP stack (PHP Laravel plus browser JavaScript), a React frontend, and a Laravel API that uses Passport. The only API URL written there is `http://localhost/coreUnit/api/public/api/v1/login`. There is no `Api` directory, no Laravel application, and no Passport code in this repository.

The tree that was committed is two browser apps plus a vendor theme dump:

1. `frontend/` — Create React App package `fuse-react-app` `3.0.0`. The HTML title is **Unity WebSystem** (`frontend/public/index.html`). The custom login splash says **Welcome to the UNITY!** and **This is a all in one business software . For Startup to SME and beyond.** The page author meta is still Withinpixels. `LICENSE` is the ThemeForest regular-license URL. This is the Fuse React admin template with a custom `/login` page and a stripped navigation file.
2. `public/` — a second Create React App, package name `public` `0.1.0`. The HTML title is **Unity**. It renders a Formik login form and a client table. It is not the Fuse app.
3. `public/src/components/assets/` — SmartAdmin v1.5–v1.7 static assets (MyOrange). The React entry files do not import this folder.

Provenance: **Documented** in the root `README.md` for the Laravel/Passport description. **Implemented** in the files named above for the two React apps. Whether "all in one business software" was an approved product statement or splash copy left from a template edit is **Unknown / Requires Confirmation**.

## Branch reality

| Line | Tip | Date | Ahead of `master` | What it is |
|---|---|---|---|---|
| `master` (default; `origin/HEAD`) | `0de9d02` | 2019-08-14 | — | Fuse shell, custom login, second CRA under `public/`, SmartAdmin assets |
| `banele` | `7a0569f` | 2019-09-05 | 1 commit | Adds `.idea` to `public/.gitignore`. Not merged |
| `trev` | `e1d8ebb` | 2019-09-02 | 6 commits | Moves the `public/` CRA up to the repository root (`src/`, root `package.json`). Login and dashboard sources are the same files, relocated. Not merged |
| `sergei` | `c2e721f` | 2019-09-26 | 2 commits | Adds `react-frontend/` (a third CRA with an in-memory login flag), comments out Yup validation on `public/src/components/LoginForm.js`, and registers an extra `/pages/profile` route in the Fuse app. Not merged |

`master` history is three commits: `aa7d806` (2019-08-07, README only), `69022d4` (2019-08-14, `siliconoverdrive`, the full tree), `0de9d02` (README wording). Whether any deployed site still serves any of these branches is **Unknown / Requires Confirmation**.

A commit message on `trev` names a local WAMP path `C:\wamp64\www\unity_frontend\src`. That is historical developer-machine evidence, not a path in this repository.

## Objectives

No written objectives exist beyond the root README and the login splash. The following are **Inferred** from those texts and from the screens that were actually wired up:

- Provide a Unity-branded web shell for business software aimed at startups and SMEs (splash copy on `/login`).
- Sign a person in against a Laravel Passport API that is not in this repository (README and the two login handlers).
- Show a client list after login in the smaller CRA (`public/`).
- Keep the Fuse demo applications (mail, todo, contacts, calendar, chat, e-commerce, scrumboard, academy, notes, dashboards, file manager) in the route table.

The root README is **stale relative to the implementation**: it tells the reader to run Artisan inside an `Api` directory that was never committed, and it says the frontend build command is `yarn build` without saying which of the two apps to build.

## Scope

### In this repository (`master`)

- Fuse React SPA: React 16.8.6, Material UI 4.0.1, Redux, React Router 5, Tailwind 1 build step, PurgeCSS on production build.
- Custom login at `/login` posting to `http://local.unity/api/public/api/v1/login`.
- Fuse login-2 page at `/pages/auth/login-2` posting to a localhost `coreUnit` URL.
- Stock Fuse apps, documentation, register (JWT / Firebase / Auth0 tabs), logout, and role-example routes, still registered.
- A second CRA under `public/` with routes `/` (login) and `/dashboard` (client table).
- SmartAdmin static assets stored under that second app and not imported by its entry file.
- Apache snippets at the repo root and in `frontend/` that set `Access-Control-Allow-Origin: *`.

### Not in this repository

- The Laravel API, Passport, database, or the `coreUnit` / `local.unity` hosts named in the README and login code.
- `@fake-db`. Fuse's own JWT documentation still tells the reader the demo uses `@fake-db`. That directory is not in the tree, so the demo `/api/*` calls have no in-repo mock.
- `sonar-project.properties` and `sonarqube_scan.bat`. A 2026-09-28 discovery inventory listed them at the repo root. They are absent from `master`, `banele`, `sergei`, and `trev`.
- Docker, Bitbucket Pipelines, infrastructure-as-code, or a committed test suite. `frontend/package.json` and `public/package.json` both have a `test` script. No `*.test.js` or `*.spec.js` file exists on `master`. `sergei`'s `react-frontend/src/App.test.js` is the Create React App sample and is not on `master`.
- A merged decision about which of the three frontends (`frontend/`, `public/`, `react-frontend/` on `sergei`) is the product.

### On unmerged branches only

- `trev`: same `public/` app, relocated to the repository root so Create React App can see `src/index.js`.
- `sergei`: `react-frontend/` login that sets an in-memory `isAuthenticated` flag and does not call an API. Username and password inputs are not read.
- `banele`: JetBrains `.idea` ignore entry.

## Architecture

```text
Browser
  ├─ frontend/   Fuse React (yarn start → CRA default http://localhost:3000)
  │     /login  ──POST──► http://local.unity/api/public/api/v1/login
  │     /pages/auth/login-2 ──POST──► http://localhost/coreUnit/api/public/api/v1/loginlogin
  │     other Fuse screens ──► relative /api/*   (no handler in this repo)
  └─ public/     second CRA (also CRA default port 3000 if started alone)
        /dashboard ──GET──► http://localhost/coreUnit/api/public/api/client/list
        assets/    SmartAdmin files, not imported by src/index.js

Laravel API (README, not in this repo)
  http://localhost/coreUnit/api/public/api/v1/login
  Passport auth — Documented only
```

The login-2 URL is the string in `Login2Page.js`: the base already ends in `/login`, then the code appends `login`. See the PRD for the resulting request.

`sergei`'s `react-frontend/` does not call either host. Its login button flips a module-level flag.

## Major components

| Component | Location | Role on `master` |
|---|---|---|
| Fuse shell | `frontend/src/app/App.js`, `frontend/src/@fuse/` | Theme, layout, route authorization |
| Route table | `frontend/src/app/configs/routesConfig.js` | `/` redirects to `/login`; Fuse apps stay registered |
| Navigation | `frontend/src/app/configs/navigationConfig.js` | One item, "Example", URL `/example` |
| Example page | `frontend/src/app/example/` | Exists. `ExampleConfig` is not imported by `routesConfig.js` |
| Unity login | `frontend/src/app/main/login/Login.js` | Custom submit against `local.unity` |
| Login-2 | `frontend/src/app/main/pages/auth/login-2/Login2Page.js` | Second submit against `coreUnit` |
| Register | `frontend/src/app/main/register/Register.js` | Fuse JWT / Firebase / Auth0 tabs. Splash still says "Welcome to the FUSE!" |
| Auth bootstrap | `frontend/src/app/auth/Auth.js` | JWT, Auth0, and Firebase auto-checks are commented out |
| CRA prototype | `public/src/index.js`, `LoginForm.js`, `Dashboard.js` | Login form and client table |
| SmartAdmin dump | `public/src/components/assets/` | Static theme. Not referenced by the CRA entry |
| CORS snippets | `.htaccess`, `frontend/.htaccess` | `Access-Control-Allow-Origin: *` |

## Milestones visible in git

There is no milestone document. The commit dates are the only timeline:

| Date | Evidence | What landed |
|---|---|---|
| 2019-08-07 | `aa7d806` | Root README describing Laravel + React |
| 2019-08-14 | `69022d4`, `0de9d02` | Both frontends and the README edit that is still `master` |
| 2019-09-02 | `trev` | CRA moved to the repo root. Not merged |
| 2019-09-05 | `banele` | `.idea` gitignore. Not merged |
| 2019-09-26 | `sergei` | Third CRA and small login edits. Not merged |

No commit after 2019-09-26 exists on the remotes inspected.

## Known dependencies

Runtime libraries are in `frontend/package.json` and `public/package.json`. Notable ones:

- Fuse app: React 16.8.6, React Router 5, Redux 4, Material UI 4.0.1, axios 0.19.0, formsy-react, jsonwebtoken, jwt-decode, firebase 6.1.0, auth0-lock 11.16.0, axios-mock-adapter 1.16.0 (declared; no mock setup file was found under `frontend/src`).
- `public/` app: React 16.8.6, React Router 5.0.1, Formik 1.5.8, Yup 0.27.0, axios 0.19.0, email-validator 2.0.4 (declared; `LoginForm.js` does not import it).

External systems named in code or the README, and not implemented here:

- Laravel API at `coreUnit` and at `local.unity` (Passport, **Documented** in the README only).
- Google Maps, via `REACT_APP_MAP_KEY` in `frontend/.env`. The key value is omitted from this document. It is read by the e-commerce order screen, an analytics widget, and a documentation example.
- Firebase and Auth0. Both config objects are commented placeholders (`YOUR_API_KEY`, `YOUR_DOMAIN`). Auto-login for both is commented out in `Auth.js`.

## Current project status

**Implemented** on `master`, last touched 2019-08-14: a Fuse template shell with Unity wording on one login page, a second unfinished login/dashboard CRA, and an unused SmartAdmin asset tree. Login does not store a token or update the Redux user (see the PRD). The client table renders four hard-coded rows even after the list request returns.

**Not merged:** layout cleanup (`trev`), a third login prototype (`sergei`), an IDE gitignore line (`banele`).

**Unknown / Requires Confirmation:**

- Which frontend, if any, was the one intended to ship.
- Whether the Laravel API in the README was ever built in another repository, and which base URL is correct (`local.unity` versus `localhost/coreUnit`).
- Whether the Sonar files from the 2026 discovery inventory were untracked local files or a different working tree.
- Whether this repository is superseded by `unityFrontend` or another Unity repo. The code does not say so.
