## Summary
Closes#9.
- Campaign composer auto-inserts a tracked homepage link (`utm_source=monica`, `utm_medium` = channel, `utm_campaign` = slug of the name) for email, SMS, and postcard QR — no manual UTM paste.
- When `SHORTENER_BASE_URL` + `SHORTENER_API_TOKEN` are set, the app mints that long HTTPS URL via `POST /api/links/` on the shortener **API host** and puts the returned `piha.li` / `beta.piha.li` short URL in SMS, email hrefs, and QR codes. Empty env (local) falls back to the long UTM URL.
- Live composer resolves shorts through a portal JSON endpoint (login + CSRF). Browser never calls the shortener.
## Secrets (control node, not git)
**monica_site** (`~/Documents/secrets/monica_site/`):
```
# prod
SHORTENER_BASE_URL=https://shortener.aimloperations.com
SHORTENER_API_TOKEN=monica:<secret>
# beta
SHORTENER_BASE_URL=https://shortener-beta.aimloperations.com
SHORTENER_API_TOKEN=monica:<beta-secret>
```
**url_shortening_service** (same secret, named token):
```
SHORTENER_API_TOKENS=monica:<secret>
SHORT_ALLOWED_HOSTS=mkdrealtor.com,aimloperations.com
```
Prod public short host: `piha.li`. Beta: `beta.piha.li`. Generate with `python -c "import secrets; print(secrets.token_urlsafe(32))"`.
Template port: westfarn/web_django_template#3
## Test plan
- [ ] `cd site && uv run python manage.py test messaging.tests.CampaignUtmLinkTests`
- [ ] Composer: type a campaign name — email gets an HTML link, SMS gets a URL, postcard shows a QR
- [ ] With shortener env set: SMS/QR show `piha.li` (or `beta.piha.li`); without it, long UTM URL still works
- [ ] Copy/download QR into postcard designer
- [ ] Secret files have `SHORTENER_*` on both caller and operator sides before beta/prod deploy
Reviewed-on: #10
## Summary
Closes#7.
Raise public marketing page Lighthouse scores (Performance / Accessibility / Best Practices / SEO) on `/`, `/about/`, and `/contact/`.
### Baseline (preview, mobile)
| Page | Perf | A11y | BP | SEO |
|------|------|------|----|-----|
| `/` | 70 | 80 | 82 | 100 |
| `/about/` | 71 | 81 | 82 | 100 |
| `/contact/` | 74 | 90 | 82 | 100 |
### Changes
- **Accessibility:** contrast overrides, nav `aria-label`s, footer/contact heading order (no skipped levels).
- **Best practices:** replace theme `unload` listeners with `pagehide` (also helps bfcache); `WHITENOISE_MAX_AGE` for hashed static.
- **Performance:** WebP heroes/headshot/breadcrumbs + preload; Google Fonts `display=swap` + fewer weights; async icon `fonts.css`; bundled/minified vendor CSS; lazy second swiper slide; remove above-fold WOW delay on home hero.
- **SEO:** already 100; kept structured data / meta.
### Local verify (dev server — no gzip, so Perf is not representative)
A11y / Best Practices / SEO all **100** on the three pages after fixes.
Perf will look better on beta/preview (WhiteNoise compression + CDN/proxy) than on `runserver`. Remaining Perf headroom is mostly the theme’s large `core.min.js` / unused CSS and infra HTTP/2.
## Test plan
- [ ] Deploy/preview branch and re-run Lighthouse on `/`, `/about/`, `/contact/`
- [ ] Spot-check home hero, about headshot, contact form + mobile nav toggles
- [ ] Confirm icons still appear after async `fonts.css` load
- [ ] Confirm swiper slide 2 background appears when navigating slides
Reviewed-on: #8
## Summary
Closes#5.
- Composer can **Send now** without a schedule time (Schedule and Save draft still available)
- Account names wrap and show the platform id so a bad OAuth label is still readable
- Social accounts page can rename the display name; re-auth keeps a custom name instead of overwriting it with a placeholder
- Worker polls `dispatch_due` every 15s so scheduled campaigns and social posts fire without a manual command; local `docker compose up` now starts the worker
## Test plan
- [ ] Open Social → Compose: confirm **Send now**, **Schedule**, and **Save draft** buttons (no combined Save / publish)
- [ ] Send now with a connected account and caption → post queues immediately, no datetime required
- [ ] Schedule with a datetime → post is scheduled; Schedule with a blank time → validation error
- [ ] Composer account list shows full name plus external id, wrapping if the name is long
- [ ] Social accounts → rename a messy label → new name shows in composer without reconnecting
- [ ] Re-authorize an account that was renamed → custom name is kept
- [ ] Rebuild and start compose (`docker compose up --build`) so the **worker** service is running
- [ ] Schedule a social post ~2 minutes ahead → after due time, worker logs `Enqueued N due item(s).` and the post leaves Scheduled (published or failed)
- [ ] `docker compose logs -f worker` shows `Polling due scheduled work every 15s.`
Reviewed-on: #6
## Summary
Closes#1.
- Replace About page bio with the western-suburbs / Exit Realty Redefined copy and Monica's headshot
- Add `CONTACT_ADDRESS` (`1245 Butterfield Rd. #100, Wheaton, IL 60189`) and show it on Contact, nav, footer, and structured data
- Align Home hero + service-area defaults with Chicago's western suburbs
## Test plan
- [ ] `/about/` shows new bio and headshot
- [ ] `/contact/` map block shows Butterfield Rd address
- [ ] Header / footer on Home show the address
- [ ] Set `CONTACT_ADDRESS` in deploy `.env` if not relying on defaults
- [ ] Confirm OG image for About uses the new headshot
Reviewed-on: #2
## Summary
Closes#3.
- Add `PageView` model + migration for successful public marketing GET hits
- Wire `PublicPageViewMiddleware` (skips portal/admin/accounts/api/static/health/etc.; fails soft on DB errors)
- Portal analytics report: last-30-day views + top pages table
- Admin registration and tests
## Test plan
- [ ] Apply migration `analytics.0002_pageview`
- [ ] Hit `/` and `/about/` → rows in `PageView` / admin
- [ ] Hit `/healthz/`, `/portal/`, `/admin/` → no new pageviews
- [ ] Open portal Analytics → views count + Top pages look right
- [ ] `uv run python site/manage.py test analytics.tests`
Reviewed-on: #4
Connect Facebook and Instagram via shared portal Meta App credentials (Facebook Login for Business), and let compose attach DB-stored images/videos with live preview and platform publish.
Placeholder Fernet values like replace-with-fernet-key now raise a clear SocialCryptoError in the portal, and prod env examples no longer ship a fake key.
Replace manual token paste with Authorization Code flow; store Client ID/secret in the DB from the social accounts UI and surface a copyable callback URL for LinkedIn Auth setup.
Empty PCM_RETURN_ADDRESS was sending SITE_NAME as firstName with blank street fields, which PCM rejects with 400; validate early and wire PCM env through compose.
Classify payloads on /webhooks/smtp2go/ so one SMTP2GO webhook covers both channels under the 10-webhook limit; keep /email/ and /sms/ as aliases and harden SMS event matching.
Add merge tags for email/SMS, paginated removable recipients, PCM event panels for postcard campaigns, and a portal modal when phone/address matches an existing contact.
Add a Quill email editor with DB-backed image storage, selectable PCM designs, postcard defaults for addressed contacts, and merge-by-phone/address on the contact form.
PCM DirectMail v3 needs POST /auth/login (apiKey+apiSecret) before design/order calls; accept each subscription's copy-only signature secret via PCM_WEBHOOK_SECRETS.
Whitenoise Manifest storage failed post-processing style.css when bg-pattern-boxed.png and related assets were absent, so containers never reached gunicorn.
Unignore site/ (was blocked by mkdocs /site rule), add compose/Docker/uv tooling, and split deploys so push to main goes to beta while prod stays manual.