Skip to content

rragnarsd/resido

Repository files navigation

Resido — Rental Listings App

Where trust meets home.

Overview

Resido is a Flutter app for browsing rental properties with guest access and optional sign-in via Supabase Magic Link. Users can explore properties, view details with interactive Google Maps, favorite listings, and message about a property. State management uses Bloc/Cubit, routing uses GoRouter, and data is persisted in Supabase.

Features

  • Guest browsing: Access Home and Explore tabs without logging in. Messages and Profile tabs are guarded and require authentication.
  • Magic Link Authentication (Supabase):
    • Email-based sign-in with one-tap magic link.
    • Auto profile creation on first login in users table.
    • Sign out and account deletion flows.
  • Properties:
    • Fetch and display all properties from Supabase.
    • View latest properties section on Home.
    • Advanced Filtering System:
      • Filter by property type (All, Apartment, House, Condo, Townhouse, Studio, Cottage)
      • Filter by location (city-based filtering)
      • Combined filtering: Apply both property type and location filters simultaneously
      • Filter modal with intuitive UI for easy selection
      • Reset filters functionality with smart empty state handling
    • Property cards with image, price, address, and quick modal details.
    • Interactive Google Maps: Property details include location maps with markers
    • Graceful fallback when Google Maps API key is not configured
  • Favorites:
    • Mark/unmark properties as favorites; stored on the user profile (favorite_properties).
    • Load full favorite property details from Supabase.
  • Messages:
    • Auth-required messaging screen listing user messages joined with property data.
    • Send, update, and delete messages for a property.
    • Snackbars and loading states handled via Cubits.
  • Navigation/UI:
    • Bottom navigation with tabs: Home, Explore, Messages, Profile.
    • go_router with StatefulShellRoute and per-tab navigator keys.
    • Light theme with custom text theme and colors.

Architecture

Feature-First Architecture - Organized by features/screens. Each feature contains its own cubit, models, services, and widgets.

  • State Management: flutter_bloc Cubits
    • AuthCubit — Auth/session + profile + favorites sync
    • PropertyCubit — Properties list loading with advanced filtering (property type + location)
    • LatestPropertyCubit — Latest properties section
    • MessageCubit — Messages for current user
    • FavoriteCubit — Favorites management
  • Routing: go_router with StatefulShellRoute
    • Tabs: /home, /explore, /messages, /profile
    • Login route: /login with redirect logic for guest vs. logged-in
  • Services
    • AuthService — Magic link auth, profile CRUD
    • FavoritesService — Toggle favorites, fetch favorite properties
    • PropertyService — Fetch all/latest properties
    • MessageService — Send/update/delete and list messages joined with property
  • Data Models
    • PropertyModel — json_serializable, includes lat/lng for Google Maps
    • AuthModel (in auth module)
    • MessageModel (in messages module)
  • Google Maps Integration
    • Interactive maps in property details with location markers
    • Environment-based API key configuration (.env file)
    • Graceful fallback when API key is not provided
    • Platform-specific setup for iOS and Android

Google Maps Setup

The app includes interactive Google Maps in property details. See GOOGLE_MAPS_SETUP.md for detailed setup instructions.

Quick Setup:

  1. Get Google Maps API key from Google Cloud Console
  2. Add to .env file: GOOGLE_MAPS_API_KEY=your_key_here
  3. Run: flutter run

Without API Key: App shows a placeholder with setup instructions (no crashes).

Project Structure

lib/
├── screens/                  # Feature-first organization
│   ├── auth/                 # Authentication feature
│   │   ├── cubit/            # AuthCubit + AuthState
│   │   ├── model/            # AuthModel
│   │   ├── service/          # AuthService
│   │   └── login_screen.dart
│   ├── home/                 # Home feature
│   │   ├── cubit/            # PropertyCubit + LatestPropertyCubit
│   │   ├── widgets/          # Home-specific widgets
│   │   └── home_screen.dart
│   ├── explore/              # Property exploration feature
│   │   ├── details/          # Property details with Google Maps
│   │   ├── contact/          # Contact functionality
│   │   ├── visit/            # Visit scheduling
│   │   └── widgets/          # Explore-specific widgets (includes FilterModal)
│   ├── messages/             # Messaging feature
│   │   ├── cubit/            # MessageCubit
│   │   ├── model/            # MessageModel
│   │   ├── service/          # MessageService
│   │   └── widgets/
│   ├── profile/              # User profile feature
│   │   ├── cubit/            # FavoriteCubit
│   │   ├── service/          # FavoritesService
│   │   └── widgets/
│   └── shared/               # Shared components
│       ├── models/           # PropertyModel (shared)
│       ├── services/         # PropertyService (shared)
│       └── widgets/          # Reusable UI components
├── utils/                    # Utilities and configuration
├── config/                   # App configuration
└── main.dart                 # App entry point

Screenshots

Your paragraph text (2)