real-estate-ai-flutter-app
🤖 Firebase AI और Gemini 2.5 Pro के साथ AI-संचालित Flutter संपत्ति एप्लिकेशन। प्राकृतिक भाषा में संपत्ति खोज, उन्नत फ़िल्टरिंग, अभिरुचि।
- स्टार
- 3
- फ़ोर्क
- 4
- अंतिम पुश (UTC)
- 28 सित॰ 2025
- प्रोजेक्ट स्थिति
- सक्रिय
मूल README
यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
|
|
Nawy App - AI-Powered Real Estate Search
🤖 AI-powered real estate search app built with Flutter & Firebase AI. Features natural language property search using Gemini 2.5 Pro, advanced filtering, favorites, and responsive web deployment. Built with Clean Architecture, BLoC pattern, and comprehensive testing.
✨ Features
- 🤖 AI Property Assistant – Natural language property search powered by Firebase AI & Gemini 2.5 Pro:
- "Find me a 3-bedroom villa in New Cairo under 5M EGP"
- 🔧 Function Calling – AI can intelligently call property search functions with proper parameters
- 💬 Custom Chat UI – Beautiful chat interface with message bubbles, loading states, and auto-scrolling
- 🔍 Smart Search – Real-time text search across properties, areas, and compounds
- ⚡ Advanced Filtering – Filter by area, compound, price, bedrooms, and property type
- ❤️ Favorites – Save properties locally for offline access
- 📱 Modern UI – Clean, responsive design with iPhone frame simulation on web
- 🌐 Web Compatible – Full web deployment with responsive wrapper for desktop/mobile
📱 Screenshots
Property Search & Results |
Advanced Filtering Options |
AI-Powered Assistant |
🏗️ Architecture
Built with modern Flutter practices and feature-first folder structure:
- Feature-first approach: Each feature is isolated in its own module
- State Management: BLoC pattern with improved state management architecture
- Local Storage: Hive CE database for favorites only (properties and compounds)
- Networking: Dio for HTTP requests with interceptors
- Dependency Injection: get_it with injectable for code generation
- Logging: Professional logging framework with AppLogger service
Tech Stack
- Framework: Flutter with Dart
- State Management: flutter_bloc + bloc_test
- Local Database: Hive CE (for favorites only) - Web Compatible
- Networking: Dio with interceptors
- Serialization: json_annotation + build_runner
- Dependency Injection: get_it + injectable (code generation)
- Testing: mocktail + bloc_test for comprehensive testing
- Logging: logger package with production-safe implementation
🔄 Database Migration: ObjectBox → Hive CE
Migrated from ObjectBox to Hive CE for full web platform support, enabling Firebase AI integration deployment without requiring reviewers to set up their own Firebase projects.
Key Benefits:
- ✅ Full web compatibility via IndexedDB
- ✅ Cross-platform support (mobile/desktop/web)
- ✅ Seamless Firebase AI integration on web
📁 Project Structure
lib/
├── main.dart # Application entry point
├── app/
│ ├── core/ # Shared core functionality
│ │ ├── constants/ # App-wide constants
│ │ ├── utils/ # Utility functions & extensions
│ │ ├── widgets/ # Shared, reusable widgets
│ │ └── common/ # Shared types (e.g., Status<T>)
│ ├── features/ # Application features (modular)
│ │ ├── property_search/ # Property search feature
│ │ ├── favorites/ # Favorites management
│ │ ├── ai_assistant/ # AI assistant with Firebase AI
│ │ └── [feature]/ # Each feature module
│ │ ├── domain/ # Business logic (entities, repositories)
│ │ ├── data/ # Data layer (sources + models)
│ │ │ ├── remote/ # API sources and DTOs
│ │ │ └── local/ # Local sources and Hive entities
│ │ └── presentation/ # UI layer (bloc/pages/widgets)
│ └── widgets/ # Shared widgets
🚀 Quick Start
# Install dependencies
flutter pub get
# Generate code
dart run build_runner build --delete-conflicting-outputs
# Run the app
flutter run
🧪 Testing
Comprehensive test suite with 285 automated tests achieving 100% pass rate:
Test Architecture
- Unit Tests: Core utilities (DioClient, AppLogger, HiveService)
- DTO Tests: JSON serialization/deserialization for all models
- Integration Tests: API client integration with mocking
- Repository Tests: Domain layer business logic
- BLoC Tests: Business logic with bloc_test (17 tests)
- API Contract Tests: Live endpoint validation
Test Coverage Breakdown
- Core Utils: Error handling, DioClient, AppLogger, HiveService
- DTO Models: JSON serialization/deserialization for all models
- Remote Sources: API integration + text search functionality
- Domain Layer: Repository pattern and business logic
- BLoC Layer: State management with bloc_test
- AI Assistant: Firebase AI service and BLoC testing
- API Contract: Live endpoint validation
- Favorites: Local storage and repository testing
# Run all tests
flutter test
# Run specific test file
flutter test test/core/utils/dio_client_test.dart
# Run with coverage
flutter test --coverage
# Run tests with verbose output
flutter test --reporter=expanded
🤖 AI Assistant
Core Features
- 🧠 Natural Language Processing: Ask questions in plain English
- 🔧 Function Calling: AI intelligently calls property search functions
- 💬 Custom Chat UI: Beautiful message bubbles with loading states and auto-scrolling
- 🎯 Contextual Responses: AI understands property search context and provides relevant results
- ⚡ Real-time Interaction: Instant responses with proper error handling
Example Queries
Try these natural language searches with the AI assistant:
- Property Search: "Find me a 3-bedroom villa in New Cairo under 5 million EGP"
- Discover Areas: "What areas do you have available?" or "Show me all locations"
- Explore Compounds: "What compounds are available in Sheikh Zayed?"
🔍 Text Search Implementation
Comprehensive text search functionality allows users to find properties by typing search terms:
Search Capabilities
- Property Names: Search within property titles (e.g., "Luxury Apartment", "Modern Villa")
- Area Names: Search by location names (e.g., "El Sheikh Zayed", "New Cairo")
- Compound Names: Search by development names (e.g., "ZED West", "Bloomfields")
Search Features
- Case-Insensitive: "VILLA" and "villa" return identical results
- Partial Matching: "zayed" matches "El Sheikh Zayed"
- Real-time Filtering: Results update as you type with 500ms debounce
- Combined Search: Text search works alongside area, price, and bedroom filters
- Smart Query Handling: Empty/whitespace queries return all properties
⚠️ API Limitations Discovered
- Properties Search: Always returns the same 12 static properties regardless of any search filters
- No Server-Side Filtering: All query parameters (area_ids, compound_ids, price ranges, bedrooms, etc.) are completely ignored
- Static JSON Files: The API serves static JSON files instead of dynamic server responses
- No Pagination: No server-side pagination functionality is implemented
Workaround Implementation
To demonstrate proper search and filtering functionality that would work with a real API:
- Local Data Source: Created
properties.jsonwith 100+ realistic properties matching the exact API response structure - Client-Side Filtering: Implemented comprehensive search and filtering logic in
PropertyRemoteSource - Preserved Network Code: All original API integration code is preserved and commented out with detailed explanations
- Production Ready: The architecture is ready to switch back to network calls when a properly functioning API is available
Files Modified for Workaround
lib/app/features/property_search/data/sources/remote/property_remote_source.dart- Contains both commented network implementation and working local implementationproperties.json- 100+ properties in exact API format for demonstration- All original network integration code is preserved and can be easily restored
This approach demonstrates both proper API integration patterns and functional search/filtering capabilities that would work with a real backend API.
श्रेणियाँ
उपयोग की गई निर्भरताएँ
निर्भरता सूची 33 आइटम
- flutter
{"sdk":"flutter"} - cupertino_icons
^1.0.8 - flutter_bloc
^9.1.1 - dio
^5.7.0 - hive_ce
^2.12.0 - hive_ce_flutter
^2.0.1 - path_provider
^2.1.5 - path
^1.8.3 - json_annotation
^4.9.0 - equatable
^2.0.7 - injectable
^2.5.1 - get_it
^8.2.0 - logger
^2.4.0 - mocktail
^1.0.4 - rxdart
^0.28.0 - bloc
^9.0.0 - material_symbols_icons
^4.2785.1 - cached_network_image
^3.4.1 - firebase_core
^4.1.0 - firebase_ai
^3.2.0 - flutter_chat_ui
^2.9.0 - flutter_markdown
^0.7.7+1 - connectivity_plus
^7.0.0 - flutter_testडेवलपमेंट
{"sdk":"flutter"} - flutter_lintsडेवलपमेंट
^6.0.0 - build_runnerडेवलपमेंट
^2.4.13 - json_serializableडेवलपमेंट
^6.8.0 - hive_ce_generatorडेवलपमेंट
^1.6.0 - injectable_generatorडेवलपमेंट
^2.4.2 - analyzerडेवलपमेंट
^7.7.1 - bloc_testडेवलपमेंट
^10.0.0 - flutter_native_splashडेवलपमेंट
^2.4.1 - flutter_launcher_iconsडेवलपमेंट
^0.14.4
अपने प्रोजेक्ट के लिए रिपॉज़िटरी कैसे चुनें?
उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।
- नाम, लेखक या विवरण से खोजें और तकनीकी विषय से परिणाम सीमित करें।
- स्टार, फ़ोर्क और हाल के पुश की तुलना करें। स्टार रुचि दर्शाते हैं, गुणवत्ता की गारंटी नहीं।
- उपयोग से पहले GitHub पर README, लाइसेंस और Issues जाँचें।
स्रोत और रखरखाव
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗