Add three UI locales (so/ar/de) with full ~1,660-key translations alongside en/fr, selectable in Settings → Profile. Arabic gets full right-to-left support: - config.ts registers the locales and exports a `dirFor` helper; an inline <head> script in layout.tsx sets <html dir/lang> before first paint (no RTL flash), and i18n-provider keeps them in sync on language change. - ~160 physical direction utilities converted to logical (ms/me/ps/pe/ start/end/text-start/text-end); directional chevrons/arrows get rtl:rotate-180; chat-bubble align variants fixed to logical. - IBM Plex Sans Arabic appended to the sans/heading font stacks for per-character Arabic fallback. - Language persists to the backend user_settings and re-applies on sign-in so it roams across devices (localStorage stays the offline source of truth). - New scripts/check-locales.mjs (npm run check-locales) enforces key/placeholder parity and Arabic CLDR plural completeness. Bump to 0.3.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
temetro frontend
The clinician-facing AI chat UI for temetro — a Next.js 16 app where
clinicians retrieve and organize patient data in natural language, rendered as
rich record cards. It's wired to the ../backend for real auth,
multi-tenant clinics, and live patient data.
Stack
Next.js 16 (App Router) · React 19 · TypeScript · Tailwind CSS v4 · COSS UI components (Base UI) · i18next · Socket.io client.
This app runs a customized Next.js 16 whose conventions differ from the public docs (e.g. route protection lives in
proxy.ts, notmiddleware.ts). SeeCLAUDE.mdandnode_modules/next/dist/docs/before writing Next.js code.
Develop
npm install
npm run dev # Next dev server (Turbopack) on http://localhost:3000
Other scripts: npm run build (production build), npm run start (serve the
build), npm run lint. There is no test runner — verify changes by running the
dev server.
Talking to the backend
The frontend needs the API running (see ../backend). It resolves
the backend URL from the host you open the app on — so it works on
localhost and across the clinic LAN (http://<server-IP>:3000) without a
rebuild. Set NEXT_PUBLIC_API_URL only to pin a fixed or reverse-proxied URL;
see lib/backend-url.ts.
Architecture
app/— App Router.app/(app)/is the authenticated product shell;app/(auth)/holds the login / signup / onboarding pages.components/chat/— the chat UI (input, message state, patient cards).components/settings/— settings panels, including About & updates (version + LAN access).components/ui/— COSS primitives (Base UI, added via the shadcn CLI).lib/— API + auth clients, i18n, and data helpers.
See CLAUDE.md for the full architecture, theming, and gotchas.
License
MIT.
