# Features — DoctorX_Josh

Evidence date: 2026-10-16.

Source: `git@bitbucket.org:overdrive/doctorx_josh.git`, `master` at `01973b1` (2021-05-04).

Status words: **Implemented** (present and wired), **Partial** (screen or call exists, and a step does not do what the labels say), **Unused** (declared or left in the tree, no caller), **Removed** (was in git, not on the tip), **Planned** (named as future work), **Unknown**.

## Current features

| Feature | Status | Where |
|---|---|---|
| Landing page, brand "Doctor X", Login and Register links | Implemented | `src/components/LandingPage.js`, `src/components/common/TopNav.js` |
| Email and password login against Cognito | Implemented | `src/components/Login.js` `Auth.signIn` |
| Unverified-email modal | Implemented | `Login.js`. Redirect target is `/Register?verify=` |
| Doctor lookup on login | Implemented | `API.post` `/josh/getuuid/` with `strEmail` |
| Last-login stamp | Implemented | `POST /josh/update/` with `dtLastLoggedIn` |
| Session flag in `localStorage` | Implemented | `src/utils/index.js` `isLoggedIn` |
| Private shell under `/app` with nav | Implemented | `src/routes/PrivateRoutes.js` |
| Home greeting with surname | Implemented | `src/components/Home.js` |
| Self registration and emailed code | Implemented | `src/components/Register.js` |
| Terms and privacy modals on the registration checkbox | Implemented | `Register.js`. Text is the strings in that file |
| Create or update doctor row after confirmation | Implemented | `POST /josh/create/` or `POST /josh/update` |
| Resend sign-up code | Implemented | `Auth.resendSignUp` in `Register.js` and `Users.js` |
| Forgot password (email match, code, new password) | Implemented | `src/components/ForgotPassword.js` |
| Logout | Implemented | `TopNav.js` `Auth.signOut` plus clearing `localStorage` |
| Diagnosis form and POST | Partial | `src/components/Diagnosis.js`. See gaps below |
| Own profile load and update | Implemented | `src/components/Profile.js` |
| Role dropdown on profile, disabled | Implemented | `Profile.js`. Not included in the update body |
| Doctor table for `SUPER_ADMIN` | Implemented | `src/components/Users.js`, `PrivateRoutesConfig.js` |
| Sort, per-column starts-with filter, global search | Implemented | `Users.js` `react-table` |
| Add doctor dialog | Partial | `Users.js`. Calls `Auth.adminCreateUser` then `POST /josh/create/` |
| Edit doctor dialog | Partial | `Users.js` `POST /josh/update/`. City is loaded from `strLocation` |
| 404 inside `/app` | Implemented | `src/routes/MapAllowedRoutes.js`, `NotFound.js` |
| Particle background | Implemented | `src/App.js` `particles-bg` |
| Amplify API client | Implemented | `src/index.js`, `src/components/unityRequests.js` |
| Amplify Storage configuration | Unused at call sites | `src/index.js`, `src/aws-config.js` |
| CRA service worker file | Unused | `src/serviceWorker.js` is called with `unregister()` |
| Jest render smoke test | Implemented | `src/App.test.js` |
| Storybook stories for jumbotron and 404 | Partial | `JumbotronWrapper.stories.js`, `NotFound.stories.js`. No `.storybook` config in git |
| Prettier npm script | Implemented as a script | `package.json` `pretty`. No config file in git |

## Diagnosis gaps (Partial)

All of these are on the tip, in `src/components/Diagnosis.js`:

- Type and model `<select>` elements each contain one option (`"Type"`, `"Model"`).
- The file input writes `e.target.value` into form state. It does not read `e.target.files` and does not call Amplify Storage.
- `MAX_ATTACHMENT_SIZE` (5000000) in `src/aws-config.js` is not imported anywhere else.
- The response is stored on state key `"Diagnosis"`. The textarea reads `"diagnosis"`.

## Doctor-dialog gaps (Partial)

All of these are on the tip, in `src/components/Users.js`:

- The "send activation email" checkbox is `sendMail`. The suppress check reads `sendmail`.
- `MessageAction: "SUPRESS"` is attached to an attributes object that `adminCreateUser` does not receive.
- EDIT copies `row.original.strLocation` into the city field. The column and the save body use `strCity`.
- After save, the modal stays open and `getusers` is not called again.
- Create errors inside the inner `try` are `console.log` only.

## Registration gaps

- New rows send `strRole` as the string `['GUEST']`, which is not valid JSON and is not a role in `src/config/Roles.js`.
- The existing-row update reads `response.UserID` from the `confirmSignUp` return value.
- Name and surname are not Cognito attributes. They are sent only on the doctor create/update.
- Login's unverified redirect uses `/Register`. The route path is `/register`.

## Declared and unused

| Item | Evidence |
|---|---|
| `@fullcalendar/*` | `package.json` only. No import under `src/` |
| `chartist`, `react-chartist` | `package.json` only |
| `react-trello` | `package.json` only |
| `namor` and `src/components/makeData.js` | `makeData.js` imports `namor`. No other file imports `makeData` |
| Nucleo font files and many images under `src/assets/` | Present in git. Which screens reference them was not fully traced. `App.js` does not import them |
| `Auth.currentSession()` | Commented out in `unityRequests.js` |

## Removed

| Feature | When | Evidence |
|---|---|---|
| Calendar Lambda handlers `addcalendarevent`, `getcalendarevents`, `removecalendarevent`, `updatecalendarevent` | Added `77de4c8` (2021-03-17), deleted `b0527bc` (2021-03-17) | `git show --stat b0527bc` |
| API host `2dg2tax5pg` | Replaced in `01973b1` (2021-05-04) | `src/aws-config.js` diff |
| Register lookup path `/josh/uuid` | Replaced with `/josh/getuuid/` in `01973b1` | `src/components/Register.js` diff |

No calendar UI remains on the tip.

## Planned

**Documented** only as the README TODO line "just about everything".

**Inferred** from comments, not from a backlog:

- `src/routes/Auth.js`: logged-in users cannot be sent to other public routes (the comment's example paths `/about` and `/contact` do not exist).
- `src/utils/index.js`: replace the `localStorage` login check.
- `src/config/PrivateRoutesConfig.js`: optional titles, richer title types, child routes.
- `src/config/Roles.js`: replace the placeholder roles.
- `Register.js`: `isMultifactor` is the switch for a code step. It is hard-coded `true`.

No issue tracker, milestone, or feature flag was found in the repository.

## Recently changed

The last commit on `master` is the only change after 2021-04-14:

- `01973b1` (2021-05-04) — API Gateway URL set to `https://nhyfbveswk.execute-api.eu-west-1.amazonaws.com/prod`. Register confirmation calls `/josh/getuuid/`.

There are no commits after that date.

## Not features of this repository

- X-ray model inference, image storage, and SQL. This repo posts a form and expects a JSON body.
- Cognito pool rules (password length, MFA). Not in git.
- SonarQube project file and `sonarqube_scan.bat`. Named in the 2026-09-28 scan-host listing, absent from `git ls-files` at `01973b1`.
