# Features — unity-lite-v2

Evidence date: 2026-09-30. Revision: `master` `46f8a1f` (2022-05-26, "Copy Unity Lite v1").

Status words: **Current** (present and wired), **Partial** (screen or path exists but is incomplete), **Unused** (code or config present, no call from the running app), **Removed / commented** (left in tree but not registered).

No feature roadmap file exists in the repository. "Planned" below means a TODO comment, not an approved backlog.

## Current

### App shell

- Document title UnityLite (`public/index.html`).
- Wordmark "UnityLite" in `TopNav` (`src/components/common/TopNav.js`).
- Landing credit "developed by silicon overdrive" linking to `https://www.overdrive.co.za/` (`src/components/LandingPage.js`).
- Bootstrap 4 layout via `react-bootstrap` and a Bootstrap 4.3.1 CDN stylesheet. W3.CSS and Raleway from CDNs in `index.html`.
- Public routes and `/app` private routes (`src/routes/index.js`).
- 404 jumbotron for unknown paths under `/app` (`src/components/common/NotFound.js`).
- Service worker file exists and is unregistered (`src/index.js` calls `serviceWorker.unregister()`).

### Authentication

- Login `/login` — Cognito `Auth.signIn`, then `GET /unity/uuid/{username}` (`src/components/Login.js`).
- Signed-in flag is `localStorage.roles` (`src/utils/index.js`).
- User payload `localStorage.userDetails` with `userID` and `userName` (`Login.js`).
- Logout removes `roles` only and returns to `/` (`TopNav.js`). No `Auth.signOut()`.

### Navigation and access

Role strings in `src/config/Roles.js`: `SUPER_ADMIN`, `ADMIN`, `MANAGER`, `CUSTOMER`, `GUEST`. The file comment calls them placeholders.

| Screen | Path under `/app` | permission |
|---|---|---|
| Calendar | `/` (exact) so `/app` and `/app/` | none (any signed-in visitor) |
| Booking | `/booking` | none |
| Tasklist | `/tasklist` | none |
| Kanban | `/kanban` | none |
| Users | `/users` | none |
| User | `/user` | none |
| Config | `/configer` | `SUPER_ADMIN`, `ADMIN`, `MANAGER` |
| Staff | `/configer/staff` (child of Config) | none on the child; parent gate applies |
| Cron Jobs | `/configer/cronjobs` | none on the child; parent gate applies |
| Dashboard | `/dashboard` | `SUPER_ADMIN`, `ADMIN` |
| Profile | `/profile` | `SUPER_ADMIN`, `ADMIN`, `MANAGER`, `CUSTOMER` |

`GUEST` is not listed on any route. It does not open Config, Dashboard, or Profile. It still matches routes that have no `permission`.

### Calendar

Location: `src/components/Calendar.js`.

- Month, week, and day views (FullCalendar 5).
- Load `POST /unity/getcalendarevents/` for the visible range and the stored `userID`.
- Create via `window.prompt`, `POST /unity/addcalendarevent/`.
- Drag, drop, resize → `POST /unity/updatecalendarevent/`.
- Click to confirm delete → `POST /unity/removecalendarevent/`.
- Weekend toggle. Sidebar list of loaded events.
- Failed writes call `revert()`.

### Users

Location: `src/components/Users.js`.

- Table from `POST /unity/getusers/1`.
- Columns: name, contact, job, role, email, location, EDIT.
- EDIT targets `/app/user/{UserID}`.

## Partial

### Login form

The screen is wired to Cognito, and the button always navigates to `/app`. The email and password `onChange` handlers do not read the typed value (`Login.js`). Initial state is a pair of literals in that file (omitted here). No on-screen error.

### User edit

Location: `src/components/User.js`. Route `/app/user`.

- Loads `POST /unity/getdetails` with `{ id }` taken from `useLocation().data`.
- Shows a profile form (company fixed as "Silicon Overdrive", role multi-select, address fields).
- Update Profile does not submit and does not call an API.
- Requires `src/assets/images/faces/placeholder.png`, which is not in the tree.

### Task list

Location: `src/components/Tasklist.js`. Route `/app/tasklist`.

- Renders two hardcoded tasks, including "Work on Language changes for SAWIS".
- Add Task toggles a form that does not save.
- Imports `react-icon-checkbox` and `react-icons/bs`, which are not in `package.json`.

### Dashboard

Location: `src/components/Dashboard.js`. Route `/app/dashboard`, admins only.

- Static stat cards (150GB, $ 1,345, 23 errors, +45K followers).
- Chartist charts titled "Users Behavior", "Email Statistics", "2017 Sales".
- A static "Tasks" / "Backend development" table. Buttons do not call handlers.
- No `unity` request.

### Register and forgot password

Routes `/register` and `/forgot-password` render a title and a back link (`Register.js`, `ForgotPassword.js`). They do not call Cognito.

### Placeholder pages

| Feature | Status | Location |
|---|---|---|
| Booking | Title only | `src/components/Booking.js` |
| Kanban | Title plus a link to `/login`. Does not render `Kanban_data.json` or `react-trello` | `src/components/Kanban.js` |
| Profile | Title only. Permission-gated | `src/components/Profile.js` |
| Config / developer tools | Title "Developer Tools / Examples" plus child links | `src/components/Configer.js` |
| Staff | Title only, under Config | `src/components/Staff.js` |
| Cron jobs | Title only, under Config | `src/components/CronJobs.js` |

`Timesheet.js` is a title-only component and is not exported from `src/components/index.js` and not routed.

## Unused

| Item | Evidence |
|---|---|
| `Quotes.js` | Exported from `components/index.js`. Same getusers table as Users. Not in `PrivateRoutesConfig.js` |
| `Pivot.js`, `PivotTable.jsx`, `PivotTableUI.jsx`, `TableRenderers.jsx`, `PlotlyRenderers.jsx`, `Utilities.js`, `tips.js`, `pivottable.css` | Vendored pivot demo. `PrivateRoutesConfig.js` imports `PivotTable` and never mounts it. `Pivot.js` imports `react-dropzone` and `papaparse`, which are not dependencies |
| `makeData.js` | Random rows via `namor`. Called by Users and Quotes. The return value is not passed to the table |
| `event-utils.js` `INITIAL_EVENTS` | Sample all-day and timed events. Calendar does not use the export. `createEventId` is used |
| `Kanban_data.json` | Sample lanes, first card "Buy milk". Not imported |
| `react-trello` dependency | In `package.json`. No import under `src/` |
| `MAX_ATTACHMENT_SIZE` (5000000) and Amplify Storage | `src/aws-config.js`, `src/index.js`. No `Storage.get` / `Storage.put` |
| `unityRequests` GET branch | `action == "get"` exists. Every caller uses the default POST |
| Storybook | Scripts `storybook` and `build-storybook` in `package.json`. Stories: `NotFound.stories.js`, `JumbotronWrapper.stories.js`. No `.storybook` directory |
| `src/assets/img/loading-bubbles.svg`, `src/assets/images/logo.svg` | Tracked. No import of these paths was found under `src/**/*.js` |
| Jwt token read in `Login.js` | `jwtToken` is assigned and not stored |

## Removed / commented

- Login role multi-select (five roles, alert "Support multi roles.") is inside a JSX comment in `Login.js`, with "TODO: Dynamic role options".
- No deleted-feature note exists in git history. The second commit message is "Copy Unity Lite v1". A feature list of that source tree is not in this repository.

## Planned (comments only)

| Comment | Where | Conflict with the code |
|---|---|---|
| "Design same approach for components" | `README.md` | No further design document |
| Optional title, title as a node, child route support | `src/config/PrivateRoutesConfig.js` | `Configer.js` already renders child routes for Staff and Cron Jobs |
| Logged-in users should not open public routes; check is temporary | `src/routes/Auth.js` | The redirect to `/app` is already in `Auth` |

## Recently changed

Git history has two commits, both on 2022-05-26. The tip subject is "Copy Unity Lite v1" (`46f8a1f`, `liamkleyn_od`). The initial commit is `fb4879c` (Jaco Brits). There is no later change to call "recent" relative to the tip. Nothing in the tree was modified after that date.

## Deprecated

No deprecation notice, feature flag, or removed-route comment was found. `GUEST` is defined and unused by the route table. That is unused, not marked deprecated.

## Not in this repository

- Lambda handlers for the `unity` paths.
- A database schema.
- Deployment, Docker, or Bitbucket Pipelines.
- Sonar project files. The onboarding scan listed `sonar-project.properties` and `sonarqube_scan.bat`. They are not tracked at `46f8a1f`.
- Redux. The README states the tree is without Redux. `package.json` has no `redux` dependency.
