# Demo Accesses and Email Domain ## Goal Make the demo credentials easy to use and standardize the platform demo accounts from `@agendapro.demo` to `@agendamax.demo` in source data, documentation, local data, and the deployed Coolify instance. ## Scope - Replace active `@agendapro.demo` references in application code, tests, README, and operational documentation with `@agendamax.demo`; retain the old domain only where this specification documents the migration itself. - Keep the existing demo password `demo1234` and expose it clearly beside each demo account in `README.md`. - Update the local SQLite demo users without deleting businesses, appointments, or other seeded records. - Deploy the code to the existing AgendaMax Coolify application. - Update the persistent production SQLite users for the admin and owner accounts with a targeted SQL change, preserving all other data. ## Data Flow Fresh databases receive the new admin and owner emails from `server/scripts/seed.ts` and `server/index.ts`. Existing local and production databases are migrated by updating only `users.email` values whose domain is `agendapro.demo`. The employee accounts already use their business domains and are not changed. Login verification uses `POST /api/auth/login` with the documented password and does not expose password values through the API. ## Production Procedure 1. Run the local checks and build. 2. Push the change to the AgendaMax source mirror used by Coolify. 3. Trigger and monitor a Coolify deployment. 4. Run a targeted SQLite update inside the persistent production app volume: `UPDATE users SET email = REPLACE(email, '@agendapro.demo', '@agendamax.demo') WHERE email LIKE '%@agendapro.demo';` 5. Verify health, login for admin and owner, and the production page. If deployment fails, do not run the production SQL migration; inspect the deployment first and use the existing Coolify rollback procedure. ## Acceptance Criteria - `rg "agendapro\\.demo"` returns no active application, test, or README references (historical notes may be explicitly excluded if any are retained). - README lists every demo account with email and `demo1234`. - Fresh seed creates `admin@agendamax.demo` and `owner@agendamax.demo`. - Existing local data contains the new emails and retains its records. - Coolify deployment finishes successfully. - Production `/api/health` returns `ok: true`. - Production admin and owner logins succeed with `demo1234`.