Logo Lanfrica

Justdan111/coughSense-frontend

Domaine:

healthcare

Type de record:

software
Créateur:
Jus
Hôte:
AI-powered cough sound triage system for early detection of respiratory diseases in Nigeria. Final year project utilising machine learning to triage respiratory risks through audio classification. # CoughSense — Frontend AI-assisted respiratory triage. Users record (or upload) a cough sample, optionally answer a short symptom checklist, and receive a risk-scored recommendation. > **Disclaimer**: CoughSense is an informational tool, not a medical device. It does not diagnose, prevent, or treat any condition. --- ## Stack | Concern | Choice | |----------------|--------| | Framework | Next.js 16 (App Router, React Compiler enabled) | | Language | TypeScript 5 (strict) | | UI | Tailwind CSS v4, Radix UI primitives, Lucide icons | | Animation | Framer Motion | | HTTP | Axios with token interceptor | | Auth | JWT in cookie + cached user in `localStorage` | | Testing | Playwright (E2E) + axe-core (a11y) | | Package mgr | pnpm | --- ## Quick start ### Prerequisites - Node.js 20+ - pnpm 10+ - Docker Desktop (only required if you want to use the MCP-driven dev tooling) - The CoughSense FastAPI backend running on `127.0.0.1` (only required for live data — tests run fully mocked) ### Install + run ```bash pnpm install pnpm run dev # → localhost ``` Then in another terminal, start the backend (see `../../backend/`): ```bash cd ../../backend && uvicorn main:app --reload ``` ### Environment Create `.env.local`: ``` FASTAPI_URL=127.0.0.1 ``` The Next.js route handlers under `src/app/api/` proxy to this URL. --- ## Scripts | Script | What it does | |---|---| | `pnpm run dev` | Start Next.js dev server with webpack | | `pnpm run build` | Production build | | `pnpm run start` | Run the production build | | `pnpm run lint` | ESLint | | `pnpm run test:e2e` | Run the full Playwright suite (mocked, no backend needed) | | `pnpm run test:e2e:integration` or | Run integration tests against the live FastAPI backend | | `pnpm run test:e2e:ui` | Open Playwright's UI mode for interactive debugging | | `pnpm run test:e2e:headed` | Run tests with visible browsers | | `pnpm …