Live demo: https://6943daf9536c1156259a0f17--velvety-valkyrie-af2a4f.netlify.app/
This project is a Vite + React + Tailwind frontend prototype that simulates a Tomatis training clinic workflow. It focuses on UI/UX, user flows, and data presentation using local mock data, making it suitable for demos, product discovery, and rapid iteration before backend integration.
- Device monitoring center
- 12-channel device cards with status and progress display
- Start/pause/resume/stop per device and batch start/pause
- Session timers and progress tracking for ongoing sessions
- Volume controls for air/bone channels
- Login & security flows
- Demo login options and first-login password change
- Failed login attempt lockout with timed countdown
- Patient archive
- Add/edit/delete patient profiles
- Search with name/ID/phone/pinyin matching
- Pagination for patient list and treatment records
- Date range filtering and record selection
- PDF and Excel export of treatment reports
- Scheme management
- Preset and custom treatment schemes
- Copy/edit/delete schemes
- Multi-stage parameter tables and JSON export
- Media library
- Folder tree navigation with counts
- Search, sort, selection, batch operations
- Audio preview controls and file details panel
- Recording/import modals and “export to Audacity” demo flow
- System settings
- Audacity path configuration (demo-only)
- React 18 + Vite
- Tailwind CSS
- jsPDF + jspdf-autotable (PDF export)
- xlsx (Excel export)
- lucide-react (icons)
npm install
npm run devBuild & preview:
npm run build
npm run previewnpm run dev: start local dev servernpm run build: production buildnpm run preview: preview production build locally
.
├─ App.jsx
├─ index.html
├─ main.jsx
├─ index.css
├─ components/
│ ├─ common/
│ ├─ media/
│ ├─ modals/
│ ├─ patient/
│ └─ scheme/
├─ data/
│ └─ mockData.js
├─ utils/
│ ├─ helpers.js
│ ├─ helpers.jsx
│ └─ styles.js
└─ views/
├─ DashboardView.jsx
├─ LoginView.jsx
├─ MediaLibraryView.jsx
├─ PatientArchiveView.jsx
├─ PatientDetailsView.jsx
├─ SchemeManagementView.jsx
└─ SettingsView.jsx
The app is a single-page React UI driven by state in App.jsx:
- Global state includes authentication, current view, devices, patients, records, media files, and modals.
mockData.jsprovides the seed data and default scheme templates.- Each view receives state and callbacks as props; views are largely presentational.
- Devices: status, progress info, volume, patient binding
- Patients: profile, history, last scheme, training progress
- Records: treatment history per patient
- Media: file list and folder tree
File: views/DashboardView.jsx
- Displays devices in a 4x3 grid with status and actions.
- Supports individual and batch actions:
- Start, pause, resume, stop
- Volume adjustments (air/bone)
- Tracks session time and progress per device.
File: views/LoginView.jsx
- Simulated login with lockout after repeated failures.
- “First login” flow triggers a password change modal.
File: views/PatientArchiveView.jsx
- Patient list supports search by name, MRN, phone, and pinyin.
- CRUD via modal forms; validations on required fields and date.
- Treatment records show:
- Date range filtering
- Record selection and batch export
- PDF/Excel export with jsPDF + xlsx
File: views/PatientDetailsView.jsx
- Displays current device session details for the selected patient.
- Provides quick actions similar to Dashboard controls.
File: views/SchemeManagementView.jsx
- Preset and custom schemes displayed with filters.
- Scheme details show multi-stage parameter tables.
- Supports:
- Create new scheme (from template or empty)
- Copy existing scheme
- Edit and delete custom schemes
- Export scheme to JSON
File: views/MediaLibraryView.jsx
- Folder tree with recursive counts and breadcrumbs.
- File list supports:
- Search and multi-select
- Sorting by name/date/duration
- Context menu actions
- Right panel shows details, playback controls, and actions.
- “Export to Audacity” is a demo flow that triggers a modal.
File: views/SettingsView.jsx
- Audacity path setting (demo only).
File: data/mockData.js
SYSTEM_CONFIG: version label used in header.MOCK_PATIENTS_DATA: patient seed data.MOCK_TREATMENT_RECORDS: treatment record seed data.MOCK_MEDIA_FILES: media file seed data.DEFAULT_STAGESandINITIAL_SCHEMES: scheme templates.
- Patient reports:
- PDF export via jsPDF + autoTable
- Excel export via xlsx
- Scheme export:
- JSON file download (client-side)
- No backend or persistence; data resets on refresh.
- Recording, file move, and export are UI-level demos only.
- No authentication or role-based access control.
- Branding: update header logo/title in
App.jsx. - Device grid size: adjust layout in
views/DashboardView.jsx. - Schemes: update defaults in
data/mockData.js. - Colors and global styles:
utils/styles.jsand Tailwind classes.
- If the app fails to start, ensure Node.js is installed and run
npm install. - If exports fail in some browsers, try another browser with file download enabled.
- If fonts do not render as expected in PDF, update jsPDF font setup.
Not specified. Add a LICENSE file if you plan to open source this project.