name: translation-manager
description: Translation Manager for this repo: Supabase-backed translations, admin UI under /admin/translation-manager with Home live preview and click-to-select translation, Edge Functions (translations-get/admin/suggest), build-time translation pipeline, and security hardening. Use when planning or editing translation manager UI, Supabase schema/migrations, translation scripts (seed/pull), Edge Functions, translation auth, or troubleshooting translation data/AI suggestions.
Translation Manager
Overview
Maintain the translation system end-to-end (admin UI, Supabase tables/functions, build-time translation pipeline) and keep security tight. The Home page is now wired for a live preview with click-to-select text and AI suggestions in the admin UI, plus markup-aware headings for full-line translation, per-entry Save, and a single Publish action.
Workflow
- Identify scope (UI, data/schema, Edge Functions, scripts/build, auth/security).
- Load the matching reference file(s).
- Implement changes and keep guardrails intact.
- Validate with local checks and Supabase steps.
- Update references if scope or architecture changes.
Reference Map
- Scope and goals:
references/scope-and-goals.md
- System architecture and file map:
references/system-architecture.md
- Current implementation snapshot:
references/current-state.md
- Supabase setup and Edge Functions:
references/supabase-setup.md
- Operational workflows:
references/workflows.md
- Security hardening:
references/security-hardening.md
- Troubleshooting:
references/troubleshooting.md
Guardrails
- Never expose the service role key to the client or browser.
- Require a Supabase user token for
translations-admin/translations-suggest, and keep signups disabled unless you add an allowlist/role check.
- Keep RLS policies intact; assume service role bypasses them.
- Preserve the build-time translation flow unless explicitly changed.
Quick File Map
- Admin UI:
client/src/components/admin/admin-layout.tsx, client/src/pages/admin/index.tsx, client/src/pages/admin/translation-manager.tsx, client/src/pages/translation-manager.tsx
- Home sections + data:
client/src/pages/home.tsx, client/src/components/sections/home/*, client/src/data/home.ts, client/src/data/home-faqs.ts
- Translation markup helper:
client/src/lib/translation-markup.tsx
- Server proxy:
server/routes.ts
- Supabase:
supabase/migrations/0001_translations.sql, supabase/functions/*
- Build/seed:
scripts/seed-translations.mjs, scripts/pull-translations.mjs, client/src/generated/translations.json
1---2name: translation-manager3description: Translation Manager for this repo: Supabase-backed translations, admin UI under /admin/translation-manager with Home live preview and click-to-select translation, Edge Functions (translations-get/admi4---5
6---
7name: translation-manager
8description: Translation Manager for this repo: Supabase-backed translations, admin UI under /admin/translation-manager with Home live preview and click-to-select translation, Edge Functions (translations-get/admin/suggest), build-time translation pipeline, and security hardening. Use when planning or editing translation manager UI, Supabase schema/migrations, translation scripts (seed/pull), Edge Functions, translation auth, or troubleshooting translation data/AI suggestions.
9---
10
11# Translation Manager
12
13## Overview
14
15Maintain the translation system end-to-end (admin UI, Supabase tables/functions, build-time translation pipeline) and keep security tight. The Home page is now wired for a live preview with click-to-select text and AI suggestions in the admin UI, plus markup-aware headings for full-line translation, per-entry Save, and a single Publish action.
16
17## Workflow
18
191. Identify scope (UI, data/schema, Edge Functions, scripts/build, auth/security).
202. Load the matching reference file(s).
213. Implement changes and keep guardrails intact.
224. Validate with local checks and Supabase steps.
235. Update references if scope or architecture changes.
24
25## Reference Map
26
27- Scope and goals: `references/scope-and-goals.md`
28- System architecture and file map: `references/system-architecture.md`
29- Current implementation snapshot: `references/current-state.md`
30- Supabase setup and Edge Functions: `references/supabase-setup.md`
31- Operational workflows: `references/workflows.md`
32- Security hardening: `references/security-hardening.md`
33- Troubleshooting: `references/troubleshooting.md`
34
35## Guardrails
36
37- Never expose the service role key to the client or browser.
38- Require a Supabase user token for `translations-admin`/`translations-suggest`, and keep signups disabled unless you add an allowlist/role check.
39- Keep RLS policies intact; assume service role bypasses them.
40- Preserve the build-time translation flow unless explicitly changed.
41
42## Quick File Map
43
44- Admin UI: `client/src/components/admin/admin-layout.tsx`, `client/src/pages/admin/index.tsx`, `client/src/pages/admin/translation-manager.tsx`, `client/src/pages/translation-manager.tsx`
45- Home sections + data: `client/src/pages/home.tsx`, `client/src/components/sections/home/*`, `client/src/data/home.ts`, `client/src/data/home-faqs.ts`
46- Translation markup helper: `client/src/lib/translation-markup.tsx`
47- Server proxy: `server/routes.ts`
48- Supabase: `supabase/migrations/0001_translations.sql`, `supabase/functions/*`
49- Build/seed: `scripts/seed-translations.mjs`, `scripts/pull-translations.mjs`, `client/src/generated/translations.json`