# Features — unity-skeleton

Evidence date: 2026-09-30. Revision: `master` `7b94f92` (2020-10-29).

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 comment or a commented route, not an approved backlog.

## Current

### App shell

- Fuse layout 1 by default (`src/app/configs/settingsConfig.js`): navbar, toolbar, footer, custom scrollbars, themes `default` / `mainThemeDark` / `mainThemeLight`.
- Logo wordmark "Unity" (`src/app/layouts/shared-components/Logo.js`).
- Splash screen while `INIT_AUTH_REQUEST` is in flight (`src/app/auth/Auth.js`).
- Lazy route components (`React.lazy` in each `*Config.js`).
- 404 at `/error` (`Error404Page.js`). `/` redirects to `/profile`.
- Redux + saga + redux-persist. Auth, fuse, and `SalesModule` are not persisted by redux-persist.

### Authentication

- Login `/login` — Cognito `Auth.signIn`, min length 4, required fields (`JWTLoginTab.js`, `LoginSaga.js`).
- Register `/register` — Cognito `Auth.signUp`, then `/otp` on success (`RegisterSaga.js`).
- Email confirmation `/otp` — `Auth.confirmSignUp`, resend via `Auth.resendSignUp`.
- Session restore from `localStorage.jwt_access_token` when `exp` is still in the future (`InitAuthSaga.js`).
- Logout action clears the token (`src/app/store/actions/auth/user.actions.js`).

### Navigation and access

- Static items: Profile, Theme Settings, Manage → Users, Modules, Groups, Privileges (`navigationConfig.js`).
- Module items injected at layout mount from `localStorage.moduleDB`: Sales, Ticketing, Example Module (`InjectModules.js`, `src/@fake-db/seeds/Module.js`).
- Route auth default `superuser` and `user` (`routesConfig.js`). Guest-only auth on login, register, and OTP.

### Sales module

Location: `src/app/main/modules/sales`.

- Client grid at `/sales` with column picker (`ColumnPickerModal`) and Excel upload (`ExcelUpload`).
- New client `/sales/new` and view client `/sales/client` with tabs Client Management, Sales Tracking, Credit Application.
- Credit types `/sales/credit`, sales types `/sales/type`, AWS team `/sales/aws`.
- Mock CRUD sagas under `src/app/store/sagas/modules/Sales/`.

History: sales CRUD commits from 2020-08 (Donovan van der Linde) through sales tracking on 2020-10-01 (`711a3b2`, Alex Kedian).

### Ticketing module

Location: `src/app/main/modules/ticketing`.

- Ticket list and add modal at `/ticketing` (tab `list` only).
- View ticket `/ticketing/view` with ticket fields, tasks, and documents.
- Mock sagas: add, update, delete, get, selected get, task add/update/delete, document add and download.

History: add ticket `38150f7` (2020-10-08) through document functionality `d87f5ba` (2020-10-21) and "Fixed some inconsistencies" `050d3e4` (2020-10-28).

### Administration

- Users `/users` — list and in-page `ViewUser` privilege editor (`src/app/main/pages/users`).
- Groups `/groups` — list, add, delete, in-page `ViewGroup` (`src/app/main/pages/groups`).
- Privileges `/privileges` — list, add, delete (`src/app/main/pages/privileges`).
- Modules `/modules` — add a nav module and a matching privilege in the mock DB (`AddModule.js`, `src/@fake-db/api/Modules.js`).

### Local mock database

- Axios mock adapter on the default axios instance, with `mock.onAny().passThrough()` after the specific routes (`src/@fake-db/index.js`).
- Tables seeded once: auth, FAQ, groups, icons, knowledge base, modules, privileges, profile, quick panel, scrumboard, search, widgets, sales clients, AWS team, credit types, sales types, tickets.

### Build

- `yarn start` — Tailwind build, then CRA dev server (README: port 3000).
- `yarn run build` — Tailwind, PurgeCSS (`purge-tailwindcss.js`), CRA build without source maps.
- `yarn run build-stats` and `bundle-report` — webpack bundle analyzer.

## Partial

| Feature | Evidence | What is missing |
|---|---|---|
| Ticketing tabs | `Ticketing.js` tabs `assigned`, `completed`, `Tab 4`, `Tab 5` | Bodies are empty. Components are commented out. Comment: `TODO - Change this to TableList` |
| Profile | `ProfilePage.js` | Static "John Doe" / Velazquez avatar. Timeline and Photos tabs exist as files and are not mounted by `ProfilePage.js` (only `AboutTab` is imported) |
| Theme settings | `ThemeSettings.js` | Header says "User Management"; body is the Fuse settings widget |
| Register | `JWTRegisterTab.js`, `RegisterSaga.js` | Button label is "Login". Password confirmation is not compared. `displayName` and `group` are unused. Failures still show the success message |
| Reset password | `JWTLoginTab.js` | Button submits login. No forgot-password API |
| Privilege enforcement | `NavVerticalItem.js`, `UnityAuthorization.js` | Privileges are stored and labelled on nav items. Route gate ignores them. Nav hide requires both permission and privilege to fail; items have no `auth`, so they stay visible |
| Session restore vs login | `InitAuthSaga.js` vs `LoginSaga.js` | Empty API body is a synthetic superuser on login, and an exception object on restore |
| User list vs Cognito | `GetAllUsers.js`, `RegisterSaga.js` | The users screen reads the mock `/api/getUsers`. Cognito sign-up does not insert that table |

## Unused

| Item | Evidence |
|---|---|
| Amplify Storage / S3 bucket `unity-app-files` | Configured in `src/index.js`. No `Storage.` call under `src` |
| `MAX_ATTACHMENT_SIZE` (5_000_000) | `src/config.js` only |
| `REACT_APP_MAP_KEY` and `google-map-react` | `.env` and `package.json`. No `google-map-react` import under `src` |
| `firebase` dependency | `package.json`. No `firebase` import under `src`. Logo image only on `RegisterReWrite.js` |
| Mock JWT login `GET /api/auth` and `GET /api/auth/access-token` | `src/@fake-db/api/Auth.js`. `LoginSaga` uses Cognito instead |
| Mock `POST /api/auth/register` | Same file. `RegisterSaga` uses Cognito instead |
| `serviceWorker.js` | Not imported from `src/index.js` |
| `src/@unity/UnityUtils.js` `hasPrivilege` | Nav uses `FuseUtils.hasPrivilege`. The UnityUtils copy returns false for every non-superuser string privilege (comment says "dispatch the action") |
| FAQ, knowledge base, scrumboard, quick panel, search, icons, widgets mock APIs | Seeded and mocked. No route in `routesConfig.js` mounts them. FAQ nav item is commented out in `Module.js` |
| `build-docs` script | `package.json` deletes and rebuilds `src/app/main/documentation/material-ui-components`. That documentation app path was not part of the route table |

## Removed / commented

- Mock auth users `admin`, `staff`, and `user` in `src/@fake-db/seeds/Auth.js`.
- Ticketing dashboard route in `TicketingConfig.js`.
- Sales routes mistakenly commented inside `TicketingConfig.js` (copies of `/sales/credit`, `/sales/type`, `/sales/new`). The live sales routes remain in `SalesConfig.js`.
- FAQ module nav item in `src/@fake-db/seeds/Module.js`.

## Example module (template gallery)

`/ExampleModule` shows graph widgets, table widgets, a privileges tab, card widgets, and an icons tab (`ExampleModule.js`). Card sample data includes the string `firebase`. This is Fuse sample UI kept as a module, not a separate product workflow. **Current** as a route. **Inferred** as demo content from the widget data and the module title "Example Module".

## Not in this repository

- Server-side persistence for sales or tickets.
- Deployment manifests, pipelines, or Sonar project files (see project plan for the scan-host discrepancy).
- Automated tests.
