# Features — unity-lite

Evidence date: 2026-09-30. Revision: `master` `9b3a386` (2021-06-08).

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** (left history only), **Planned** (TODO comment only — not an approved backlog).

No feature roadmap file exists in the repository.

## 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 | Source |
|---|---|---|---|
| Calendar | `/` (exact) so `/app` and `/app/` | none (any signed-in visitor) | `Calendar.js` |
| Booking | `/booking` | none | `Booking.js` |
| Tasklist | `/tasklist` | none | `Tasklist.js` |
| Kanban | `/kanban` | none | `Kanban.js` |
| Users | `/users` | none | `Users.js` |
| User | `/user` | none | `User.js` |
| Config | `/configer` | `SUPER_ADMIN`, `ADMIN`, `MANAGER` | `Configer.js` |
| Staff | `/configer/staff` (child of Config) | none on the child; parent gate applies | `Staff.js` |
| Cron Jobs | `/configer/cronjobs` | none on the child; parent gate applies | `CronJobs.js` |
| Dashboard | `/dashboard` | `SUPER_ADMIN`, `ADMIN` | `Dashboard.js` |
| Profile | `/profile` | `SUPER_ADMIN`, `ADMIN`, `MANAGER`, `CUSTOMER` | `Profile.js` |

`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}` with `location.state`-style `data` payload.

## 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 to an API.
- Face placeholder image exists at `src/assets/images/faces/placeholder.png`.

### 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`. Jumbotron + link to login. No Amplify Auth calls.

### Config / Developer tools

`Configer` title "Developer Tools / Examples" with child links to Staff and Cron Jobs. Both children are title-only jumbotrons.

### Booking, Kanban, Profile

Title-only jumbotrons. Kanban includes "Back to login". `Kanban_data.json` and dependency `react-trello` are unused by `Kanban.js`.

## Unused

| Item | Location | Notes |
|---|---|---|
| Quotes | `src/components/Quotes.js`, exported from `components/index.js` | Same users-table pattern as Users; not in `PrivateRoutesConfig.js` |
| Timesheet | `src/components/Timesheet.js` | Title-only; not exported from `components/index.js`; not routed |
| Pivot demo | `Pivot.js`, `PivotTable*.jsx`, `Utilities.js`, `tips.js`, Plotly renderers, `pivottable.css` | No route. `PrivateRoutesConfig.js` imports `PivotTable` and does not use it |
| `react-trello` | `package.json` | Declared; no import under `src/` |
| `Kanban_data.json` | `src/components/` | Not imported by Kanban |
| Amplify Storage | `src/index.js`, `aws-config.js` | Bucket configured; no `Storage.*` usage found |
| `MAX_ATTACHMENT_SIZE` | `aws-config.js` | Constant `5000000`; unused by components found |
| Storybook stories | `NotFound.stories.js`, `JumbotronWrapper.stories.js` | Scripts in `package.json`; no `.storybook` config directory |
| `makeData` | used in Users/Quotes memos | Generated data unused; tables use API (or empty) state |
| `INITIAL_EVENTS` | `event-utils.js` | Imported by Calendar; live events come from API |

## Removed (git history only)

| Item | Evidence | Notes |
|---|---|---|
| Most of `lambda/` | Commit `3a6ecbd` (2021-03-11) | Deleted handlers for users, uuid, permissions mocks, DynamoDB libs, etc. |
| Remaining calendar Lambdas | Commit `b358947` (2021-03-17) | Deleted `addcalendarevent.js`, `getcalendarevents.js`, `removecalendarevent.js`, `updatecalendarevent.js` |

Those files showed MySQL access to `sysUser` and `crmCalendar`. They are not in the tip tree. Whether equivalent code lives in another repository is **Unknown / Requires Confirmation**.

## Planned (TODO comments only)

- README: "Design same approach for components".
- `PrivateRoutesConfig.js`: make title optional; multi-type title; add child route support (children for Config already exist).
- `Auth.js`: comment about logged-in users and public routes (redirect already implemented).
- `Login.js`: commented multi-role selector and "Support multi roles."

None of these are dated backlog items with owners.

## Recently changed

At tip `9b3a386`, the latest meaningful subject is `8ed31a0` "import graph libs" (2021-06-08), which brought Plotly / pivot-related dependencies into the client. No further commits after the merge.

## Deprecated / not applicable

No deprecation markers in source. The in-repo Lambda path is gone from the tip; README still says "Using Amplify / lambda".

## Consistency notes vs `unity-lite-v2`

Silicon Ark `unity-lite-v2` (OVER-324) documents a 2022-05-26 tip labelled "Copy Unity Lite v1". Feature surface (routes, Amplify, calendar, users, placeholders) matches this repository closely. Differences observed in this tree:

- Longer 2021 history and explicit Lambda removal commits.
- `placeholder.png` is present under `src/assets/images/faces/` (v2 docs recorded it missing).
- Same unused Quotes / Timesheet / Pivot pattern.

Whether the two tips diverge in `aws-config.js` ids was not compared in this document (values omitted).
