# Fozzy's Forms — deploy package

This is a snapshot of the app for testing on the live host, as of 2026-09-25.
It includes everything built so far, including the real imported staff/groups
data — nobody has been emailed an invite yet, so it's safe to upload without
going live for real employees.

## What's in here

- `app/` — the full application, ready to upload as-is
- `app/install.php` — a one-time web installer: visit it in a browser after
  uploading, it tests your DB credentials, imports `full_export.sql`, and
  writes `config/config.php` for you. This is the easiest path — see below.
- `app/config/config.sample.php` — only needed if you set up `config.php` by
  hand instead of using the installer (there is no `config.php` in this
  package on purpose — it holds local dev secrets)
- `app/sql/full_export.sql` — a full dump of the current database: schema +
  every form/question, the 5 locations/subgroups, the 43 real Connecteam
  groups, all 105 staff accounts (103 real + 2 existing test accounts) with
  their real group memberships and form assignments, and the test
  submissions already on the local copy
- `app/sql/setup.sql` — the bare schema only (empty), not what you want here
  — the installer (and `full_export.sql`) bring the real data along instead

## Steps on the new host

1. Create a MySQL database and a DB user for it (cPanel/Siteground: MySQL
   Databases panel) — note the database name, username, and password.
2. Upload the contents of `app/` to the site's document root (or a
   subfolder, e.g. `/forms/` — the app computes its own base path, so either
   works).
3. Visit `/install.php` on the uploaded site. Fill in the app name, timezone,
   from-email, and the DB details from step 1, then click Install — it
   connects, imports everything from `full_export.sql`, and writes
   `config/config.php` itself. (Tested locally end-to-end before packaging:
   fresh DB in, real data out, login working.)
4. **Delete `install.php` from the server** right after — the success page
   says this too. Anyone who can reach that URL before you delete it could
   overwrite your config.
5. Make sure `uploads/` is writable by PHP (submission photos/videos and
   reference images get written there).
6. Sign in as `admin@admin.com` / `admin` to confirm it's working, then
   check `/staff.php` and `/categories.php` render.

If the installer can't run for some reason, fall back to doing it by hand:
import `app/sql/full_export.sql` via phpMyAdmin, then copy
`config/config.sample.php` to `config/config.php` and fill in the same
details manually.

## Do NOT do yet

- Don't click **"Email everyone who hasn't set up yet"** on `/staff.php` —
  that's the real bulk-invite to all 103 employees' real emails (13 of them
  placeholder `@fozzys.net` addresses that still need a real one). Hold off
  until this is confirmed working and ready to actually go live for staff.
- Don't change `admin@admin.com`'s password to anything you don't want
  shared — it was reset to `admin` for local testing per your instruction.

## Known open items (unrelated to deployment, just still pending)

- "Love's Park IL: Food Inventory" has no group assigned yet — its
  Connecteam export data was corrupted; needs a manual check in the
  Connecteam console, then set via `form_edit.php`'s "Visible to" picker.
- Camera widget hasn't been tested on a real device yet.
