PreClinic UAE

Web app that helps people in the UAE think through how urgent a health situation might be and suggests a sensible next step (pharmacy, GP, hospital, or emergency). It is not medical advice or a diagnosis.

Life-threatening emergency: call 998 (UAE national ambulance). The app also has an Emergency screen for quick access to 998 and map-style help.


Documentation

Doc Purpose
docs/USER_GUIDE.md How to use the app (landing, symptom check, results, privacy)
docs/USER_PROMPTS.md Example phrases for testing the symptom box
docs/APP_SPECS.md Product and technical specification (routes, APIs, data)

Staff / demos — clinical review of recent checks: preclinic-uae.vercel.app/doctors


Stack

  • Frontend: React 18, TypeScript, Vite, Tailwind CSS, React Router
  • Backend: Express (api/app.ts), OpenAI triage (with rule-based fallback when no key)
  • Optional: Firestore via Firebase Admin, Google Maps (VITE_GOOGLE_MAPS_API_KEY)

Local development

Requirements: Node.js 20+ (recommended), npm.

npm install
cp .env.example .env
# Edit .env — at minimum set OPENAI_API_KEY for real triage (see .env.example comments).
npm run dev

Other scripts:

Command Description
npm run dev:client Vite only
npm run dev:server API only (tsx watch api/app.ts)
npm run build Bundle API for Vercel, tsc, Vite production build → dist/
npm run preview Preview production build
npm run lint ESLint
npm run test:e2e Playwright (install browsers once: npm run playwright:install)

Environment variables are documented in .env.example.


Repository layout

  • src/ — React UI (pages, components, lib)
  • api/ — Express app and serverless entry for Vercel (api/index.ts, bundled api/_vercel_app.js from api/app.ts)
  • e2e/ — Playwright specs
  • public/ — Static assets

Deployment (Vercel)

vercel.json sets the build output to dist and rewrites /api/* to the serverless function. Set production variables in the Vercel project (see comments in .env.example); do not commit secrets.

Share this project:

Updates