diff --git a/PORT-PLAN.md b/PORT-PLAN.md index bca5b7f..b89d47d 100644 --- a/PORT-PLAN.md +++ b/PORT-PLAN.md @@ -142,11 +142,11 @@ New plans (lib/plans.js): Starter $9 (25,000 emails, 5,000 subscribers), Growth Done since the first deploy: passkey login, cloud mode with SES-only platform email, Polar billing next to Stripe (needs the owner's Polar token, products and webhook), the marketing website at `/` for signed-out visitors (a separate Worker), database-backed rate limits, R2 images at img.flockstack.io, the logo (now Stack F: three stacked bars, the top one lime), README and AGENTS.md for the new setup. -0. Growth: create the private R2 bucket `flockstack-exports` with an 8-day lifecycle rule and bind it as `EXPORTS` (commented line in `wrangler.jsonc`); apply `migrations/0006_growth.sql` and `migrations/0007_recommendations.sql` (`deploy-all` applies the numbered files it hasn't recorded). Segments and automations: apply `migrations/0005_segments_automations.sql` and create the QStash schedule that calls `/api/jobs/run-automations` every 5 minutes (README, QStash). +0. Growth: done (the `EXPORTS` bucket is bound and the migrations are applied in both regions). Left: confirm the QStash schedule that calls `/api/jobs/run-automations` every 5 minutes exists in each region (README, QStash). 1. Polar: create the org token, run `scripts/polar-setup.mjs`, add the webhook, set `POLAR_ACCESS_TOKEN` / `POLAR_WEBHOOK_SECRET` (see README, billing). 2. SES stays on the owner's existing AWS account (decided, shared with other products). Each customer is its own SES tenant with its own suppression list, and the app pauses senders on bounce and complaint rates, which limits the blast radius; revisit if a customer ever hurts the account's reputation. -3. Push the fork to a public repository (AGPL), then point `SOURCE_URL` in `lib/site.js` at it and add a source link to the site footer. -4. Terms, Privacy and Sub-processors pages are written (`/terms`, `/privacy`, `/sub-processors`, `lib/legal.js`). Not legal advice: have them checked. Still open in `lib/legal.js` (`node scripts/check-legal.mjs`): the effective date, how long PostHog keeps events (`ANALYTICS_RETENTION`), and `SERVICES_LIVE_CONFIRMED`, which the owner sets once Google sign-in, PostHog with the consent banner (built, set `POSTHOG_KEY`) and the support assistant are live. Until all three are filled the pages answer 404 and nothing links to them, and `scripts/deploy-all.mjs` names what is left without stopping, so those services can be deployed first. Update the pages whenever the product changes what it stores or shares. +3. Done: the repository is public and `SOURCE_URL` in `lib/site.js` points at it. +4. Terms, Privacy and Sub-processors pages are written and published (`/terms`, `/privacy`, `/sub-processors`, `lib/legal.js` has no placeholders left). Not legal advice: have a lawyer check them. Update the pages whenever the product changes what it stores or shares. 5. Bulk updates (large imports, status changes) go a chunk per statement now (lib/docdb above; `node --import ./tests/setup/register.mjs scripts/bench-bulk.mjs` measures them on SQLite): a 50,000-contact import went from 100,432 statements to 632, unsubscribing 45,000 contacts from 45,001 to 137. Still open: archive old Event rows (D1 is 10 GB per database), and measure the same on D1 itself. 6. wrangler.jsonc holds the owner's account and database ids and domains: move them out before publishing a reusable template. diff --git a/docs/BRIEFINGS-DESIGN.md b/docs/BRIEFINGS-DESIGN.md index c816134..3e32dda 100644 --- a/docs/BRIEFINGS-DESIGN.md +++ b/docs/BRIEFINGS-DESIGN.md @@ -1,6 +1,6 @@ # Briefings: design note -Status: design, 2026-10-28. Nothing here is built yet; the build follows this note, and the note changes when the build shows it is wrong. +Status: built and deployed in the US region (2026-10-29); the EU briefings Worker is not provisioned yet. Only `reviewMode: draft` runs: sending by itself once every check passes (Phase 3) is not built. The note changes when the build shows it is wrong. A briefing belongs to a newsletter. From a topic brief (no fixed source list), it searches the open web on a schedule, picks the stories its audience cares about, reads the original pages, writes a short sourced issue in the newsletter's style, checks the issue, and saves it as a draft (or, when the account allows, sends it once every check passes). Each account brings its own AI provider key, and optionally its own search provider key, so the cost is the account's; model spend is capped per briefing per run, and discovery runs on free indexes and free tiers.