This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
flutter pub get- Install dependenciesflutter run- Run the app (requires device/emulator)flutter build apk- Build Android APKflutter build ios- Build iOS appflutter clean- Clean build cacheflutter doctor- Check Flutter installation and dependencies
flutter test- Run widget tests (limited tests available in test/widget_test.dart)
The app implements a role-based authentication system with three distinct user types:
- Homeowner: Primary property owner with full device management
- Tenant: Property renter with limited device access
- Landlord: Property manager overseeing multiple properties
User roles are stored in Firestore and determine app navigation flow in main.dart:48-68.
- Authentication Service (
lib/Services/authentication.dart): Centralized auth state management with Firebase Auth integration and user profile data caching - DatabaseService (
lib/Services/DatabaseService.dart): Firestore operations for user data CRUD - FirebaseService (
lib/Services/FirebaseService.dart): Google Sign-In integration
Each user role has dedicated page hierarchies:
lib/Pages/HomePages/- Role-specific home screenslib/Pages/ProfilePages/- Role-specific profile managementlib/Pages/EditPages/- Role-specific edit formslib/Pages/NotificationPages/- Role-specific notifications
- Device Management: Centralized in
lib/model/Devices.dartwith Firestore persistence - Room Management:
lib/model/Room.dartfor spatial organization - IoT Integrations:
- Philips Hue lights (
lib/Pages/FunctionalityPages/PhilipsHueLight.dart) - Bluetooth connectivity (
flutter_bluetooth_serial) - TensorFlow Lite ML model for door prediction (
assets/models/door_lock_model.tflite)
- Philips Hue lights (
Custom theme implementation in lib/Pages/flutter_flow/HomeAppTheme.dart:
- Light/Dark mode support with SharedPreferences persistence
- Google Fonts integration (Poppins, Fira Sans)
- Role-based color schemes
.envfile required in project root for API keys- Environment loading in
main.dart:29-30with hardcoded path - Firebase configuration files required:
android/app/google-services.jsonios/Runner/GoogleService-Info.plist
- Named routes defined in
main.dart:69-84 - Role-based routing logic in StreamBuilder (
main.dart:48-68) - Authentication state drives initial route selection
Before running the app:
- Add
google-services.jsontoandroid/app/ - Add
GoogleService-Info.plisttoios/Runner/ - Ensure package names match Firebase console configuration
- Create
.envfile in project root with required API keys
- Firebase suite (Auth, Firestore, Storage)
- Google Maps and Places APIs
- TensorFlow Lite for ML inference
- Bluetooth serial communication
- Local notifications framework