Phase 1 of the dashboard overhaul (plan: ~/.claude/plans/thsi-is-a-app-zippy-reef.md). The substrate the new per-report dashboard SPA will consume. Each Trend now carries: - format (asmr | confession | hack | hot-take | review | routine | transformation | tutorial) — drives format-coded leaderboard bars and the format filter chips. - maturity (big_anchor | emerging | micro | declining) — drives the maturity filter chips. Claude classifies; programmatic heuristic cross-checks (80th-percentile of plays + video count); disagreements logged to qa/maturity_disagreements.json. Claude's call wins. - truth — italic one-line emotional hook quote (≤200 chars). - what_it_is — 2-3 sentences of plain format description. - why_it_works — 2-3 sentences of algorithmic insight. - brand_read — per-trend brand recommendation. - variations — 3-8 named recipe-style spins. stage_8b rubric (trend_synthesis.md) extended with concrete examples and good-vs-bad notes for the truth field. maxTokens bumped 16k→32k since each trend now carries ~600 extra output tokens. Stage 10 adds programmatic enrichment per trend (no Claude calls, just aggregation): - hook_bank — top 6 hooks across supporting videos by per-video STL, sourced from Stage 6 analyses' hook.first_3_seconds. - top_creators — group supporting by handle, top 8 by video count. - hashtag_signals — top 10 hashtags from pass1 metadata, normalised with leading "#". - standout_videos — top 5 supporting by plays, with caption. Plus a top-level constellation[] array — one bubble per trend with log-normalised x (cultural density), y (engagement), size (videos), and format colour key. Pre-computed at build time so the SPA just renders. mom_compare test fixture updated with the new editorial fields. Dashboard SPA types.ts mirrors the new shape. Vite build passes. Test suite green. Phases 3 + 4 (leaderboard, constellation, drawer) can now consume this data; Phase 6 (theme picker) is independent and can also start. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| v2 | ||
| .gitignore | ||
| DEVELOPER_BRIEF_V2.md | ||
| README.md | ||
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