# Changelog

New features, architectural changes and improvements to the template.

Release notes are curated from repository history. Dates reflect integration into the main branch; grouped entries are not semantic-version tags. Each entry links to its implementation and current developer guide.

## First-party analytics in the admin, counted without cookies

2026-11-27

Page, screen and event counts kept by our own server without cookies or identifiers, rolled up by the cron, and shown on /admin/analytics with a Bklit chart, annotations and optional Cloudflare numbers.

- **Counting without cookies.** `POST /api/events`, the analytics relay, counts page views from the site and the web app and screen views from the mobile app: the path without its query (except `utm_*`), or the route pattern on signed-in screens and in the app, the referrer's host, the country from the edge and device and browser codes. No cookie, storage, IP address, user agent or id is kept; bots and automated browsers count nothing. The web client is about 0.8 KB gzip and starts after hydration. A database rate limit keyed by an HMAC of the address works on Node as on Workers. Mixpanel or PostHog can be added later as providers that only receive batches sent with consent; none ships ([18a7aff6](https://github.com/CarlosZiegler/template-cloudflare/commit/18a7aff6), [4555bb3d](https://github.com/CarlosZiegler/template-cloudflare/commit/4555bb3d), [149735df](https://github.com/CarlosZiegler/template-cloudflare/commit/149735df)). Confirm the cookieless counting with your data protection owner before launch. [Analytics](/docs/features/analytics) explains what is kept and why.
- **Totals in Postgres, folded by the cron.** Raw events live for 30 days; the one-minute tick folds them into daily tables exactly once under a lease and a watermark, writes one release annotation per new Worker version, and, with `CLOUDFLARE_ANALYTICS_TOKEN` and `CLOUDFLARE_ANALYTICS_ZONE_ID`, syncs Cloudflare's zone totals every 30 minutes. Every analytics table denies the tenant role, proved in the RLS matrix ([d404855c](https://github.com/CarlosZiegler/template-cloudflare/commit/d404855c)).
- **Days in your time zone.** `ANALYTICS_TIME_ZONE` (an IANA name such as `America/Sao_Paulo`, `UTC` when unset) cuts the days of the rollup, the raw retention, the admin page and the Cloudflare sync's window, daylight saving time included. Changing it is safe at any time: the new zone starts at its next midnight, days already counted keep their hours, nothing is counted twice, and the admin page notes the switch. Cloudflare's own numbers stay on Cloudflare's UTC dates, and the CF card says so ([3ec1df1a](https://github.com/CarlosZiegler/template-cloudflare/commit/3ec1df1a), [bb4e786e](https://github.com/CarlosZiegler/template-cloudflare/commit/bb4e786e), [08816323](https://github.com/CarlosZiegler/template-cloudflare/commit/08816323)). [Days and the time zone](/docs/features/analytics#days-and-the-time-zone).
- **`/admin/analytics`.** Platform admins see the period's views, events, countries, active sources, the share with consent and Cloudflare's unique visitors (both dimmed, the latter marked "CF"), views per day stacked by source with imported days hatched, release markers and campaign bands, annotations they can add or delete, and the top pages, countries, referrers and events ([4555bb3d](https://github.com/CarlosZiegler/template-cloudflare/commit/4555bb3d), [97c35587](https://github.com/CarlosZiegler/template-cloudflare/commit/97c35587)).
- **Bklit charts in `packages/ui`.** The first Bklit components in the template: the composed chart, markers, reference area and sparkline, with `motion` 14.14.0 and `d3-array`, `d3-scale` and `d3-shape`; the chart roles are theme tokens ([47163f57](https://github.com/CarlosZiegler/template-cloudflare/commit/47163f57)). Bundle cost: [`docs/measurements/2026-11-27-admin-analytics.md`](https://github.com/CarlosZiegler/template-cloudflare/blob/main/docs/measurements/2026-11-27-admin-analytics.md).

## Billing proven on Workers and Node; RevenueCat account deletion and promotional grants

2026-11-27

The same signed webhooks, checkouts and scheduled ticks now run against the built Worker and the Node server in CI, account deletion deletes the RevenueCat customer, and promotional entitlements grant Paid Access.

- **Billing on Workers and on a Node server, tested together.** `pnpm test:billing:runtimes` builds both targets and sends each the same signed Stripe, Polar, Pagar.me and RevenueCat deliveries, checkout, portal and Pix calls, an account deletion and a scheduled tick (the Worker's cron; `jobs:run --once --production` on Node), with local stubs for every provider API. Both must answer, call providers and store billing rows the same; they do. The e2e workflow runs it. See [Payments](/docs/features/payments#on-workers-or-on-a-node-server).
- **Deleting an account deletes the RevenueCat customer.** The deletion queues it in its own transaction; the cron calls RevenueCat's `DELETE /v1/subscribers/{id}`, retries with a backoff up to once a day, never blocks the deletion and records `billing.customer_erased` in the audit log. Store subscriptions are not cancelled by it. See [RevenueCat](/docs/features/revenuecat#when-an-account-is-deleted).
- **Promotional entitlements grant Paid Access.** A RevenueCat promotional grant (store `promotional`) counts in sandbox and production, never renews, and ends when revoked; its webhook is accepted on a sandbox server too.
- **Restore behavior.** The template keeps RevenueCat's default, "Transfer to new App User ID", now documented as its choice.
- **Clearer store states in the app.** A restore that finds nothing says so, and a failed plan load says the store could not be reached and loads the plans again on "Check subscription" instead of claiming nothing is for sale. Development builds turn on RevenueCat's debug logs. Copy in English, German, French and Brazilian Portuguese.
- **Go-live checklist per provider** on [Payments](/docs/features/payments#go-live-checklist-per-provider): keys, webhook URL on Workers or a Node server, plan ids and test mode.

[PR #224](https://github.com/CarlosZiegler/template-cloudflare/pull/224)

## Brazilian Portuguese as the fourth language

2026-11-27

pt-BR joins English, German and French in every catalog: web, mobile, error messages and account emails, with public pages under /br, share cards, push texts and the language pickers. A phone set to Brazilian Portuguese now opens the app in Portuguese instead of English.

- **Every catalog.** `apps/web/src/locales/pt-BR.ts`, `apps/mobile/src/locales/pt-BR.ts`, `packages/errors/src/locales/pt-BR.ts` and `packages/email/src/locales/pt-BR.ts` hold the same keys and placeholders as English, written with "você" and Brazilian vocabulary. The parity, placeholder and bundle-marker tests cover the fourth catalog. The text was machine-assisted and still needs a native review before a client ships it. See [Internationalization](/docs/features/i18n).
- **Public pages under `/br`.** `locale.config.ts` adds `"pt-BR"` with the slug `br`: `/br/privacy` is the Portuguese page, `?lang=pt-BR`, `?lang=pt_br` and `?lang=pt` answer a 301 to it, `/pt-BR/privacy` redirects to `/br/privacy`, and `Accept-Language: pt-BR` sends a first visit from `/` to `/br`. Hreflang, the sitemap, `og:locale` (`pt_BR`), the share cards, `/br/index.md` and the language switcher include it. URL segments stay untranslated and English stays the default. See [SEO and discovery](/docs/features/seo).
- **The phone's language.** The app read only the device's language code, so a phone in `pt-BR` reported `pt`, matched no language and opened in English. `languageForDevice` now matches the device's preferred locales by full tag first, through `matchLanguage` from `@template-cloudflare/intl`. Push reminders register in the app's full language (`pt-BR`) instead of its first two letters, and the settings picker lists Português (Brasil).
- **Emails and notifications.** Account emails write dates as `11 de julho de 2026, 12:34 UTC`; `PUSH_LOCALES` and the reminder text include `pt-BR` (the column is plain text, so no migration).
- **Landing.** The language list and the i18n illustration name Portuguese. The four product captures have no Portuguese version yet, so `/br` shows the English ones with Portuguese alternative text.

## Earlier updates

- 2026-11-27: [Error reports reach a locked-down tracker only through the Worker](/docs/changelog/2026-11-27-error-reporting-ingest-key)
- 2026-11-27: [Native crash reports from the Expo app reach a locked-down tracker](/docs/changelog/2026-11-27-error-reporting-native-relay)
- 2026-11-27: [Error reporting to a self-hosted tracker, off until a DSN is set](/docs/changelog/2026-11-27-error-reporting)
- 2026-11-27: [Report a problem or a suggestion from the web and the app, triaged in an admin Feedback inbox](/docs/changelog/2026-11-27-feedback-reports)
- 2026-11-27: [Pix, card and boleto with Pagar.me; Stripe and Polar review](/docs/changelog/2026-11-27-pagarme-billing)
- 2026-11-27: [Production guide and restore drill](/docs/changelog/2026-11-27-production-guide)
- 2026-11-27: [RevenueCat ready to use: webhooks RevenueCat counts as delivered, session-long store identity, Paywall and Customer Center](/docs/changelog/2026-11-27-revenuecat-ready)
- 2026-11-27: [Roles, permissions and consent for sensitive data](/docs/changelog/2026-11-27-roles-and-consent)
- 2026-11-27: [Upstream shadcn and ReUI fixes, ui-sdk beta.17, and OpenUI in a lab page](/docs/changelog/2026-11-27-ui-registries-openui)
- 2026-11-27: [Email, push and outbound webhooks leave the deployed Worker again](/docs/changelog/2026-11-27-workerd-fetch-redirect)
- 2026-11-24: [Worst-case data, frame budgets and a slop audit in the UI recipe](/docs/changelog/2026-11-24-design-skills-vendored)
- 2026-11-24: [oRPC 2.0.0-beta.53 and ui-sdk 0.1.0-beta.16](/docs/changelog/2026-11-24-orpc-and-ui-sdk)
- 2026-11-24: [Previews skip email verification](/docs/changelog/2026-11-24-preview-email-verification)
- 2026-11-24: [A recipe for polished web views, and fifteen more design sources](/docs/changelog/2026-11-24-ui-polish-skill)
- 2026-11-24: [Repo notes that survive a skills update, and every vendored skill on its latest upstream](/docs/changelog/2026-11-24-vendored-skill-notes)
- 2026-11-22: [e2e 0.24, RevenueCat 11 and every dependency at its newest release](/docs/changelog/2026-11-22-dependency-round)
- 2026-11-22: [Job deadlines work through transaction poolers](/docs/changelog/2026-11-22-job-transaction-timeouts)
- 2026-11-21: [End-to-end tests on one local stack that a killed run never leaves behind](/docs/changelog/2026-11-21-e2e-pilot)
- 2026-11-20: [Dependencies at their latest releases, and docs Markdown on the new Fumadocs](/docs/changelog/2026-11-20-dependency-round)
- 2026-11-20: [An agent on the live page asks the person first](/docs/changelog/2026-11-20-live-page-agent)
- 2026-11-20: [Agents can see the textarea, fields, OTP, command, calendar, carousel, resizable, tree and rating](/docs/changelog/2026-11-20-ui-sdk-wrappers)
- 2026-11-19: [ui-sdk under the UI kit, and a dependency round](/docs/changelog/2026-11-19-ui-sdk-and-dependency-round)
- 2026-11-19: [Web screens follow ui-sdk's own skill](/docs/changelog/2026-11-19-ui-sdk-skill)
- 2026-11-13: [Security and backend quick wins](/docs/changelog/2026-11-13-security-quick-wins)
- 2026-11-09: [Authentication rate limits](/docs/changelog/2026-11-09-auth-rate-limit)
- 2026-11-09: [Server session cache](/docs/changelog/2026-11-09-server-session-cache)
- 2026-11-07: [Bklit is the only chart library, Stageshow the only way to draw product UI](/docs/changelog/2026-11-07-bklit-and-stageshow-only)
- 2026-11-07: [Signed-in navigation no longer waits on the session read](/docs/changelog/2026-11-07-session-reads)
- 2026-11-07: [Skullet is the only way to draw a loading skeleton](/docs/changelog/2026-11-07-skullet-only-skeletons)
- 2026-11-06: [Agent skills from upstream, Expo's renamed skills, and three updates held back](/docs/changelog/2026-11-06-agent-skills-update)
- 2026-11-06: [Code is written in English](/docs/changelog/2026-11-06-code-in-english)
- 2026-11-06: [The consent banner paints from the HTML, repeat visits skip revalidation, and real Web Vitals](/docs/changelog/2026-11-06-web-quick-wins)
- 2026-11-05: [Dates in your time zone, without a hydration error](/docs/changelog/2026-11-05-dates-in-your-time-zone)
- 2026-11-05: [Public pages paint before any JavaScript arrives](/docs/changelog/2026-11-05-first-paint)
- 2026-11-04: [Better Auth 1.7.16 security fix and dependency round](/docs/changelog/2026-11-04-better-auth-security-dependency-round)
- 2026-11-04: [Animated assistant approval on the landing, and a design patterns page](/docs/changelog/2026-11-04-landing-assistant-demo)
- 2026-11-04: [Loading skeletons drawn from the real components](/docs/changelog/2026-11-04-skullet-skeletons)
- 2026-10-29: [Invitations are not a mail relay](/docs/changelog/2026-10-29-invitation-relay)
- 2026-10-29: [MCP Apps widget, approval status and plugin marketplaces](/docs/changelog/2026-10-29-mcp-apps-widget-approval-status)
- 2026-10-29: [One URL per language](/docs/changelog/2026-10-29-path-locales)
- 2026-10-29: [Account emails in React Email, in English, German and French](/docs/changelog/2026-10-29-react-email)
- 2026-10-29: [Share cards, Markdown negotiation and one site identity](/docs/changelog/2026-10-29-seo-agent-readiness)
- 2026-10-27: [TanStack AI 1.0, password forms and iPhone Duo](/docs/changelog/2026-10-27-deps-password-forms-iphone-duo)
- 2026-10-19: [Agent skills from upstream and the /pr template](/docs/changelog/2026-10-19-agent-skills-update)
- 2026-10-19: [Ponytail from the official plugin](/docs/changelog/2026-10-19-ponytail-plugin)
- 2026-10-17: [One folder per backend feature, tagged errors and written rules](/docs/changelog/2026-10-17-backend-structure)
- 2026-10-17: [One folder per mobile feature, and the API aliases are gone](/docs/changelog/2026-10-17-mobile-structure)
- 2026-10-17: [The web app is organized by feature, like the backend](/docs/changelog/2026-10-17-web-structure)
- 2026-10-16: [Auth and tenant security fixes](/docs/changelog/2026-10-16-auth-and-security-fixes)
- 2026-10-16: [Database, Worker and web performance](/docs/changelog/2026-10-16-performance-and-placement)
- 2026-10-16: [Row-level security per Organization](/docs/changelog/2026-10-16-row-level-security)
- 2026-10-15: [AI assistant and one tool catalog](/docs/changelog/2026-10-15-assistant-and-agent-tools)
- 2026-10-15: [Dependency round, i18next fix and ReUI controls](/docs/changelog/2026-10-15-dependency-round-and-reui)
- 2026-10-15: [Developer documentation and changelog](/docs/changelog/2026-10-15-developer-docs-and-changelog)
- 2026-10-15: [Documents and large uploads](/docs/changelog/2026-10-15-documents-and-large-uploads)
- 2026-10-15: [Landing page redesign](/docs/changelog/2026-10-15-landing-redesign)
- 2026-10-15: [Landing sections and project skills](/docs/changelog/2026-10-15-landing-sections-and-project-skills)
- 2026-10-14: [Trace and code block primitives](/docs/changelog/2026-10-14-trace-and-code-blocks)
- 2026-10-13: [TanStack Start 1.0, OG images and durable imports](/docs/changelog/2026-10-13-start-og-and-imports)
- 2026-10-12: [Payments, native screens and a new landing page](/docs/changelog/2026-10-12-payments-and-native-experience)
- 2026-10-03: [Runtime and recovery hardening](/docs/changelog/2026-10-03-runtime-and-recovery)
- 2026-09-25: [Authentication foundations and performance](/docs/changelog/2026-09-25-auth-and-performance)
- 2026-09-24: [Platform dependency alignment](/docs/changelog/2026-09-24-platform-dependencies)
- 2026-09-03: [oRPC and Drizzle upgrades](/docs/changelog/2026-09-03-typed-api-upgrade)
- 2026-08-25: [Typed domain operations and a real dashboard](/docs/changelog/2026-08-25-typed-domain-and-dashboard)
- 2026-08-24: [Agent connections and native account security](/docs/changelog/2026-08-24-agent-connections-and-account-security)
- 2026-08-13: [Cloudflare email and shared UI](/docs/changelog/2026-08-13-email-and-ui)
- 2026-07-30: [An enforced client/server boundary](/docs/changelog/2026-07-30-client-boundary)
- 2026-07-24: [Native interface foundations](/docs/changelog/2026-07-24-native-foundation)
- 2026-07-13: [Administration and data workflows](/docs/changelog/2026-07-13-admin-and-data-workflows)
- 2026-06-10: [Setup, storage and localization](/docs/changelog/2026-06-10-setup-storage-and-i18n)
