Skip to content

RyanChenJung/Care-Collaboration-Platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Care Collaboration Platform

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.

🌟 Key Features

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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).

🛠️ Technical Stack

Frontend

  • 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.

Backend

  • 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.

🧪 Testing & Quality Assurance

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-missing

🔧 Maintenance & Dev Tools

  • seed.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.

🚀 Getting Started

Prerequisites

Quick Start

  1. Clone the repository:
    git clone <repository-url>
    cd healthcare
  2. Run with Docker:
    docker-compose up --build
  3. Access:

📂 Project Structure

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

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A Dockerized family care log. Track care notes (text/photo/voice), tasks with creator/completer history, and vital signs (BP/HR charts & averages). Features multi-language support (ZH/ID/EN), real-time voice transcription, and ownership-based editing. Built with FastAPI, React, and FFmpeg for universal compatibility.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors