# Features — react-php-tutorial

Evidence date: 2026-10-05. Revision: `master` `d10301a` (2020-04-29).

No feature list exists in the source repository. Status below is from `srcHooks/`, `php/`, and `git log`. Planned features: **none are written down**. Comments and the commit message "actions (1/2)" are the only hints of unfinished work.

## Current features

These run if the file is actually loaded. Several are not reachable from `App.js`.

| Feature | Status | Where |
|---|---|---|
| Navbar with brand `React-php`, Sign In, and Sign Up | Current on the shell | `srcHooks/App.js` |
| Route `/signIn` | Current | `App.js` → `Components/SignIn.js` |
| Route `/signUp` | Current | `App.js` → `Components/SignUp.js` |
| Client blank-field check on sign-in (name and password) | Current. The error string is not rendered | `SignIn.js` |
| Client blank-field check on sign-up (email and password only) | Current. The error string is not rendered | `SignUp.js` |
| Sign-up POST of `user_name`, `user_email`, `user_password` | Current | `SignUp.js`, `AddUserModal.js` → `php/signUp.php` |
| Duplicate username or email check before insert | Current | `php/signUp.php` |
| Insert into `user` and set `date_created` to `NOW()` | Current | `signUp.php`, `Insertdata`, `updateDate` |
| Sign-in query on plaintext `username` and `password` | Current on the PHP file. The Sign In form does not send the property names this query reads | `php/signIn.php` vs `SignIn.js` |
| Stamp `last_loggedin` on a successful match | Current inside `signIn.php` | `updateDate('last_loggedin', ...)` |
| Login-attempt rows in `tblloginuser` | Current inside `signIn.php` | `Insertdata('tblloginuser', ...)` |
| JSON user list (`id`, `username`, `email`, `date_created`) | Current endpoint | `php/listView.php` |
| Bootstrap table of that list | Current inside the component. The component is not routed | `srcHooks/Components/ListView.js` |
| Sortable User ID column | Current inside that table | `dataField: 'id', sort: true` |
| Add User modal that posts to `signUp.php` | Current file. Not imported by the shell | `Components/AddUserModal.js` |
| Delete one `user` row by `id` with `LIMIT 1` | Current endpoint. No JS caller | `php/delete.php` |
| CORS headers allowing any origin | Current | `php/header.php`, and duplicated in `signIn.php` and `signUp.php` |
| Service worker helper left unregistered | Current | `index.js` calls `unregister()` |
| CRA Jest DOM setup and one starter test | Current files. The test looks for "learn react" | `setupTests.js`, `App.test.js` |

## Partial or unfinished

| Feature | Evidence | What is missing |
|---|---|---|
| User list inside the app | `ListView.js` fetches and renders | `App.js` never imports it. No route |
| Add user from the UI shell | Modal posts to the same API as sign-up | Nothing opens the modal |
| Edit user | `EditUserModal.js` title "Edit user", name and email fields | Submit only `console.log`s. Password state is unused. `php/update.php` is empty. `updatetUser()` has no caller |
| Delete from the table | `delete.php` exists | `d10301a` removed the delete column. The `d8dc00b` button had no `onClick` |
| Sign-in round trip | Both files exist | Form body keys are `name` and `password`. PHP reads `user_name` and `user_password`. UI ignores the body |
| Visible validation errors | `error` state in Sign In and Sign Up | Never placed in the JSX |
| Generic helpers | `insertUser`, `selectUser`, `SaveLog`, `SelectData`, `UpdateTable`, `redirectToLoginPage` | No endpoint calls them. `UpdateTable` does not run its SQL. `selectUser` uses `$conn` without `global` and returns nothing. `redirectToLoginPage` targets `../index.php`, which is not in git |
| Change audit log | `SaveLog()` inserts into `loguser` using `$_SESSION['id']` | Not called. Session start is commented out in `signIn.php` |
| Second "actions" slice | Commit `d8dc00b` message "actions (1/2)" | No later commit uses "(2/2)" |
| Installable React app | Imports assume CRA, Bootstrap, axios, react-bootstrap, react-bootstrap-table-next | No `package.json`, no `public/` |
| Font Awesome icons on the inputs | Class names `fas fa-user`, `fa-envelope`, `fa-lock` | No icon stylesheet in git |

## Removed or replaced

| Feature | When | Notes |
|---|---|---|
| Gitlink named `react` at `5d85bc329cb5920e6135ff2dd78d826b8dc85920` | Removed in `53906de` (2020-04-22) | First commit `fb5512c` added it. No `.gitmodules`, so the remote URL is **Unknown** |
| Table checkbox selection that `console.log`s the row | Removed in `d10301a` | Present in `d8dc00b` `ListView.js` |
| Edit and delete button columns | Removed in `d10301a` | Edit button set `href` to `` `src/Components/ListView/${rowId}` ``, which is not a route. Delete button had no handler |
| `Loading...` fallback when `user` was falsy | Removed in `d10301a` | The `d8dc00b` file also `export default ListView` while the function was named `App`, so that export name was not defined |
| axios GET for the list, with `.catch` and a dependency array of `[]` | Replaced in `d10301a` | Current file uses `fetch` and a `useEffect` with no dependency array |

## Not in the product

- Registration email, password reset, or any mail send. Comment only: "email function still need to be added".
- Persistent login. Session block in `signIn.php` is a comment.
- Roles. `userGroup` / `refUserGroupID` appear only in that comment.
- Password hashing, CSRF tokens, or an auth header check.
- Queues, cron, file upload, or a background worker.
- SonarQube project file or `sonarqube_scan.bat`. Named by the onboarding scan, absent from git.
- CI pipeline, Docker, or a deployment script.

## Recently changed

The only change window is 2020-04-21 through 2020-04-29. The last behavioural change is `d10301a`: add-user and edit-user modals added; list-table actions removed; `delete.php` left in place.

No commit since 2020-04-29 was on `master` at inspection time.
