水杉输入法 MSIME|开源中文输入法
水杉输入法(MSIME)是开源中文输入法,面向 Windows、macOS、Linux、Android、iOS 与 HarmonyOS 开发,支持全拼、双拼、五笔,候选词旁直接显示译文。查看下载、使用指南与常见问题。
翻訳待ち
There's a pattern running your life you haven't named yet. Answer five questions and find out what it is, where it started, and where it's still running today.
翻訳待ち
その他TypeScript · CSSGitHub @Beyondpsychologyオンライン所有者未確認
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
repo pattern spotter
翻訳待ち
Loading the full README.
Read the full README ↗A free, email-gated AI reading tool. Visitors answer five questions, pick the hypothesis that lands, and get back a 5-section reading plus product recommendations — one full reading per email address.
/ — placeholder salespage (to be replaced later)/tool — the entire product: email gate → 5 questions → hypothesis
selection → full reading. No login, no accounts.This guide assumes you've never done this before. Follow it in order.
npm install
Copy the example file:
cp .env.local.example .env.local
Then fill in each value in .env.local:
| Variable | Where to get it |
|---|---|
NEXT_PUBLIC_SUPABASE_URL | supabase.com → create a free project → Project Settings → API → "Project URL" |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Same page, "anon public" key. (Not currently used by any client-side code in this app, since there's no login — it's included so the project matches the standard Supabase env var setup, in case you add client-side reads later.) |
SUPABASE_SERVICE_ROLE_KEY | Same page, "service_role" key. Keep this secret — it bypasses all database security rules. It is only ever read inside API routes on the server, never sent to the browser. |
ANTHROPIC_API_KEY | console.anthropic.com → API Keys → Create Key. This key is billed per API call — see the cost note at the bottom of this file. |
ACTIVECAMPAIGN_API_URL | ActiveCampaign → Settings → Developer → "API URL". |
ACTIVECAMPAIGN_API_KEY | Same page, "API Key". Used server-side only, to sync each captured email into ActiveCampaign (tag patternspotter, list Pattern Spotter). The Pattern Spotter list must already exist in ActiveCampaign — create it once in the ActiveCampaign dashboard; the tag is created automatically on first use if missing. If either of these two vars is unset, the sync is silently skipped — it never blocks someone from using the tool. |
Never commit .env.local — it's already in .gitignore.
app/api/generate/route.ts in this project and copy the SQL comment
block at the very top of the file (starts with CREATE TABLE IF NOT EXISTS email_captures).This creates one table, email_captures, which tracks which emails have
already used their free reading (has_completed) and stores the reading
itself as JSON for future reference.
npm run dev
Open http://localhost:3000/tool — that's the
whole product. http://localhost:3000/ is just the placeholder salespage.
.env.local: NEXT_PUBLIC_SUPABASE_URL,
NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY,
ANTHROPIC_API_KEY, ACTIVECAMPAIGN_API_URL, ACTIVECAMPAIGN_API_KEY.git push to your main branch redeploys automatically./api/generate is the only route that costs money per call (it's the one
Anthropic API request that produces the full reading; /api/hypotheses is
a much cheaper, shorter call). The has_completed flag on email_captures
is what prevents someone from generating more than one free reading per
email address — once it's true for an email, /api/generate returns a 403
without calling Anthropic at all. There's also a simple 20-requests-per-hour
per-IP limit on /api/generate as a backstop against a single source
hammering the tool.
Both PDF paths share the same generator (lib/pdf.ts: title page, styled
sections, a dark CTA page, an about-Beyond-Psychology page), built with
pdfkit — pure JavaScript, no headless browser involved:
/api/generate-pdf, which builds the PDF and streams it straight to the
browser. Nothing is stored for this path./api/generate builds the same PDF, uploads the result
to a private Supabase Storage bucket, and pushes a 30-day signed URL into
an ActiveCampaign custom field for an automation to email out.An earlier version of this rendered the PDF via puppeteer-core +
@sparticuz/chromium (real HTML/CSS, closer to the on-screen design) but
that combination hit two separate Vercel-specific failures in production
(file tracing dropping the bundled Chromium binary, then a missing system
library even after fixing that) and was replaced with this pdfkit version,
which has no native/binary dependency and can't hit that class of bug.
lib/pdf.ts loads the founder photo from public/pdf-assets/myrthe-photo.png
if present, otherwise fetches it from beyondpsychology.eu at render time.
If neither is available, that spot renders as a plain colored circle instead
of failing. Brand fonts (Abril Fatface, Cormorant Garamond italic, Open
Sans) are loaded from public/pdf-assets/fonts/ and registered directly
with pdfkit.
Every completed reading pushes two things to the contact's ActiveCampaign
record, via logReadingTopic in lib/activeCampaign.ts:
This is the beginning of the README. Read the rest at the original. Read the full README ↗