From e74975570ec4d1b0abb56c5b891036691fb988d0 Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Tue, 15 Sep 2026 11:03:38 +0200 Subject: [PATCH 1/2] feat(frontend): alias /pt-BR/gold to the gold app --- apps/frontend/_redirects | 5 +++++ apps/gold/CLAUDE.md | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/frontend/_redirects b/apps/frontend/_redirects index af60ab828..a54f88f0c 100644 --- a/apps/frontend/_redirects +++ b/apps/frontend/_redirects @@ -14,6 +14,11 @@ /pt-br/widget /_shell.html 200 # Gold lives as plain files under dist/client/gold/ (see netlify.toml), so /gold/ needs no rule. +# The locale-first alias mirrors /pt-BR/widget; Gold's canonical link still points at /gold/. +/pt-BR/gold /gold/index.html 200 +/pt-BR/gold/* /gold/:splat 200 +/pt-br/gold /gold/index.html 200 +/pt-br/gold/* /gold/:splat 200 # Everything else is a real 404 /* /404.html 404 diff --git a/apps/gold/CLAUDE.md b/apps/gold/CLAUDE.md index f0612b908..409463ac2 100644 --- a/apps/gold/CLAUDE.md +++ b/apps/gold/CLAUDE.md @@ -6,8 +6,8 @@ imported as a snapshot from `pendulum-chain/vortexperiments`, which keeps the pi - It is served by the frontend Netlify site at `https://www.vortexfinance.co/gold/`: `apps/frontend/netlify.toml` builds it with Vite `base: "/gold/"` and copies `dist/client` - into the frontend's `dist/client/gold/`, so no redirect rule exists. Like `/widget`, the - path is unprefixed; locale-prefixed variants can be added if other markets launch. + into the frontend's `dist/client/gold/`. Like `/widget`, the canonical path is unprefixed + and `/pt-BR/gold` is a rewrite alias in `apps/frontend/_redirects`. Reference public assets through `import.meta.env.BASE_URL`, never as root-relative `/brand/...` paths. - The API base comes from `VITE_SIGNING_SERVICE_PATH`, like the frontend: a path such as From 452faa01fc75c07e163fbae3f4cd6393ca69fa33 Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Tue, 15 Sep 2026 11:09:39 +0200 Subject: [PATCH 2/2] test(frontend): cover the gold alias in the redirects test --- apps/frontend/src/tests/netlify-redirects.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/frontend/src/tests/netlify-redirects.test.ts b/apps/frontend/src/tests/netlify-redirects.test.ts index eb5ae1b99..ca256fa62 100644 --- a/apps/frontend/src/tests/netlify-redirects.test.ts +++ b/apps/frontend/src/tests/netlify-redirects.test.ts @@ -11,9 +11,11 @@ const redirects = readFileSync(new URL("../../_redirects", import.meta.url), "ut }); describe("Netlify redirects", () => { - it("routes only the lowercase Portuguese widget path through the SPA shell", () => { + it("routes only the widget shell and the gold alias through lowercase Portuguese paths", () => { expect(redirects.filter(rule => rule.from.startsWith("/pt-br"))).toEqual([ - { from: "/pt-br/widget", status: "200", to: "/_shell.html" } + { from: "/pt-br/widget", status: "200", to: "/_shell.html" }, + { from: "/pt-br/gold", status: "200", to: "/gold/index.html" }, + { from: "/pt-br/gold/*", status: "200", to: "/gold/:splat" } ]); });