This repository contains the backend code for the LUMI Alzheimer's and Elderly Care App 🧓👵. The backend powers all the core features such as reminders, face recognition, object detection, location tracking, real-time chat, and AI chatbot support. It is built using Flask and integrates with MongoDB, WebSocket, and AI models for intelligent support.
- 📌 Create, update, retrieve, and delete reminders.
⚠️ Tag reminders as urgent or important.- 🔔 Notifications triggered for scheduled reminders.
- 👤 Identifies familiar faces using the
face_recognition
Python library. - 📥 Accepts image input and returns recognition results.
- 🤖 Detects common household or personal objects using YOLO.
- 🏷️ Returns labels for detected objects from uploaded images.
- 📍 Tracks and stores users’ live location updates.
- 🧭 Allows caregivers to monitor patient movements and receive alerts.
- 🧑🤝🧑 Enables communication between caregivers and patients.
- 🔐 Secured using unique userID-based authentication and rooms.
- 📨 Integrated with Expo push notifications for urgent messages.
- 🧠 Provides a built-in assistant to help elderly users perform tasks or answer questions.
- 🗣️ Accessible via the chat interface to enhance user experience.
- 🔙 Flask — REST API and Socket.IO support
- 🧠 face_recognition — Face detection and recognition
- 🕵️ YOLO — Object detection
- 📦 MongoDB — NoSQL database
- 🌐 Flask-SocketIO — Real-time bi-directional chat
- ✨ Gemini / Custom AI model — For chatbot capabilities
- 🔐 Expo Push Notifications — For caregiver alerts and reminders
- 🐍 Python 3.x
- 📦 Flask & Flask-SocketIO
- 🗄️ MongoDB
- 📷 YOLO model setup
- 💬 Expo push notification token setup
git clone https://github.com/RaY8118/LUMI-Backend.git
cd LUMI-Backend
python -m venv venv
source venv/bin/activate # For Windows: venv\Scripts\activate
pip install -r requirements.txt
- Create a
.env
file for database credentials, secret keys, and token configs. - Set up YOLO model weights and config as per their documentation.
python run.py
GET /reminders
POST /reminders
PUT /reminders/:id
DELETE /reminders/:id
POST /detect_faces
POST /detect_object
POST /location
- WebSocket Endpoint:
/chatroom
- Custom events for joining rooms, sending messages, and disconnecting
POST /assistant
: Send a message to the AI assistant and receive a response
- Download weights (e.g.
yolov10b.pt
) and config files. - Store them in a
/model
folder and load them via your object detection service.
-
/app
: Contains the core logic for features like reminders, location tracking, chat, and more. This includes the implementation of Flask Blueprints for modular API handling. -
/config
: Holds the configuration settings for the application, including environment-specific variables and app settings. -
/uploads
: Stores user-uploaded files, such as profile images or other media for the app.
- Fork the project
- Create a feature branch (
git checkout -b feature/YourFeature
) - Commit your changes (
git commit -m 'Add feature'
) - Push to GitHub (
git push origin feature/YourFeature
) - Open a Pull Request
This project is licensed under the Apache License 2.0. See the LICENSE file for full details.