A robust, mobile-friendly web application designed to help families collaboratively track the daily care, health, and memories of an elderly family member. The system prioritizes ease of use, accountability, and rich media capture.
-
Daily Care Log (Threaded & Multimedia)
- Threaded Conversations: Family members can post daily updates and reply to existing ones.
- Rich Media: Support for attaching Photos and Voice Notes to any entry.
- Voice-First: Integrated voice recorder with real-time text transcription (STT) for quick entry.
-
Tasks & Accountability (Questions)
- Create Tasks: Easily create tasks or questions (e.g., "Take Meds").
- Tracking: Records who completed the task and when (timestamped in Asia/Taipei time).
- Discussion: Each task has its own nested comment thread for clarifying updates.
-
Vital Signs Module
- Tracking: Record Blood Pressure (Systolic/Diastolic) and Heart Rate.
- Visualization: Interactive, responsive charts (Dual-line for BP, Single-line for HR) showing trends over time.
- Integration: Clicking a data point on the chart jumps directly to that day's log.
-
Global History & Gallery
- Unified Gallery: Automatically aggregates every photo uploaded into a chronologically sorted visual history.
- Archives: Searchable history views for all Notes and Questions/Tasks ever posted.
-
User Experience (UX)
- Identity System: "Identify Yourself" sidebar for easy profile switching without complex logins.
- Localization (i18n): Instantly switch between Traditional Chinese, Indonesian, and English.
- Responsive Design: Optimized for Desktop, Tablet, and Mobile (hamburger menu).
- Framework: React 18 (Vite)
- State Management: React Context (i18n) & Local Storage (User Identity).
- API Layer: Centralized Axios instance (
src/api.js) with custom hooks (useVitals). - Styling: Tailwind CSS.
- Charts: Recharts for responsive Vital Sign visualization.
- Framework: FastAPI (Python 3.11+) - Async-native performance.
- ORM: SQLAlchemy 2.0 (Modernized declarative base).
- Validation: Pydantic V2 (High-speed validation with
model_config). - Database: SQLite (Persistent via Docker volumes).
- Audio: FFmpeg integration for standardizing voice captures to MP3.
The project maintains a high standard of reliability with a comprehensive test suite.
- Coverage: 94% backend code coverage.
- Isolation: Every test runs in a clean in-memory SQLite database.
- Features Tested:
- Integrated Audio/STT upload & processing.
- Vital Signs precision & logic accuracy.
- Cross-user Authorization (Ownership checks).
- Multi-language character encoding (i18n).
- System-wide data isolation.
Run Tests:
cd backend
pytest --cov=main --cov-report=term-missingseed.py: Instantly populates the database with 7 days of mock care data, notes, and vitals for UI testing.reset_data.py: A safety script to forcefully clear the database (including WAL files) and all user uploads, resetting the environment to a fresh state.
- Docker and Docker Compose
- FFmpeg (for local dev audio processing)
- Clone the repository:
git clone <repository-url> cd healthcare
- Run with Docker:
docker-compose up --build
- Access:
- Frontend: http://localhost:5173
- API Docs: http://localhost:8000/docs
healthcare/
├── backend/
│ ├── main.py # FastAPI endpoints & Lifespan logic
│ ├── models.py # SQLAlchemy 2.0 schemas
│ ├── database.py # Engine & Session configuration
│ ├── test_main.py # Comprehensive test suite
│ └── seed.py # Data seeding script
├── frontend/
│ ├── src/
│ │ ├── api.js # Centralized API configuration
│ │ ├── utils.js # Shared utility functions
│ │ ├── hooks/ # Custom React hooks (e.g., useVitals)
│ │ └── components/ # Refactored UI components
├── uploads/ # Root storage for all media
├── reset_data.py # Full system reset script
└── docker-compose.yml # Orchestration logic
This project is licensed under the MIT License - see the LICENSE file for details.