Production-style, frontend-only implementation of a modern telehealth platform focused on performance, UX, and clean architecture.
- Scope: Frontend only (no real backend APIs)
- Data: Mocked and centralized for easy API replacement
- Goal: Real-world UI quality with scalable component structure
- UX: Responsive, accessible, and role-aware navigation
- React 19
- React Router DOM
- Vite
- ESLint
- CSS (custom design system)
npm install
npm run devnpm run dev # Start development server
npm run build # Build production bundle
npm run lint # Run lint checks- Primary actions for booking, emergency, tracking, and doctor discovery
- Trust strip with key metrics
- Top doctors preview section
- Testimonial cards and conversion CTA band
- Subtle motion, hover polish, and loading skeletons
- Date selection
- Time slot selection
- Doctor preference selection
- Emergency appointment flow
- Form validation and user feedback
- Doctor dashboard:
- Appointment list
- Patient details panel
- Prescription and treatment area
- Patient dashboard:
- Appointment history
- Treatment and status overview
- Medication snapshot
- Sign in, sign up, forgot password, doctor email verification
- Mock role-based login (Patient/Doctor)
- Protected dashboard routes
- Logout in navigation
- Doctor search with filters:
- Name
- Specialization
- Availability
- Tracking page with ID lookup and visual status timeline
- Prescription preview per appointment
- Invoice preview per appointment
/- Homepage/doctors- Doctor search and filters/book- Appointment booking/track- Appointment tracking/auth/sign-in- Sign in/auth/sign-up- Sign up/auth/forgot-password- Password recovery/auth/doctor-verify-email- Doctor email verification/doctor/dashboard- Doctor dashboard (protected)/patient/dashboard- Patient dashboard (protected)/dashboard- Role-based dashboard redirect/records/:appointmentId- Prescription and invoice view
src/
components/
EmptyState.jsx
Footer.jsx
FormField.jsx
Layout.jsx
Navbar.jsx
PageHeader.jsx
ProtectedRoute.jsx
StatCard.jsx
StatusTimeline.jsx
context/
AuthContext.jsx
data/
mockData.js
pages/
AuthSignInPage.jsx
AuthSignUpPage.jsx
BookingPage.jsx
DoctorDashboardPage.jsx
DoctorVerifyEmailPage.jsx
ForgotPasswordPage.jsx
HomePage.jsx
NotFoundPage.jsx
PatientDashboardPage.jsx
PrescriptionInvoicePage.jsx
SearchDoctorsPage.jsx
TrackingPage.jsx
App.jsx
index.css
main.jsx
- Route-level code splitting via
React.lazyandSuspense ProtectedRoutefor auth/role checks on dashboard pagesAuthProviderwith localStorage-backed mock session state- Shared layout shell and reusable UI components
- Centralized mock data for backend-ready integration
- Performance: lazy-loaded page modules and lightweight component composition
- Maintainability: clear separation of pages, shared components, and data
- UX: strong CTA hierarchy, emergency prioritization, trust-building sections
- Accessibility: labeled controls, semantic structure, readable contrast
- Responsiveness: adaptive grid layouts and mobile-aware navigation spacing
- Skip link added for direct keyboard navigation to main content
- Route-change focus management to announce new page context faster for assistive technologies
- Mobile menu supports keyboard flow with
Escclose behavior and focus trap while open - Strong visible focus styles across links, buttons, and form controls
- Form fields expose validation states with ARIA (
aria-invalid,aria-describedby) - Auth pages announce validation errors and success updates via live regions (
role="alert",role="status") - Reduced motion support via
prefers-reduced-motion
- Keyboard only navigation
- Use
TabandShift+Tabacross navbar, forms, cards, and footer. - Confirm focus is always visible.
- Skip link behavior
- On first
Tabpress from top of page, activate Skip to main content. - Confirm focus lands in main page content.
- Mobile menu keyboard flow
- Open menu with keyboard.
- Use
Escto close. - Confirm focus remains trapped inside menu while open.
- Route-change focus announcement
- Navigate between routes via keyboard.
- Confirm focus moves to page heading/content after navigation.
- Auth form validation
- Submit empty/invalid fields on sign in, sign up, forgot password, and doctor verify pages.
- Confirm first invalid field receives focus and errors are announced.
- Reduced motion preference
- Enable reduced motion in OS settings.
- Confirm non-essential animations are minimized.
- Replace mock data from
src/data/mockData.jswith API calls - Keep current submit handlers and connect to service layer
- Existing entities map cleanly to backend DTOs:
- doctor
- appointment
- prescription
- invoice
npm run lint- passingnpm run build- passing
- Sign in supports role selection (Patient or Doctor)
- Unauthenticated dashboard access redirects to sign in
- Authenticated users can access only their own role dashboard
This project intentionally focuses on frontend architecture and UX; backend logic and persistence are mocked and integration-ready.