AlzBuddy
AlzBuddy is a comprehensive mobile application designed to support Alzheimer's patients and their caregivers. It features a dual-interface system with tools for cognitive stimulation, safety monitoring, and daily task management.
📱 Features
For Patients
Scavenger Hunt (New!): An AI-powered game where patients find real-world objects using the camera.
Memory Games: Interactive games to stimulate cognitive function.
Daily Tasks: Voice-assisted task list with reminders.
Family Pictures: A digital album with voice descriptions of loved ones.
Soothing Sounds: Curated audio for relaxation.
For Caregivers
Caregiver Portal: Central hub to manage patient settings.
Live Location: Real-time GPS tracking of the patient.
Geofencing: Set safety zones and get alerts if the patient wanders.
Object Hunt Setup: Configure items for the patient's Scavenger Hunt game.
🛠️ Prerequisites
Before you begin, ensure you have the following installed:
Node.js (LTS version recommended)
Expo Go app on your physical device (iOS/Android) or an Emulator.
🚀 Installation & Setup
Follow these steps to run the project locally.
- Clone the Repository
git clone cd alzbuddy-new
- Install Standard Dependencies
Install the core packages listed in package.json.
npm install
- Install AI & Camera Dependencies (Crucial)
This project uses TensorFlow.js and Expo Camera. Due to specific version requirements and compatibility, please run the following commands to ensure all native modules are installed correctly.
Step A: Install Expo Native Modules Use the --npm flag to force npm usage if yarn is not configured.
npx expo install expo-camera expo-gl expo-gl-cpp expo-image-manipulator expo-file-system expo-notifications expo-task-manager --npm
Step B: Install TensorFlow & Utilities (with legacy peer deps) Note: We use --legacy-peer-deps to resolve version conflicts with React Native.
npm install @tensorflow/tfjs @tensorflow/tfjs-react-native @tensorflow-models/coco-ssd react-native-fs --legacy-peer-deps
- Configure Metro Bundler
Ensure you have a metro.config.js file in the root directory to allow TensorFlow to load model files (.bin).
metro.config.js
const { getDefaultConfig } = require('expo/metro-config');
const config = getDefaultConfig(__dirname);
// Essential for TensorFlow.js to load model binary files config.resolver.assetExts.push('bin');
module.exports = config;
🏃♂️ Running the App
Start the development server. We recommend using the --clear flag to ensure the bundler cache is clean.
npx expo start --clear
Scan the QR code with the Expo Go app on your Android or iOS device.
Troubleshooting: If you see a "black screen" on the camera, ensure you have granted camera permissions on your device settings.
🔧 Project Structure
src/pages: Main screens (MainMenu, RoleSelection, etc.).
src/caregiver: Caregiver-specific screens (LiveLocation, ObjectHuntSetup).
src/components/Games: Patient games (ObjectHuntGame, MemoryGame).
src/context: App-wide state management.
Dependency Conflicts: If you encounter ERESOLVE errors during installation, always append --legacy-peer-deps to your npm command.
Camera Issues: This app uses the modern CameraView from expo-camera. Ensure your Expo Go app is updated to the latest version.
AI Model Loading: The AI model downloads once on the first run. Ensure you have an active internet connection when opening the Scavenger Hunt game for the first time.