Skip to content

elfatairy/containment

Repository files navigation

Forks Stargazers Issues project_license LinkedIn


Screenshot 2025-10-12 093814

Containment

A system for helping patients with autism, by tracking their health state with sensors and a camera and notify their emergency contact when there is an emergency.
Report Bug · Request Feature

Table of Contents
  1. Built With
  2. Installation
  3. License
  4. Contact

Built With

  • Expo
  • React Native
  • Firebase
  • react-i18next
  • ESP32

Features

Health Monitoring

  • Heart Rate Monitoring: Read and track heart rate in real-time using a heart rate sensor
  • Vibration Detection: Monitor patient movement and vibration patterns with a vibration sensor
  • GPS Location Tracking: Track patient location continuously with GPS sensor for safety and mobility monitoring

Data Management

  • Firebase Integration: Automatically save all sensor readings (heart rate, vibration, location) to Firebase Realtime Database
  • Real-Time Dashboard: Display live sensor data in an intuitive mobile interface
  • Historical Records: Save and review old health emergencies for future analysis and pattern recognition

Safety & Alerts

  • Smart Notifications: Automatically notify emergency contacts when sensor readings exceed safe thresholds
  • Emergency Contact System: Quick access to emergency contacts when critical health events are detected

Visual Monitoring

  • Live Camera Feed: Capture and display patient photos every 5 seconds for visual health monitoring
  • Remote Observation: View patient status remotely through the mobile app

Accessibility

  • Multi-Language Support: Seamlessly switch between Arabic and English using react-i18next
  • User-Friendly Interface: Easy-to-use mobile interface designed for quick access to critical information

Installation

Prerequisites

  • Node.js >= 18
  • npm or yarn
  • Expo Go app on your mobile device
  • Firebase project with Realtime Database enabled
  • ESP32 or ESP8266 board (for hardware component)

Mobile App Setup

  1. Clone the repo

    git clone https://github.com/elfatairy/noraan-land.git
    cd noraan-land
  2. Install dependencies

    npm install
  3. Configure Firebase

    Create a firebaseConfig.js file in the root directory:

    import { initializeApp } from 'firebase/app';
    import { getDatabase } from 'firebase/database';
    import { getAuth } from 'firebase/auth';
    
    const firebaseConfig = {
      apiKey: "your_api_key",
      authDomain: "your_auth_domain",
      databaseURL: "your_database_url",
      projectId: "your_project_id",
      storageBucket: "your_storage_bucket",
      messagingSenderId: "your_messaging_sender_id",
      appId: "your_app_id"
    };
    
    const app = initializeApp(firebaseConfig);
    export const database = getDatabase(app);
    export const auth = getAuth(app);
  4. Start the Expo development server

    npx expo start
  5. Run the app

    • Scan the QR code with Expo Go (Android) or Camera app (iOS)
    • Press a for Android emulator
    • Press i for iOS simulator (macOS only)

ESP32/ESP8266 Setup

  1. Open Arduino IDE

  2. Install required libraries

    • Go to Sketch → Include Library → Manage Libraries
    • Install:
      • WiFi (for ESP32/ESP8266)
      • Firebase ESP Client
  3. Open the ESP sketch

    Open esp/main/main.ino in Arduino IDE
    
  4. Configure WiFi and Firebase credentials

    // WiFi credentials
    const char* ssid = "your_wifi_ssid";
    const char* password = "your_wifi_password";
    
    // Firebase credentials
    #define FIREBASE_HOST "your_firebase_project.firebaseio.com"
    #define FIREBASE_AUTH "your_firebase_database_secret"
  5. Upload to ESP board and monitor serial output

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Omar Hassan - @omar_elfat76510 - elfatairy@omarhassan.net

Project Link: https://github.com/elfatairy/containment

containment: https://omarhassan.net

(back to top)

About

A system for helping patients with autism, by tracking their health state with sensors and a camera and notify their emergency contact when there is an emergency.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors