Buscar pacotes, repositórios e categorias de apps

Repositório GitHubISL270/real-estate-ai-flutter-app

real-estate-ai-flutter-app

🤖 Aplicativo imobiliário Flutter com IA e Firebase AI & Gemini 2.5 Pro. Pesquisa de propriedades por linguagem natural, filtros avançados e favoritos.

Capa do projeto real-estate-ai-flutter-app
Estrelas
3
Forks
4
Último push (UTC)
28 de set. de 2025
Status do projeto
Ativo

README original

Texto original em inglês. Visite o GitHub para a versão atual.

Nawy Logo
Firebase AI Gemini 2.5 Pro Tool Calling Flutter Chat UI

Flutter Dart BLoC Hive CE Dio

Tests Coverage Clean Architecture

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.

🚀 Try the app live →


✨ 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
Property Search & Results
Advanced Filters
Advanced Filtering Options
AI Assistant
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.json with 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 implementation
  • properties.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.

Eslam Ashraf GitHub avatar
Autor no GitHub

Eslam Ashraf ↗

Building Full Stack AI-powered Solutions using LangChain & LangGraph with over 3 years of experience delivering Multi-Platform apps using Flutter & Firebase

Cairo, Egypt
LinguagensDartHTMLRubySwiftKotlinObjective-C

Categorias

Dependências usadas

Lista de dependências 33 itens

Como escolher um repositório para seu projeto?

Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.

  1. Busque por nome, autor ou descrição e filtre por tema.
  2. Compare estrelas, forks e envios recentes. Estrelas indicam interesse, mas não garantem qualidade.
  3. Confira o README, a licença e as issues no GitHub antes de usar o projeto.

Fontes e manutenção

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗