# Planexa Phase 1 deployment

## Included

- Clean lint baseline with no blocking errors.
- Automated workload and timezone tests.
- Organization-timezone greetings, dates, and activity timestamps.
- Expiring HMAC-signed Platform Owner session cookies.
- Tenant branding settings for logo, favicon, colors, invoice prefix, currency, support contacts, and date format.
- Tenant custom-domain requests with pending/verified lifecycle and tenant-isolated RLS.

## Required order

1. Back up the Supabase database.
2. Run `supabase/migrations/009_tenant_branding_and_domains.sql` in Supabase SQL Editor.
3. Add all variables from `.env.example` to the deployment environment.
4. Set `DEVELOPER_COOKIE_SECRET` to a random value of at least 32 characters. Do not reuse a password.
5. Deploy the application build.
6. Open Company settings and save the company identity, logo URLs, colors, invoice prefix, currency, support details, and requested custom domain.

## Custom-domain activation

A company administrator can request a hostname. It remains `pending` until the platform owner verifies DNS and marks it verified. Do not route a hostname before verification. The hosting platform must also be configured to accept that hostname and issue TLS.

## Validation

```bash
pnpm run lint
pnpm run test:unit
pnpm run build
```

