A comprehensive ecosystem combining community support platform and IoT-enabled stress monitoring for children with Autism Spectrum Disorder (ASD)
- Overview
- System Architecture
- Features
- Tech Stack
- Getting Started
- Project Structure
- Configuration
- Usage
- Development
- Deployment
- Documentation
- Contributing
- Troubleshooting
- License
- Acknowledgments
CalmOrb is a dual-component autism support system developed as a Final Year Project at Universiti Malaya. It addresses critical gaps in autism support services in Malaysia through two integrated solutions:
A React Native application connecting families, caregivers, and autism intervention centers through:
- Discussion forums with AI-powered content moderation
- Event discovery and management system
- Center profiles and resource directory
- Location-based services with interactive maps
- Real-time community interaction
A Raspberry Pi-based monitoring ecosystem featuring:
- ESP32-powered interactive stress ball with pressure/motion sensors
- Real-time environmental monitoring (noise, temperature, humidity)
- AI-powered behavior detection using YOLOv8
- BLE connectivity for mobile app integration
- Visual and haptic feedback mechanisms
Together, these components provide holistic support for families navigating autism careโcombining peer support networks with intelligent emotional regulation tools.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CALMORB ECOSYSTEM โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Mobile App โโโโโโโบโ Firebase Backend โ โ
โ โ (React Native) โ โ - Firestore DB โ โ
โ โ - Community โ โ - Authentication โ โ
โ โ - Events โ โ - Cloud Storage โ โ
โ โ - Child Monitor โ โ - Real-time Sync โ โ
โ โโโโโโโโโโโโฌโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โ BLE Connection โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Raspberry Pi Hub โ โ
โ โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โ โ
โ โ โ BLE Server โ โ Camera + AI โ โ Environmental โ โ โ
โ โ โ โ โ (YOLOv8) โ โ Sensors โ โ โ
โ โ โโโโโโโฌโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โ โ
โ โ โ โ โ
โ โ โ WiFi AP (192.168.4.x) โ โ
โ โ โผ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ ESP32 Stress Ball โ โ โ
โ โ โ - Pressure Sensor (FSR402) โ โ โ
โ โ โ - Motion Sensor (MPU6050) โ โ โ
โ โ โ - Audio Feedback (DFPlayer Mini) โ โ โ
โ โ โ - OLED Display โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- 7 Category System: Questions, Experiences, Resources, Success Stories, Support, General
- AI Content Moderation: Real-time filtering using Google Gemini API
- Nested Replies: Threaded conversations with proper chronological ordering
- Rich Content: Image uploads, text formatting, and embedded media
- Bookmarks: Save important discussions for later reference
- Like & Engagement: Community interaction metrics
- Create & Manage Events: Full CRUD operations for autism centers
- Event Types: Support for both online (meeting links) and in-person (map-based) events
- Interactive Maps: Location picker with pinpoint accuracy and embedded previews
- Registration System: Capacity limits, registration links, and RSVP tracking
- Categorization: Workshops, Therapy Programs, Awareness Campaigns, Training, Support Groups
- Date/Time Management: Start and end date handling with timezone support
- Verified Accounts: Special authentication for autism intervention centers
- Location Display: Embedded maps with "Open in Google Maps" functionality
- Service Listings: Programs, therapies, and resources offered
- Contact Information: Phone, email, website, and operating hours
- Event History: View all events hosted by a center
- Role-Based Access: Different interfaces for parents/caregivers vs. centers
- Profile Management: Edit personal information, profile pictures, and preferences
- Activity Tracking: Post history, bookmarked discussions, registered events
- Child Profiles: Manage multiple child profiles with detailed information
- Interactive Map Picker: Drag-and-drop pinpoint selection
- Reverse Geocoding: Automatic address lookup from coordinates
- Map Previews: Embedded mini-maps in cards and detail views
- Navigation Integration: Direct links to Google Maps for directions
- Pressure Detection: FSR402 sensor for squeeze intensity tracking
- Motion Analysis: MPU6050 IMU for movement pattern recognition
- Distress Alerts: Real-time notifications to caregivers
- Feedback Mechanisms: Audio playback and OLED visual responses
- Battery Monitoring: Low battery alerts and status display
- YOLOv8 Integration: Custom-trained model for autism-specific behaviors
- Real-time Processing: Camera feed analysis with configurable intervals
- Behavior Categories: Aggression, self-harm, stimming, meltdown indicators
- Privacy Controls: Local processing, no cloud upload of video
- Noise Levels: I2S microphone (INMP441) with dB measurement
- Temperature & Humidity: DHT22 sensor readings
- Ambient Conditions: Track environmental factors affecting child comfort
- Historical Data: Timestamped logs for pattern analysis
- BLE Connectivity: Low-power Bluetooth communication
- Real-time Sync: Live data streaming to mobile app
- Remote Control: Adjust settings and thresholds from app
- Offline Mode: Local data logging when disconnected
| Category | Technology |
|---|---|
| Framework | React Native 0.74 |
| Runtime | Expo SDK 51 (managed workflow) |
| Language | TypeScript 5.3 |
| State Management | React Context API |
| Navigation | React Navigation 6 |
| Backend | Firebase (Firestore, Auth, Storage) |
| Maps | React Native Maps, Expo Location |
| AI Services | Google Gemini API (content moderation) |
| Image Processing | ImageKit, Expo Image Picker |
| Styling | NativeWind (Tailwind CSS) |
| Charts | react-native-gifted-charts |
| Icons | Expo Vector Icons, Custom SVGs |
| Component | Technology |
|---|---|
| Hub | Raspberry Pi 4/5 (4GB RAM) |
| OS | Raspberry Pi OS Bookworm (Debian 12) |
| Language | Python 3.9+ |
| Microcontroller | ESP32 DevKit |
| AI Framework | YOLOv8 (Ultralytics) |
| Computer Vision | OpenCV |
| Communication | BLE (Bleak library), WiFi AP, UDP |
| Display | ILI9341 2.8" TFT (SPI) |
| Sensors | FSR402, MPU6050, DHT22, INMP441 |
-
For Mobile App:
- Node.js 18.x or higher
- npm or yarn
- Android Studio (for Android development)
- Xcode (for iOS development, macOS only)
- Expo CLI
- Firebase account
-
For Hardware System:
- Raspberry Pi 4/5 with 4GB RAM
- MicroSD card (16GB+, Class 10)
- ESP32 DevKit board
- Required sensors and components (see Hardware Guide)
- Python 3.9+
git clone https://github.com/yourusername/Calm-Orb-Mobile-Apps.git
cd Calm-Orb-Mobile-Appsnpm install
# or
yarn installnpm install @react-native-firebase/app
# or
yarn add @react-native-firebase/appQuick Setup:
-
Create a Firebase project at Firebase Console
-
Download configuration files from Firebase Console:
google-services.json(Android)GoogleService-Info.plist(iOS)
-
Place files in project root (NOT in platform directories):
Calm-Orb-Mobile-Apps/google-services.jsonCalm-Orb-Mobile-Apps/GoogleService-Info.plist
โ ๏ธ Security Note: These files contain OAuth credentials and are protected by.gitignore. Never commit them to version control. Each developer must download their own from their Firebase project. -
Configure
.envfile (see step 8 below) with Firebase credentials
The firebaseConfig.js file is already configured to use environment variables from your .env file. No manual code changes needed.
- Open Android Studio
- Go to SDK Manager โ SDK Tools
- Install NDK (Side by side) version
25.2.9519653
npx expo prebuildFirst-time run (connects to physical device):
npx expo run:android --device
# or
npx expo run:ios --deviceSubsequent runs:
npm start
# Press 's' to switch to development build
# Press 'a' for Android or 'i' for iOS.env file contains sensitive API keys and is protected by .gitignore. Never commit it to version control.
Setup:
# Copy the template
cp .env.example .env
# Edit .env and fill in your actual valuesRequired variables (get these from Firebase Console and Google Cloud):
# Firebase Configuration
EXPO_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
EXPO_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
EXPO_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
EXPO_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.firebasestorage.app
EXPO_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
EXPO_PUBLIC_FIREBASE_APP_ID=your_app_id
EXPO_PUBLIC_FIREBASE_MEASUREMENT_ID=your_measurement_id
# Google Gemini API (Content Moderation)
GEMINI_API_KEY=your_gemini_api_key
# Google Maps API (Location Services)
GOOGLE_MAPS_API_KEY=your_google_maps_api_key
# Expo EAS Project ID (auto-generated)
EXPO_PUBLIC_EAS_PROJECT_ID=your_eas_project_idSee Firebase Setup Guide for detailed instructions on obtaining these values.
For detailed hardware setup instructions, see Hardware Setup Guide.
- Flash Raspberry Pi OS using Raspberry Pi Imager
- Connect hardware components (sensors, display, camera)
- Clone Python codebase to Raspberry Pi
- Install dependencies via
requirements.txt - Configure system (WiFi, BLE, sensors)
- Enable systemd service for auto-start
- Connect mobile app via BLE scanning
Full step-by-step guide with troubleshooting: docs/hardware-setup.md
Calm-Orb-Mobile-Apps/
โโโ src/
โ โโโ components/ # Reusable UI components
โ โ โโโ Button.tsx
โ โ โโโ DiscussionCard.tsx
โ โ โโโ MapPicker.tsx
โ โ โโโ ...
โ โโโ context/ # React Context providers
โ โ โโโ AuthContext.tsx
โ โ โโโ MonitoringContext.tsx
โ โโโ icons/ # Custom SVG icons
โ โโโ screens/ # App screens/pages
โ โ โโโ auth/ # Authentication screens
โ โ โโโ community/ # Community features
โ โ โ โโโ discussions/
โ โ โ โโโ events/
โ โ โ โโโ center-management/
โ โ โโโ monitoring/ # Child monitoring (BLE)
โ โ โโโ profile/
โ โโโ services/ # API and external services
โ โ โโโ api/
โ โ โ โโโ discussion.ts
โ โ โ โโโ events.ts
โ โ โ โโโ users.ts
โ โ โโโ notifications/
โ โโโ utils/ # Helper functions
โ โ โโโ colors.ts
โ โ โโโ timeformat.ts
โ โ โโโ interfaces.ts
โ โโโ navigation/ # Navigation configuration
โโโ assets/ # Images, fonts, static files
โโโ docs/ # Documentation
โ โโโ comments.md # Code commenting guide
โ โโโ icons.md # Icon usage reference
โ โโโ charts.md # Chart data standards
โ โโโ architecture.md # System architecture
โ โโโ api.md # API documentation
โ โโโ hardware-setup.md # Hardware installation guide
โ โโโ deployment.md # Deployment guide
โโโ android/ # Android native code
โโโ ios/ # iOS native code
โโโ firebaseConfig.ts # Firebase configuration
โโโ app.json # Expo configuration
โโโ package.json # Dependencies
โโโ tsconfig.json # TypeScript config
โโโ README.md # This file
Ensure proper Firestore security rules are configured:
// firestore.rules
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Users collection
match /users/{userId} {
allow read: if request.auth != null;
allow write: if request.auth.uid == userId;
}
// Discussions collection
match /discussions/{discussionId} {
allow read: if request.auth != null;
allow create: if request.auth != null;
allow update, delete: if request.auth.uid == resource.data.userId;
// Likes subcollection
match /likes/{likeId} {
allow read: if request.auth != null;
allow write: if request.auth != null;
}
}
// Events collection
match /events/{eventId} {
allow read: if request.auth != null;
allow create: if request.auth != null && request.auth.token.role == 'center';
allow update, delete: if request.auth.uid == resource.data.centerId;
}
// User bookmarks
match /userBookmarks/{bookmarkId} {
allow read, write: if request.auth != null;
}
}
}Edit app.json for Expo configuration:
{
"expo": {
"name": "CalmOrb",
"slug": "calmorb",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"plugins": [
"@react-native-firebase/app",
"expo-location",
"expo-image-picker"
]
}
}- Sign Up: Create account with email verification
- Complete Profile: Add child information and preferences
- Explore Community: Browse discussions, ask questions, share experiences
- Find Resources: Search for nearby autism centers and events
- Connect Hardware (optional): Pair Raspberry Pi hub via BLE for monitoring
- Monitor Child: Enable child profile to start stress ball monitoring
- Register as Center: Select center role during signup
- Complete Center Profile: Add location, services, contact details
- Create Events: Post workshops, therapy programs, and awareness campaigns
- Engage Community: Respond to questions and share resources
- Track Reach: Monitor event registrations and community engagement
See Development Guide for:
- Code style guide
- Component development
- State management patterns
- Testing procedures
- Git workflow
This project follows strict coding standards documented in:
- Code Commenting Guide: File, section, function-level commenting
- Icon Documentation: Icon usage and sources
- Chart Standards: Data structure conventions
# Unit tests
npm test
# E2E tests (if configured)
npm run test:e2e# Enable Expo dev tools
npm start
# Debug Android
npm run android:debug
# Debug iOS
npm run ios:debug# ESLint
npm run lint
# Prettier
npm run format- Generate Release APK:
eas build --platform android --profile production-
Sign APK using your keystore
-
Upload to Play Console
See Deployment Guide for detailed instructions.
- Generate Release IPA:
eas build --platform ios --profile production-
Upload via App Store Connect
-
Submit for review
The Raspberry Pi system is designed for continuous operation:
- Enable systemd service (auto-starts on boot)
- Configure WiFi for home/school network
- Set static IP (optional, for easier access)
- Enable SSH for remote management
- Setup backup cron jobs for data preservation
Comprehensive documentation available in /docs:
| Document | Description |
|---|---|
| Architecture | System design and component interactions |
| API Reference | Firebase Firestore collections and functions |
| Hardware Setup | Complete IoT system installation guide |
| Code Comments | Commenting standards and examples |
| Icons Guide | Icon library reference |
| Chart Standards | Data visualization conventions |
| Deployment | Production deployment procedures |
| Development | Developer onboarding and workflows |
We welcome contributions from the community! Please follow these steps:
- Fork the repository
- Create feature branch:
git checkout -b feature/YourFeature - Follow code style: Review
/docs/comments.mdand existing patterns - Write tests: Add unit tests for new features
- Commit changes: Use clear, descriptive commit messages
- Push to branch:
git push origin feature/YourFeature - Open Pull Request: Describe changes and reference issues
- Follow existing file structure and naming conventions
- Document all new functions and components
- Maintain backward compatibility when possible
- Update relevant documentation in
/docs - Test on both Android and iOS before submitting
Solution: Verify firebaseConfig.ts credentials and Firebase console settings
Solution: Ensure Google Maps API key is configured in app.json
Solution: Check Bluetooth permissions and Raspberry Pi service status
sudo systemctl status distress.service
Solution: Clear cache and rebuild
npm start -- --reset-cache
npx expo prebuild --clean
- Technical Issues: Open an issue on GitHub
- Hardware Problems: See Hardware Troubleshooting
- General Questions: Contact project maintainers
This project is licensed under the MIT License - see the LICENSE file for details.
This project was developed as a Final Year Project at Universiti Malaya, Faculty of Computer Science and Information Technology.
- Dr. Nazean Binti Jomhari - Project Supervisor, FSKTM, Universiti Malaya
- Academic guidance, technical direction, and research methodology
- Mr. Xing Yiming - PhD Candidate, Faculty of Built Environment, Universiti Malaya
- Requirements gathering, design validation, autism intervention expertise
- Associate Professor Dr. Norhanim Binti Zakaria - Faculty of Built Environment, Universiti Malaya
- Strategic guidance on therapeutic applications
- Parents and caregivers of children with ASD
- Special education teachers
- Autism center administrators
- User testing participants
- Firebase by Google (backend infrastructure)
- Google Gemini API (AI content moderation)
- Expo (React Native framework)
- ImageKit (media management)
- React Native Maps (location services)
- Ultralytics YOLOv8 (AI behavior detection)
This project is dedicated to families navigating autism care in Malaysia and worldwide. Your resilience and love inspire meaningful technology.
Project Maintainer: Abdul Azim Institution: Universiti Malaya Email: aabdulazim758@gmail.com GitHub: @ImAzimm
Built with โค๏ธ for the autism community in Malaysia
CalmOrb ยฉ 2025 | Final Year Project | Universiti Malaya