No description
Find a file
DJP 0dea2d1724 Dashboard: Leaderboard + Constellation + filter chips + trend drawer
Phases 3 + 4 of the dashboard overhaul (plan:
~/.claude/plans/thsi-is-a-app-zippy-reef.md). Replaces the flat
list/detail split with Original-project's editorial layout:

Overview view (home tab) now renders, top to bottom:
- Business question card (serif headline) + KPI tile row
- Leaderboard (left) + Constellation bubble chart (right)
- Format / Maturity / Sort filter chip rows
- Trend grid (3-col) with format dot + maturity pill + truth quote
  per card, cards click to open the drawer

New components:
- Leaderboard.tsx — top 8 by plays, format-coded dot + bar visual,
  mirrors Original components-v2.jsx:217-242
- Constellation.tsx — bubble chart (hand-rolled positioned divs, no
  SVG/D3 to mirror Original's approach), reads pre-computed normalised
  x/y/size from dataset.constellation, hover tooltip in ink/paper
- FilterChips.tsx — three rows (format/maturity/sort), pip-coloured
  chips, ink-on-paper active state
- TrendDrawer.tsx — right-slide 720px, ESC-closes, 9 editorial sections:
  maturity/format/category tags → title → truth quote → KPI strip
  (4 cells) → WHAT IT IS → WHY IT WORKS → BRAND READ → VARIATIONS →
  HOOK BANK → TOP CREATORS → HASHTAG SIGNALS → STANDOUT VIDEOS table
  → narrative fallback. Each section uses SectionMark for consistent
  glyph + eyebrow + heading + body
- SectionMark.tsx — reusable [glyph] eyebrow + heading + body block

Trends Explorer view rebuilt to a chips+grid+drawer pattern (no
leaderboard/constellation furniture), category chips additionally to
format/maturity/sort. Same drawer.

format.ts gains TREND_FORMATS / TREND_MATURITIES / FORMAT_COLOURS /
MATURITY_COLOURS / MATURITY_LABELS — JS-side hex constants because
Recharts and inline-style uses can't read CSS custom properties via
Tailwind classes. Existing CATEGORY_COLOURS palette swapped to
warm-cream-friendly hues so they don't clash with the new theme.

Vite build succeeds. CSS 11.6→16.7 KB (+5 KB for new components),
JS 580→592 KB (+12 KB). HTML bundle still well under the 3 MB cap.

Phase 5 (lens views polish) and Phase 6 (theme picker) can now ship
in parallel — both ride on top of this layout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 10:45:55 -04:00
v2 Dashboard: Leaderboard + Constellation + filter chips + trend drawer 2026-05-05 10:45:55 -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