Internal documentation — closet/storage niche (Pinterest)
Queue → Playwright render → PNG → Supabase Storage → public URL. Worker reads from render_queue_ready view, processes batches of 5.
Built and tested. Reads from next_pins_to_publish view, posts via Pinterest v5 API. Blocked on Pinterest trial access approval (App ID: 1555297).
Built. Pulls daily pin analytics (impressions, clicks, saves) from Pinterest API, upserts to pin_metrics_daily. Also blocked on Pinterest API approval.
Scoring logic, scale/pause/kill decisions based on CTR, EPC, RPP. Depends on metrics data flowing.
Cron or task runner to automate the full loop: render → publish → collect metrics → decide → act.
bizzy-business.com purchased via Cloudflare Registrar. Nameserver mismatch blocking activation. Support ticket filed 2026-03-22.
| Worker | File | Reads From | Writes To | Status |
|---|---|---|---|---|
| Render | worker.js |
render_queue_ready view |
image_render_jobs, Supabase Storage |
Live |
| Publish | publish-worker.js |
next_pins_to_publish view |
publish_queue, pins |
Blocked |
| Metrics | metrics-worker.js |
pins (posted) |
pin_metrics_daily |
Blocked |
| Table | Rows | Purpose |
|---|---|---|
pins | 35 | Core content. Title, hook, description, destination URL, status, Pinterest pin ID. |
image_render_jobs | 15 | Render queue. Links pin to template, overlay text, rendered image URL. |
publish_queue | 32 | Publish queue. Pin → board mapping, scheduling, attempt tracking. |
products | 10 | Amazon affiliate products. Name, URL, price, category. |
boards | 5 | Pinterest boards mapped to content clusters. |
templates | 5 | Visual templates with format, style, fatigue tracking. |
landing_pages | 1 | Affiliate landing pages. HTML, public URL, disclosure. |
pin_metrics_daily | 0 | Daily performance: impressions, clicks, saves, revenue, computed CTR/EPC/RPP. |
pin_decisions | 0 | Automated decisions: score, action, reasoning. |
experiments | 0 | Hypothesis testing framework (planned/running/won/lost). |
| View | Used By | Joins |
|---|---|---|
render_queue_ready | Render worker | image_render_jobs WHERE status = 'queued' |
next_pins_to_publish | Publish worker | publish_queue + pins + landing_pages + image_render_jobs |
Processes up to 5 queued render jobs per run. Run multiple times to clear the queue.
cd CE2 && node worker.js
Posts up to 5 queued pins to Pinterest. Requires valid PINTEREST_ACCESS_TOKEN in .env.
cd CE2 && node publish-worker.js
Pulls last 7 days of Pinterest analytics for all posted pins. Set METRICS_LOOKBACK_DAYS in .env to change window.
cd CE2 && node metrics-worker.js
Reset completed render jobs back to queued (e.g., to fix local:// paths):
UPDATE image_render_jobs SET status = 'queued', render_status = 'queued', image_url = NULL WHERE image_url LIKE 'local://%';
INSERT INTO publish_queue (pin_id, pinterest_board_name, priority, status, scheduled_for, attempts, max_attempts) VALUES ('PIN_UUID', 'Board Name', 1, 'queued', now(), 0, 3);
1. Create new boards in boards table with cluster name.
2. Create pins referencing the new cluster.
3. Add products for the niche to products.
4. Create templates if visual style differs.
5. Run render → publish pipeline as normal.
Cloudflare nameserver mismatch — bizzy-business.com zone expects merlin/sureena nameservers but registrar has andy/naya. Cloudflare Registrar domains can't self-service fix this. Support ticket filed 2026-03-22. If no response by 2026-03-25, escalate.
Pinterest API trial access pending — App ID 1555297, created 2026-03-22. API returns 401 "application consumer type is not supported." App secret unavailable. Check email for approval. If still pending 2026-03-25, post in Pinterest Developer Community with App ID.
Amazon affiliate revenue ingestion — No integration yet. Revenue/orders columns in pin_metrics_daily default to 0. EPC and RPP will be inaccurate until Amazon data flows in.
All project management and development moved to Claude (Cowork). ChatGPT docs in docs/archive/ are stale — this site is the source of truth.
Rotated from old JWT-based service_role key to new sb_secret_ format. Easier rotation, browser-safe rejection. All workers read from .env.
Each worker reads from a Supabase view, processes a batch, updates state. "What to do" = Supabase. "How it gets done" = Node workers. Designed to clone across niches without code changes.
26 pins live in Small Space Storage — first proof of end-to-end publishing. Publish worker ran, Pinterest accepted content, system moved from "built and waiting" to "live and accumulating."
Identified content_type tagging gap: Small Space Storage and Kitchen Organization have all pins tagged as generic pin with no info/affiliate split. Home Office is the only niche with the split correctly populated (220 info, 30 affiliate, 15 generic). Allocation engine can't run correctly without this fixed.
Analytics ingestion not flowing: 26 pins live, 0 impressions in database. Metrics worker completing with a fetch error — running but failing silently. Needs verification before the feedback loop can start. Held off on live pipeline run — no data to act on.
Three Kitchen Organization experiments designed and ready (EPC: single-product hero vs. multi-product roundup; CTR: before/after fridge transformation vs. product-only; CTR: specific space callouts vs. generic messaging). Waiting on pins to post and accumulate 500+ impressions each.
Tomorrow: Verify analytics ingestion, fix content_type tags across SSS and KO, post Kitchen Organization and Home Office pins, add real Amazon URLs to 10 home_office placeholder pins.
Fixed all 685 broken destination URLs. 1,055 pins now point to live destinations: 1,004 to Pages subdomain landing pages by board, 51 to Amazon affiliate links. Zero broken URLs remain.
Renamed and cleaned the project folder to CE2. Deleted stale scripts, created archive folders, confirmed no broken references.
Diagnosed the Cowork sandbox network issue (proxy blocks direct Supabase calls) and built a GitHub Actions workflow (ce2-daily-run.yml) to run the pipeline externally. Ready to deploy — needs repo push and secrets configured.
Fixed Unsplash image integration in the render worker: added has_background tracking per job so pins that missed real photos during rate limits can be selectively re-queued without re-rendering the full set.
Blockers at EOD: Pinterest API approval pending, Cloudflare domain transfer earliest March 30, 10 home_office affiliate pins with placeholder Amazon URLs.
Last updated: 2026-03-24