Skip to content

ajmaluk/dementia-virtual-memory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

60 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

DVMA - Dementia Virtual Memory Assistant

DVMA Logo

Dementia Virtual Memory Assistant

A compassionate mobile app empowering dementia patients, caregivers, and admins

Flutter Firebase Gemini AI OneSignal

โœจ Features โ€ข ๐Ÿ“ธ Screenshots โ€ข ๐Ÿ—„ Database โ€ข ๐Ÿ”Œ API โ€ข ๐Ÿš€ Getting Started โ€ข ๐ŸŒ Demo


๐Ÿ“– About

DVMA (Dementia Virtual Memory Assistant) is an innovative mobile application crafted to support individuals with dementia in navigating daily life, cherishing memories, and fostering connections with loved ones and caregivers. With intuitive role-based access for Patients, Caretakers, and Admins, DVMA delivers real-time notifications, AI-driven chat support, and advanced face recognition to uplift the well-being of dementia patients and their support networks.

Content available animation


โœจ Features

Category Highlights
๐Ÿ‘ค Patient Features - ๐Ÿ“… Task Management: Create, edit, and track daily/recurring tasks with reminders
- ๐Ÿค– AI Chat Assistant: Gemini-powered prompts for memory and tasks
- ๐Ÿ“ธ Memory Album: Add photos and notes to relive moments
- ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Family Management: Add contacts and set emergency numbers
- ๐Ÿ“ Location Sharing: Secure sharing with caretakers
- ๐Ÿ“” Personal Diary: Private daily reflections with auto-save
- ๐Ÿ”” Smart Notifications: Alerts for tasks and connections
- ๐ŸŽญ Face Recognition: AI-based family identification
๐Ÿง‘โ€โš•๏ธ Caretaker Features - ๐Ÿ”— Connection Management: Handle patient requests and links
- ๐Ÿ‘ค Patient Monitoring: View tasks, location, and albums
- ๐Ÿ“ž Direct Communication: Calls and messages to patients
- ๐Ÿ“ธ Advanced Scanner: On-the-go family recognition
- ๐Ÿ“‹ Task Oversight: Remote supervision of tasks
- ๐Ÿ“Š Reporting System: Submit well-being or feedback reports
- ๐Ÿ“ Live Tracking: Real-time patient location
๐Ÿ‘จโ€๐Ÿ’ผ Admin Features - ๐Ÿ‘ฅ User Management: Edit, ban/unban users and caretakers
- ๐Ÿ”” Global Notifications: Broadcast or targeted alerts
- ๐Ÿ“ˆ Reports Dashboard: Review and resolve reports
- โš™๏ธ System Settings: Customize APIs and support
- ๐Ÿ‘ค Account Control: Manage admin permissions
- ๐Ÿ“Š Analytics: Track engagement and usage patterns

๐Ÿ“ธ Screenshots

Patient Interface
Home Page AI Chat Caretaker Connections
Profile
Caretaker Interface
Patient Dashboard Location Tracking Caretaker Profile
Admin Interface
Caretaker Management Notifications Settings

๐Ÿ—„ Database Schema

The Firestore structure uses normalized singular collection names for scalability and real-time sync.

๐Ÿ“Š Collections Overview

Collection Purpose Key Features
user Patient profiles and data Tasks, diary, family, location, notifications
caretaker Caretaker profiles Credentials, approvals, connections, notifications
admin Admin accounts System access control
connections Userโ€“caretaker links Status tracking, request/confirm actors, timestamps
reports User-submitted reports Issue tracking, moderation workflow
api System configuration URLs, support contacts

๐Ÿ‘ค User Collection

Purpose: Stores patient profiles and related data.

Example Document:

{
  "uid": "abc123def",
  "fullName": "John Doe",
  "username": "johndoe2025",
  "email": "john@example.com",
  "phoneNo": "+1234567890",
  "dob": "1950-05-15",
  "gender": "male",
  "bio": "Loves gardening and music",
  "locality": "Springfield",
  "city": "Los Angeles",
  "state": "California",
  "profileImageUrl": "https://example.com/profile.jpg",
  "isConnected": true,
  "currentConnectionId": "conn789",
  "emergencyContacts": [
    { "name": "Jane Doe", "relation": "Spouse", "number": "+1234567891" }
  ],
  "playerIds": ["oneSignalId123"],
  "isBanned": false
}

Subcollections:

  • to_dos: { "task": "Take medicine", "completed": false, "dueDate": "2025-11-02T10:00:00Z" }
  • recurring_tasks: { "task": "Morning walk", "dailyDueTime": {"hour": 8, "min": 0} }
  • family_members: { "name": "Mary Doe", "relation": "Daughter", "phone": "+1234567892", "imageUrl": "https://..." }
  • album: { "title": "Birthday 2025", "imageUrl": "https://example.com/photo.jpg" }
  • diary: (Doc ID = date) { "content": "Had a good day today...", "createdAt": "2025-11-02T20:00:00Z" }
  • notifications: { "type": "connection_request", "message": "New request", "isRead": false, "createdAt": "2025-11-02T10:00:00Z" }

๐Ÿง‘โ€โš•๏ธ Caretaker Collection

Purpose: Manages caretaker profiles and credentials.

Example Document:

{
  "uid": "xyz789abc",
  "fullName": "Sarah Smith",
  "username": "sarahsmith",
  "email": "sarah@example.com",
  "phoneNo": "+0987654321",
  "profileImageUrl": "https://example.com/caretaker.jpg",
  "caregiverType": "nurse",
  "relation": "",
  "experienceYears": 5,
  "experienceBio": "5 years of elderly care experience",
  "graduationOnNursing": "BSN from UCLA",
  "graduationCertificateUrl": "https://example.com/cert.pdf",
  "isApprove": true,
  "isConnected": true,
  "currentConnectionId": "conn789",
  "playerIds": ["oneSignalId456"],
  "isBanned": false
}

Subcollections:

  • notifications: { "type": "unbind_request", "message": "Patient wants to unbind", "isRead": false, "createdAt": "2025-11-02T12:00:00Z" }

๐Ÿ”— Connections Collection

Field Type Description Example
user_uid String Patient UID "abc123def"
caretaker_uid String Caretaker UID "xyz789abc"
status String Connection status "accepted"
timestamp Timestamp Request time "2025-11-02T10:00:00Z"
confirmedBy String Who confirmed "xyz789abc"
requestedBy String Who requested "abc123def"

๐Ÿ“Š Reports Collection

Field Type Description Example
sender_uid String Reporter UID "abc123def"
sender_role String Reporter role "user"
reported_uid String Reported UID "xyz789abc"
reported_role String Reported role "caretaker"
title String Report title "Inappropriate behavior during visit"
description String Report details "The caretaker was unresponsive..."
status String Review status "pending"
createdAt Timestamp Submission time "2025-11-02T14:00:00Z"

โš™๏ธ API Collection

Example Document:

{
  "geminiApiUrl": "https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent",
  "supportEmail": "support@dvma.app",
  "supportPhone": "+1-800-DVMA-HELP",
  "version": "1.0.0",
  "lastUpdated": "2025-11-02T00:00:00Z"
}

๐Ÿ”Œ API Documentation

DVMA uses Firebase for auth and data, Gemini for AI, and OneSignal for notifications. Endpoints are loaded dynamically from the api collection.

Authentication

  • Sign Up/Login: Firebase Auth (createUserWithEmailAndPassword / signInWithEmailAndPassword)
  • Role Assignment: Post-signup role selection and profile completion.

Core APIs (Firestore)

  • User Tasks: user/{uid}/to_dos (CRUD via SDK)
  • Connections: connections (add/update for requests/approvals)
  • Notifications: OneSignal push + subcollection storage
  • Face Recognition: Client-side ML Kit or Cloud Vision API

AI Integration

  • Chat Assistant: POST to Gemini with prompt: "As a compassionate assistant for dementia patients, respond to: {user_input}"

For details: Firebase Docs | Gemini API


๐Ÿš€ Getting Started

Prerequisites

  • Flutter SDK (v3.10+)
  • Firebase project
  • OneSignal account
  • Gemini API key

Installation

  1. Clone the Repo:

    git clone https://github.com/ajmal-uk/dementia-virtual-memory.git
    cd dementia-virtual-memory
  2. Install Dependencies:

    flutter pub get
  3. Configure Firebase:

    • Add google-services.json (Android) / GoogleService-Info.plist (iOS)
  4. Set Environment Vars:

    • Update lib/config/app_config.dart with API keys
  5. Run the App:

    flutter run

Development Tips

  • Patient Flow: Test tasks and AI in simulator
  • Caretaker: Use Firestore emulator for connections
  • Admin: Enable elevated privileges for bans/notifications

Contributions welcomeโ€”prioritize accessibility and privacy!


๐ŸŒ Demo

Download Demo

Download the APK for a hands-on experience. (Replace with actual link for production.)


Made with โค๏ธ for dementia care | ยฉ 2025 DVMA Team | Contact

About

DVMA is a mobile app that helps dementia patients by using AI-driven memory aids, facial recognition, and caregiver dashboards. It supports daily tasks, fosters emotional connections, and reduces caregiver stress. With features like AI chat and caregiver hiring, it aligns with 2025 health tech trends for personalized, scalable solutions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages