Files
temetro/frontend
Khalid Abdi 2c239fbd27 frontend: UI fixes + settings/patients features
- Record history: replace fragile COSS Timeline separator math with a
  continuous-rail list so every audited change renders in full (RTL-safe).
- Prescriptions: new reusable COSS DatePicker (Popover + Calendar) replaces
  raw <input type="date"> for Start/End date.
- Update banner: rebuilt with COSS Alert variant="warning"; pinned physical
  bottom-right so it stays bottom-right under Arabic RTL.
- AI setup notice: thin attached warning banner with clearer copy; now shown
  above the input in active chats too, not just the empty state.
- Settings profile: wire the previously dead Specialty (Select) and
  Professional links (editable rows) into the persisted preferences.
- Patients: add a status filter and broaden search to conditions/allergies.
- Sidebar user menu: quick language switch submenu (RTL already wired).
- ai-elements: fix a subset of Base UI type drift (22 -> 12; remainder is
  cmdk->Autocomplete migration drift kept behind ignoreBuildErrors).
- i18n: new keys added across all five locales (en/de/fr/ar/so).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 21:06:38 +03:00
..
2026-05-31 11:19:10 +03:00
2026-06-17 20:50:09 +03:00
2026-07-10 20:51:04 +03:00
2026-07-10 20:51:04 +03:00

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.

temetro AI chat

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, not middleware.ts). See CLAUDE.md and node_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.