Skip to content

Feat/selfhost i18n domain global - #195

Open
safar2x wants to merge 3 commits into
every-app:mainfrom
safar2x:feat/selfhost-i18n-domain-global
Open

Feat/selfhost i18n domain global#195
safar2x wants to merge 3 commits into
every-app:mainfrom
safar2x:feat/selfhost-i18n-domain-global

Conversation

@safar2x

@safar2x safar2x commented Aug 6, 2026

Copy link
Copy Markdown

No description provided.

safar2x and others added 3 commits August 7, 2026 02:17
- Add i18next + react-i18next, en/ar locale files, and a language
  preference menu so the app can run in Arabic or English.
- Wire translated labels through the sidebar, keyword research page,
  create-project modal, project market fields, and settings page.
- Add a HelpHint component for inline contextual help text.
- alchemy.run.ts: bind the "selfhost" deploy stage to a custom domain
  (seo.safar2x.com) so it survives future deploy reconciliations
  instead of being torn down.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…n Overview

- Domain Overview's country picker gains a "Global (Top 10 Markets)"
  option: since DataForSEO Labs has no worldwide-aggregate endpoint,
  this sums/merges results across a fixed set of the largest search
  markets (US, UK, India, Brazil, Germany, France, Canada, Australia,
  Japan, Indonesia) instead of querying all ~94 supported countries,
  keeping the cost/latency of a domain search bounded.
  - Overview cards sum organic traffic/keywords across the top markets.
  - The keywords and pages tables merge each market's results
    (deduped by keyword/URL, keeping the highest-traffic instance),
    re-sort locally, and paginate the merged set.
- Add a Refresh button next to the domain search box that deletes the
  R2-cached entry for the exact current query (domain, location, page,
  sort, filters) and re-fetches, bypassing the up-to-12h cache TTL.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds machineAccessToken (alchemy.access.ts) and wires it into the
selfhost stage's deploy (alchemy.run.ts): provisions a Cloudflare
Access Service Token and prints its Client ID/Secret on deploy, so a
non-interactive client (e.g. an MCP client hitting /mcp) can
authenticate with CF-Access-Client-Id/CF-Access-Client-Secret headers
instead of the interactive IdP login the rest of the app requires.

Deliberately does not attach the token to an Access application: the
app's own JWT check (src/middleware/ensure-user/cloudflareAccess.ts)
verifies the token's `aud` against POLICY_AUD, and the Access
application actually protecting the selfhost custom domain isn't
managed by this alchemy stack (it predates it / was set up by hand in
the dashboard) — so it must be authorized there, by hand: Zero Trust >
Access > Applications > (the app protecting the hostname) > Policies >
add a "Service Auth" policy selecting this token.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant