real-estate-ai-flutter-app
🤖 AI-gesteuertes Flutter-Immobilien-App mit Firebase AI und Gemini 2.5 Pro. Natürliche Sprachsuche nach Immobilien, erweiterte Filterung und Favoriten.
- Sterne
- 3
- Forks
- 4
- Letzter Push (UTC)
- 28.09.2025
- Projektstatus
- Aktiv
Original-README
Englischer Projektschnappschuss. Aktuelle Inhalte auf 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.
Kategorien
Verwendete Abhängigkeiten
Abhängigkeiten 33 Einträge
- 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_testEntwicklung
{"sdk":"flutter"} - flutter_lintsEntwicklung
^6.0.0 - build_runnerEntwicklung
^2.4.13 - json_serializableEntwicklung
^6.8.0 - hive_ce_generatorEntwicklung
^1.6.0 - injectable_generatorEntwicklung
^2.4.2 - analyzerEntwicklung
^7.7.1 - bloc_testEntwicklung
^10.0.0 - flutter_native_splashEntwicklung
^2.4.1 - flutter_launcher_iconsEntwicklung
^0.14.4
Wie wähle ich ein passendes Repository?
Nach Anwendungsfall filtern, Aktivität vergleichen und vor der Nutzung das Originalprojekt prüfen.
- Nach Name, Autor oder Beschreibung suchen und nach Thema eingrenzen.
- Sterne, Forks und letzte Pushes vergleichen. Sterne zeigen Interesse, garantieren aber keine Qualität.
- Vor der Nutzung README, Lizenz und Issues auf GitHub prüfen.
Quellen und Pflege
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗