# STEP 8A — Authentication from the verified Step 7A baseline

This package is built directly from the Step 7A final project.

## Clean upload rule

Upload/merge this `numerology-platform` folder over the existing Step 7A project.

**Do not replace or create database credential files from this ZIP.** The two credential files are intentionally excluded from the ZIP:

- `config/database.php`
- `api/config/database.php`

Your existing server-side database configuration must remain untouched.

## Step 8A features

- Registration
- Optional middle name
- Login
- Logout API
- Current-user (`me`) API
- PHP session authentication
- Existing Step 7A database schema preserved
- Existing numerology calculation code preserved
- No SQL schema changes
- No hard-coded hosting path
- Browser calls the same-origin `public/api.php` proxy
- API routing supports `?route=...`, so Apache rewrite rules are not required

## One clean test

1. Upload the package over the existing Step 7A project.
2. Do not touch the database credentials.
3. Open `public/register.html`.
4. Hard refresh with Ctrl+F5.
5. Register one new test account.
6. The form should display `Account created successfully...` and then open `calculator.html`.

If the test fails, stop and send the exact error shown on the page. Do not change database files or SQL.

## UI alignment fix — Step 8A revision

The registration and login pages now use the same visual system as `public/calculator.html`:

- centered content width
- white bordered card
- matching rounded corners and shadow
- matching Georgia headings, spacing, labels, inputs and buttons
- responsive two-column registration fields that collapse cleanly on smaller screens
- matching success/error message styling

### Middle name

The registration form submits the optional field as `middle_names`. The Step 8A authentication controller saves it to the existing `birth_names.middle_names` column and returns it from the authentication responses. No database schema change is included in this revision.

If your database viewer shows a different column named `middle_name` (singular), do not add or rename anything at this stage. The verified Step 7A schema uses `birth_names.middle_names`.
