# Foundation integration guide

This handoff contains application-owned files, not the Laravel framework or `vendor` directory. It cannot be executed until a PHP/Composer environment generates the official Laravel application.

1. Generate a fresh Laravel 13 application, select the Livewire starter kit for its maintained login, password-reset, email-verification, and rate-limiting implementation, then add `livewire/livewire` only if the installer did not include it.
2. Merge this repository’s `app`, `database/migrations`, `resources`, and `routes/web.php` into the generated project—do not overwrite any generated authentication routes without checking them.
3. Add `active-user`, `team-member`, and `client-contact` aliases in `bootstrap/app.php` via `withMiddleware(...alias([...]))` for the three supplied middleware classes.
4. Add policies and invitation-only registration before exposing the subdomain. The starter-kit registration endpoint must be removed or restricted to invitation acceptance; its default public registration is not acceptable.
5. The `client_id` column intentionally becomes a constrained foreign key in the Clients milestone, when the `clients` table exists. The workspace migration assumes Laravel’s default `users` migration runs first.

No package beyond Laravel + Livewire is planned for the foundation. Both work with normal PHP/Apache hosting, database queues, and cron; neither requires Redis, Docker, or a permanent server process.
