An interactive, mobile‑first React app that helps users identify signs of relationship abuse and provides guidance on what to do next.
- Mobile‑first UX with accessible components
- Guided questionnaire and results flow
- Client‑side routing
- Comprehensive unit tests with coverage
- React + TypeScript + Vite
- React Router
- Jest + React Testing Library
- ESLint (flat config)
git clone https://github.com/asabahebwa/hotline.git
cd hotline
npm install
npm run devApp runs at http://localhost:5173 (default Vite port). Use npm run preview to serve the production build locally.
npm run dev: Start Vite dev servernpm run build: Type‑check and build for productionnpm run preview: Preview the production buildnpm run test: Run unit tests oncenpm run test:watch: Run tests in watch modenpm run test:coverage: Run tests with coverage output (seecoverage/)npm run lint: Lint the codebase
Tests are authored with Jest and React Testing Library under src/common/*.test.tsx.
Run:
npm run test # single run
npm run test:watch # watch mode
npm run test:coverage # generates text + lcov/html reportsCoverage artifacts are written to the coverage/ directory, including an HTML report (coverage/lcov-report/index.html).
hotline/
src/
common/ # Reusable UI components + tests
data/ # Static data sources
assets/ # Images, GIFs, SVGs
styles/ # Component‑scoped CSS
App.tsx # App shell
main.tsx # Entry point
npm run lintThe project uses ESLint with React, TypeScript, and hooks plugins.
- Dev server won’t start: delete
node_modulesandpackage-lock.json, thennpm install. - Importing images/CSS in tests: Jest is configured for CSS/SVG via
identity-obj-proxyandjest-transformer-svg. - React Router issues: ensure you’re using the correct versioned APIs for React Router 7.
PRs and issues are welcome. Please run npm run lint and npm run test before submitting.
MIT

