跳到正文
DEV Community· visiohex·· 1 小時前AI 評分32

使用 Astro 和 Cloudflare Pages 建構零追蹤、100% 瀏覽器端運行的塔羅牌與命運矩陣計算器

Building a Zero-Tracking, 100% Client-Side Tarot & Destiny Matrix Calculator with Astro and Cloudflare Pages

AI 導讀

Meu Arcano Pessoal 以 Astro 和 Cloudflare Pages 建構塔羅牌與命運矩陣計算器,採用靜態架構,無需後端資料庫。計算器在瀏覽器內運行,姓名和出生日期不會寫入 URL、localStorage 或 Cookie。計算公式公開,並以 Node 的 node --test 執行單元測試。

正文

Most online astrology, tarot, and numerology calculators follow the same pattern: enter your full name and birth date, hit submit, hit an email-capture wall, and watch your personal birth data get shipped to third-party analytics and CRM databases.

When I built Meu Arcano Pessoal — a Brazilian Portuguese calculator and editorial guide for the 22 Major Arcana, Personal Year cycles, and the Destiny Matrix octogram — I wanted to prove that a content-rich utility site can be fast, completely free, and genuinely privacy-first without a backend database.

Here are the architectural decisions that worked well.

1. Static-First Architecture with Astro + Cloudflare Pages

Every guide, methodology page, and individual arcana reference (36 indexable routes in total) is pre-rendered to static HTML with Astro (output: "static") and deployed to Cloudflare Pages.

Why static HTML over an SPA?

  • Near-instant TTFB and zero hydration overhead on editorial pages.
  • Easy deterministic build verification: before deploying, a verification script checks all internal links, fragment anchors, JSON-LD FAQ parity, and metadata baselines.
  • Zero runtime server costs.

2. Keeping Birth Dates and Names 100% Local

Birth dates and full names are sensitive personal data (PII). On meuarcanopessoal.net, every calculator — including the Personal Arcana Calculator, Arcana by Name, and the 8-point Destiny Matrix Calculator — runs purely in browser JavaScript:

  • Inputs are never appended to URL query parameters (so they never leak into server logs, referer headers, or browser history sharing).
  • Inputs are never written to localStorage or cookies.
  • Aggregate analytics events only emit fixed tool category labels (never user input or calculation outputs).
  • Shareable result cards are drawn in memory on the client and only leave the device if the user chooses to download or share them.

3. Verifiable Math with node --test

One surprising pain point in numerology/tarot tools is methodological inconsistency: some sites use Marseille numbering (8 = Justice, 11 = Strength), while others use Rider–Waite–Smith (8 = Strength, 11 = Justice), and years like 2027 (2+0+2+7 = 11) reduce differently depending on whether you stay in the 1–22 Major Arcana range or reduce to 1–9 Pythagorean Personal Years.

To avoid black-box results, we:

  1. Published a transparent Methodology page documenting every formula and worked example.
  2. Backed the calculation engine with unit tests using Node's built-in node --test runner so edge cases (like 22, 33 -> 6, and 2027 annual cycles) never regress across deploys.

4. Shipping llms.txt and Clean Structured Data

Alongside a clean sitemap.xml and semantic FAQPage / BreadcrumbList JSON-LD (always sourced from the exact same data array rendered visibly on the page), we also ship a concise /llms.txt summarizing the site's pages, calculation formulas, and editorial boundaries.


If you're building niche utility sites or calculators in non-English markets, pairing Astro's static output with strict client-side PII boundaries makes the product faster, simpler to maintain, and much easier for users to trust.

Check out the live site here: https://meuarcanopessoal.net/

來源:DEV Community · dev.to