No description
Find a file
DJP c9dedec7da Theme & branding: standalone editor with live preview
Promotes the per-brief theme picker from a buried section at the bottom
of the JSON-textarea edit page to a dedicated /briefs/:id/theme route
that feels like a real edit tool.

New route layout (5fr / 4fr split, sticky preview on xl+):
- Left: ThemeEditor (8 accent presets + custom hex; 4 heading-font
  tiles each rendering "The Branded Glass Moment" in the candidate
  font; 3 background presets; agency-name input; save / reset).
- Right: ThemePreview — slice of the per-report dashboard styled by
  the picked theme, updates LIVE on every tweak before save.

ThemePreview renders a mock dashboard topbar (with agency name + accent
eyebrow), 3 KPI tiles, leaderboard row (rank + format dot + accent
bar + plays), sample trend card (maturity pill + format chip + truth
quote + KPI strip), primary/secondary buttons, accent-2 swatch.
Inline-styled with full hex values so changing the picker doesn't
bleed into the operator app's chrome.

ThemeEditor refactored to expose live state via optional onPreview
callback. Internal save/reset behaviour unchanged.

Discoverability:
- Brief detail page: "Theme & branding" button in the header action row
  next to "Export JSON" and "Run pipeline".
- Brief edit page: footer link "Theme & branding ↗" replaces the
  inline editor that lived at the bottom (now redundant).
- Brief list rows: small accent-dot indicator in the right-side
  metadata column when a theme is set, plus a per-row "Add theme" /
  "Edit theme" link in the action footer.

Operator app's index.html now also loads Fraunces / Playfair /
Space Grotesk / Inter / JetBrains Mono so the preview is WYSIWYG.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 14:08:46 -04:00
v2 Theme & branding: standalone editor with live preview 2026-05-05 14:08:46 -04:00
.gitignore Stop .gitignore from swallowing src/routes/briefs/ 2026-04-29 18:44:08 -04:00
DEVELOPER_BRIEF_V2.md Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
README.md README: document the cd /opt/social-reporting && git pull && cutover-in-place flow 2026-04-29 18:40:55 -04:00

Social Reporting

V2 lives in v2/. All commands run from there.

cd v2
docker compose -f docker-compose.v2.yml --env-file .env up -d --build
npm install
npm test                       # 62 unit tests
npm run pipe seed --report <brief-id>

For the full V2 spec see DEVELOPER_BRIEF_V2.md.

Deploying V2 over an existing V1 install

If V1 is already deployed at /opt/social-reporting, cut over in place:

ssh you@optical-dev.oliver.solutions
cd /opt/social-reporting
git pull origin main                          # pulls in v2/, removes V1 dirs
bash v2/deploy/cutover-in-place.sh            # stops V1, migrates secrets, starts V2

The script prompts before doing anything destructive, migrates APIFY/Anthropic/Azure secrets from V1's .env into a fresh v2/.env, swaps the Apache conf to V2's, and starts the V2 docker stack. It also prompts for the email that will be auto-promoted to super-admin on first SSO sign-in (BOOTSTRAP_SUPER_ADMIN_EMAIL).

The Azure-registered redirect URI https://optical-dev.oliver.solutions/social-reports/login.html is preserved by V2 (Vite base: /social-reports/, React Router basename, and an explicit /login.html route alias).

V1 archive

V1 source is preserved on the v1-archive branch (frozen at the last V1 commit) and is no longer kept on the deployed server. To roll back from V2 to V1, the rollback script will re-clone v1-archive if needed:

# On the server
export REPO_URL="https://x-token-auth:YOUR_TOKEN@bitbucket.org/zlalani/social-reporting-tool.git"
bash /opt/social-reporting-v2/v2/deploy/rollback-to-v1.sh

To inspect or check out V1 source locally:

git checkout v1-archive