Metaviz AI
PropTech / Real Estate SaaS / AI Platform

AI-Powered PropTech SaaS — Multi-Role Real-Estate Platform

A full-stack, AI-powered PropTech SaaS for the East African real-estate market. Serves five roles — agent, buyer, lawyer/valuer, caretaker, and tenant — from one Flutter codebase and one FastAPI backend. PostGIS geo-search, AI Butler co-pilot, 9-milestone deal room, offline-first messaging, EN/SW localization, and Stripe + M-Pesa payments.

Project Overview

Five roles. Three surfaces. One backend. From listing intake to deal-room close — with an AI Butler that speaks English and Swahili, and payments via Stripe and M-Pesa.

East African real-estate transactions are fragmented across WhatsApp threads, spreadsheet listings, PDF lease templates, and cash or mobile-money payments with no common platform connecting agents, buyers, lawyers, caretakers, and tenants. This platform replaces that entire stack with one AI-powered workspace built for the market.

Five roles share one Flutter codebase and one FastAPI backend with role-based routing, permissions, and dashboards. Buyers search 300+ live listings on a PostGIS + OpenSearch geo-map with 10 km radius filters and AI area summaries. Agents manage listings, enquiries, and the full 9-milestone deal room. Lawyers and valuers join deals as invited parties. Caretakers handle maintenance triage and inspection reports. Tenants manage leases and rent from their own dashboard.

The streaming OpenAI Butler co-pilot is present on every screen: it compares properties in markdown tables, suggests professionals as one-tap cards, drafts buyer questionnaires, and answers rent and maintenance questions in both English and Swahili. Offline-first messaging survives flaky 3G with outbox queuing and reconnect-drain deduplication. Payments run on Stripe for cards and Startbutton for M-Pesa and African mobile money.

The platform covers the full East African real-estate transaction lifecycle: agents list and manage properties, buyers discover and enquire through geo-search and AI recommendations, lawyers and valuers participate in a structured 9-milestone deal room, caretakers handle maintenance and inspections, and tenants manage leases and rent — all in one workspace.

Three client surfaces share a single event-driven FastAPI backend: a React + Vite web SPA for agents and admin, a cross-platform Flutter mobile app (iOS, Android, and Web) for all roles, and a streaming OpenAI Butler chat embedded across both. There is no API drift between surfaces because every client calls the same typed endpoints enforced by Pydantic v2 and PydanticAI structured outputs.

The platform is built specifically for emerging-market realities: offline-first messaging that survives flaky 3G, bilingual EN/SW with ~1,900 localized strings, mobile-money payments via M-Pesa through the Startbutton API alongside Stripe card billing, and Flutter builds optimized for low-spec Android devices. PostGIS + OpenSearch geo-indexing delivers sub-300ms map queries over 300+ listings, with the architecture ready for 10x volume without changes.

Relevant Keywords
AI PropTech SaaS
East African Real Estate Platform
Flutter Multi-Role App
OpenAI Butler Real Estate
PostGIS Geo Search
Multi-Party Deal Room
Offline-First Messaging
M-Pesa Stripe Payments
Swahili English Bilingual SaaS
FastAPI Multi-Tenant Backend
9-Milestone Transaction Workflow
Keycloak RBAC Real Estate
Challenges

East African Real Estate Runs on WhatsApp, Spreadsheets, and Cash — With No Unified Platform

high pain
  • No unified platform for the full transaction lifecycle — East African property transactions move across WhatsApp for communication, PDF or paper for listings, Excel spreadsheets for tracking, and separate MPESA or cash processes for payments. Agents, buyers, lawyers, caretakers, and tenants have no shared workspace, so every handoff between parties loses context and creates delays.
  • Property discovery is broken without geo-search — listings are shared as WhatsApp images, Facebook posts, or printed flyers with no structured search, no map view, and no way to filter by location radius, price, or property type. Buyers cannot compare properties side by side or get AI-powered area summaries to understand a neighbourhood before visiting.
  • Deals collapse without a structured multi-party workflow — a property transaction involves an agent, a buyer, a lawyer, a valuer, and sometimes a lender, coordinating over WhatsApp with no shared document vault, no milestone tracking, and no dispute mechanism. Deals fall through because no one knows what stage they are at or who needs to act next.
  • No AI assistant for a market with low digital literacy — first-time buyers and tenants in East Africa need guided help comparing properties, understanding lease terms, and knowing which professionals to engage. An AI Butler that speaks Swahili and presents results as one-tap cards rather than raw data lowers the barrier to using the platform significantly.
  • Connectivity is unreliable but messaging must work — East African markets have widely variable 3G and 4G coverage. A messaging platform that drops messages or shows errors when connectivity is intermittent is unusable. Agents in the field, caretakers on-site, and tenants in low-signal areas all need chat that works offline and syncs reliably when connectivity returns.
  • Tenant and caretaker operations have no digital home — lease management, rent tracking, maintenance requests, and property inspections are handled through paper, WhatsApp, and phone calls. Caretakers have no structured workflow for maintenance triage, no way to upload inspection photos, and no PDF inspection report generation. Tenants have no rent dashboard or maintenance tracking.
  • African payment methods are excluded from most SaaS tools — Stripe card billing works for the minority of East African users with international cards. The majority pay via M-Pesa and mobile money. Any platform that does not natively support Startbutton or equivalent M-Pesa API integration is inaccessible to the primary payment method of the market.
The Solution

How We Built One AI Workspace for the Full East African Property Transaction

We architected three client surfaces — React web SPA, Flutter mobile app, and OpenAI Butler chat — on one event-driven FastAPI backend, serving five roles from a single codebase with role-scoped JWT auth and RBAC middleware. Every decision was made for the East African market: offline-first messaging, bilingual EN/SW, M-Pesa payments, and low-spec Android builds.

1One Event-Driven Backend for Three Surfaces — a single FastAPI + PostgreSQL backend powers the React web SPA, Flutter mobile app, and OpenAI Butler chat with zero API drift. Every client calls the same typed Pydantic v2 endpoints. Feature changes deploy once and reach all three surfaces simultaneously, cutting feature development time by approximately 40%.
2PostGIS + OpenSearch Geo-Search with AI Area Summaries — buyers search 300+ live listings on a clustered Mapbox/Leaflet map with 10 km radius filters, price facets, and property-type filters. Sub-300ms geo queries powered by PostGIS spatial indexing and OpenSearch. The AI Butler generates area summaries for any searched neighbourhood on demand.
3Streaming AI Butler Co-Pilot on Every Screen — OpenAI GPT-4/GPT-4o co-pilot streams responses via WebSocket across web and mobile. It compares properties in markdown tables, surfaces lawyers and valuers as one-tap action cards, drafts buyer questionnaires, and answers rent and maintenance questions in both English and Swahili. PydanticAI validates all structured outputs.
49-Milestone Multi-Party Deal Room — every transaction spins up a realtime Socket.IO workspace with nine milestones, a shared document vault, a parties tab showing agent, buyer, lawyer, and valuer, and a dispute tracker. All parties see the same milestone state in real time across web and mobile via Socket.IO + Redis pub/sub.
5Offline-First Messaging for Flaky 3G — messages are assigned temp-UUIDs on send and stored in a per-mutation Bloc outbox on the device. On reconnect, the outbox drains in order with server-side idempotency key deduplication preventing double delivery. Optimistic UI shows messages immediately; delivered/failed status updates on sync.
6Tenant + Caretaker Operations Workspace — tenants have a lease dashboard, rent history, and maintenance request tracker. Caretakers receive FCM push notifications for new requests, triage them across four severity tiers, upload inspection photos to Cloudinary, and generate branded PDF inspection reports via ReportLab/WeasyPrint — all from one workspace.
7Bilingual EN/SW + M-Pesa & Stripe Payments — approximately 1,900 localized strings with compile-time i18n safety on Flutter (ARB files) and react-i18next on web. One-tap language switching with no restart. Subscription billing via Stripe for card payments and Startbutton API for M-Pesa and African mobile money, with per-role plan configuration.
Before

Listings shared as WhatsApp images and Facebook posts with no search or map. Deals tracked in Excel with milestones coordinated over WhatsApp and email. No AI assistant — buyers and tenants navigate the market without guidance. Messages lost when 3G drops — agents and caretakers in the field go dark. Maintenance requests via phone calls and WhatsApp with no triage or tracking. Payments by cash, bank transfer, or M-Pesa manually confirmed via SMS screenshot.

After

300+ listings on a geo-clustered map with radius filters, facets, and AI area summaries in sub-300ms. 9-milestone deal room with shared document vault, parties tab, and realtime Socket.IO sync. Streaming AI Butler in EN/SW on every screen — compares properties, suggests professionals, drafts documents. Offline-first outbox with temp-UUID messages, reconnect-drain dedup, and optimistic UI. 4-tier maintenance triage with FCM push, Cloudinary photo uploads, and PDF inspection reports. Stripe card billing and Startbutton M-Pesa/mobile-money with per-role subscription plans.

Ecosystem

The Platform Modules — Five Roles, Three Surfaces, One Backend

AI Butler Co-Pilot

Streaming OpenAI GPT-4o assistant present on every screen. Compares properties in markdown tables, suggests lawyers/valuers as one-tap action cards, drafts buyer questionnaires, and answers rent/maintenance questions in EN & SW. PydanticAI validates all structured card outputs.

OpenAI GPT-4oPydanticAIWebSocket streamingsherpa-ONNX speech-to-text

Listing Intake & Management

Agents create structured listings with photos (Cloudinary), location (PostGIS point), price, property type, and amenity tags. Listings are indexed into OpenSearch on creation for instant search availability. Bulk listing import via CSV for agency onboarding.

FastAPIPostgreSQL + PostGISOpenSearchCloudinaryCelery

Geo-Indexed Search

Buyers search 300+ live listings on a clustered Mapbox/Leaflet map with 10 km radius filters, price range sliders, property-type and amenity facets. Sub-300ms geo queries via PostGIS spatial index + OpenSearch. AI Butler generates neighbourhood summaries on demand.

PostgreSQL + PostGISOpenSearchMapbox GLFlutter mapsLeaflet

9-Milestone Deal Room

Every transaction spins up a realtime Socket.IO workspace with nine sequential milestones, a shared document vault (Cloudinary), a parties tab showing all actors, and a dispute tracker. Milestone state fans out to all parties via Redis pub/sub on every change.

Socket.IORedis pub/subCloudinaryPydanticAIFastAPIFlutter

Offline-First Messaging

Chat that survives flaky 3G: messages assigned temp-UUIDs on send, stored in a per-mutation Bloc outbox on-device. On reconnect, outbox drains in order with server-side idempotency-key deduplication. Optimistic UI shows messages immediately with delivered/failed status.

Socket.IOraw WebSocketRedis pub/subflutter_bloc outboxHive

Agent Dashboard & CRM

Agents manage listings, track enquiries, monitor deal-room milestones, and view commission pipeline from a single dashboard. Agencies invite team members under one workspace with role-scoped access. Lead-to-deal conversion funnel analytics built in.

React 18TanStack QueryFastAPIPostgreSQLRBAC JWT

Buyer Discovery & Shortlist

Buyers search, save, and compare properties from geo-map or list view. AI Butler surfaces comparison tables and suggests next steps. Enquiry flow sends structured intake form to the listing agent and triggers a deal-room invitation on acceptance.

FlutterOpenSearchPostGISFastAPIOpenAI GPT-4oFCM

Lawyer & Valuer Portal

Lawyers and valuers are invited to specific deals and join the deal room with a scoped view of documents, milestones, and chat. They upload reports, sign off milestones, and communicate via the deal-room channel. Professional directory searchable by the AI Butler.

FastAPIRBAC JWTSocket.IOCloudinaryFlutter

Tenant & Caretaker Ops

Tenants manage leases, view rent history, and submit maintenance requests with photo attachments. Caretakers receive FCM push for new requests, triage across four severity tiers, log work updates, and generate branded PDF inspection reports via ReportLab/WeasyPrint.

FlutterFastAPICloudinaryFCMReportLabWeasyPrintPostgreSQL

Payments & Subscriptions

Multi-currency Stripe checkout for card payments and Startbutton API for M-Pesa and African mobile money. Per-role subscription plans (Agent Pro, Agency, Tenant, Caretaker) managed via Stripe Subscriptions. Webhook auto-reconciliation updates plan status within seconds.

StripeStartbutton API (M-Pesa)FastAPI webhooksPostgreSQL

Multi-Tenant Auth & RBAC

Keycloak SSO with OAuth2, role-scoped JWTs, and RBAC middleware enforced at FastAPI route level. Agencies are tenants with workspace-scoped data isolation. Five role types with distinct permission sets and dashboard views from one shared Flutter codebase.

Keycloak SSOOAuth2JWTRBACFastAPI middlewareflutter_bloc

Bilingual EN/SW i18n

Approximately 1,900 localized strings across web and mobile with compile-time i18n safety on Flutter (ARB files + flutter_localizations) and react-i18next on the web SPA. One-tap language switching with no app restart. AI Butler responds in the active language.

flutter_localizationsARB filesreact-i18nextFastAPI i18n middleware
User Experience

Designed for every screen

Web

  • Agent listing management: create, edit, photo upload, geo-pin, and publish to OpenSearch from a single form
  • Agency workspace: invite team members, assign listings, and track deal pipelines across all agents
  • Geo-search admin map with bulk listing status management and OpenSearch re-index controls
  • Deal-room oversight: full 9-milestone view with document vault, dispute tracker, and party management
  • Analytics dashboard: listing views, enquiry conversion, deal-stage funnel, and revenue by subscription tier
  • Subscription and billing management: plan changes, Stripe invoice history, M-Pesa transaction log
  • Bilingual content management: all listing and notification copy manageable in EN and SW
Buyer Discovery Flow: Buyer opens map → sets 10 km radius filter → taps listing cluster → views property detail → asks Butler to compare with shortlist → Butler returns markdown comparison table → buyer submits enquiry → agent notified via FCM → deal room spins up on acceptanceDeal Room Flow: Deal room opened → all parties joined (agent, buyer, lawyer, valuer) → milestone 1 marked active → lawyer uploads title search to document vault → milestone 2 signed off → Socket.IO fans out to all parties → dispute raised on milestone 4 → dispute tracker logs resolution → milestone 9: deal closedCaretaker Maintenance Flow: Tenant submits maintenance request with photo → FCM push fires to caretaker → caretaker opens triage view → assigns severity tier (Critical / High / Medium / Low) → logs work in progress updates → uploads inspection photos to Cloudinary → generates branded PDF inspection report → tenant and landlord notified on completionOffline Messaging Flow: Agent enters low-signal area → types message → temp-UUID assigned → message shown in chat immediately (optimistic UI) → Bloc outbox stores mutation → connectivity restored → outbox drains in send order → server acknowledges with idempotency key → temp-UUID swapped for server ID → no duplicate delivery

Mobile

Platforms: iOS 15+ · Android 11+ · Web (Flutter Web + React SPA, all modern browsers)

  • Geo-search map with 10 km radius filter, clustered listings, and tap-to-detail view for buyers
  • AI Butler chat on every screen: compare properties, ask in Swahili, get one-tap lawyer suggestions
  • Offline-first messaging with Bloc outbox, temp-UUID optimistic UI, and reconnect-drain deduplication
  • Deal-room view with 9-milestone tracker, document vault, parties list, and realtime Socket.IO updates
  • Tenant rent dashboard: current lease details, payment history, and maintenance request tracker
  • Caretaker maintenance triage: FCM push notification, 4-tier severity picker, photo upload to Cloudinary
  • One-tap EN/SW language switch with no app restart, using ARB compile-time i18n
  • M-Pesa payment flow via Startbutton API integrated into the subscription and rent payment screens
  • Role-scoped dashboard on launch: agent, buyer, lawyer, caretaker, and tenant each see their own home
  • FCM push notifications for deal-room milestone updates, new messages, maintenance events, and payment confirmations
AI Assistant

Butler AI

An embedded, streaming co-pilot on the React web SPA and Flutter mobile app. Primary Model: OpenAI GPT-4 / GPT-4o via a PydanticAI routing layer. Speech Input: sherpa-ONNX on-device speech-to-text — no audio leaves the device. Streaming: WebSocket streaming for real-time response rendering on both surfaces. Structured Outputs: PydanticAI validates all card outputs (professionals, comparisons) before UI render. Languages: English (EN) and Swahili (SW) — responds in the user's active language.

Embedded widget
Compare multiple properties side by side in AI-generated markdown tables with pros/cons and recommended action
Surface lawyers, valuers, and professionals as structured one-tap action cards with direct contact options
Draft buyer questionnaires tailored to specific property types (residential, commercial, land)
Answer rent, lease, and maintenance questions in both English and Swahili
Generate AI neighbourhood summaries for any searched area on the geo-map
Guide first-time buyers through the 9-milestone deal workflow step by step
sherpa-ONNX on-device speech-to-text: voice input processed entirely on the device, no audio sent to servers
Streaming WebSocket responses for real-time co-pilot feel on both web and Flutter mobile
PydanticAI validates all structured card outputs (professional suggestions, property comparisons) before rendering
Context-aware: the Butler reads the current screen context (listing, deal room, lease) before responding
Example queries
Compare the three properties in my shortlist and tell me which is better value for a young family in Nairobi — jibu kwa Kiswahili
Who are the best property lawyers for a commercial transfer in Kampala? Show me as cards I can tap to contact
What documents do I need to provide at milestone 3 of the deal room for a freehold title transfer?
My tenant in Unit 4B says the water heater is broken — what severity tier should I assign and what is the standard repair timeline?
Draft a buyer questionnaire for a 3-bedroom apartment viewing in Dar es Salaam — focus on structural and utilities questions
Architecture

System design

Frontend
React 18 · Vite · TypeScript · TanStack Query · TailwindCSS · Mapbox GL · Flutter · Dart · flutter_bloc · Material 3 · Hive · flutter_localizations
Backend
FastAPI · Pydantic v2 · PydanticAI · async SQLAlchemy · Celery + Redis · REST + WebSocket
Infrastructure
Docker · GitHub Actions · Nginx · PostgreSQL + PostGIS · OpenSearch · Redis 7 · Cloudinary
Flutter Mobile App (iOS + Android + Web) — flutter_bloc + GetIt for state/DI; Hive for local key-value store; offline-first Bloc outbox with temp-UUID optimistic messaging; sherpa-ONNX on-device speech; FCM for push; flutter_map + Mapbox for geo; Keycloak + passkeys for auth; flutter_localizations + ARB for EN/SW; Material 3 with low-spec Android optimizations.React + Vite Web SPA — React 18 + TypeScript + TanStack Query; Tailwind CSS; Mapbox GL for geo-search map; react-i18next for EN/SW; dnd-kit for deal-room milestone reordering; Stripe Checkout; Socket.IO client for realtime deal-room and messaging.FastAPI Backend (Python) — Async FastAPI with uvicorn/gunicorn multi-worker; async SQLAlchemy + asyncpg; Alembic migrations; Pydantic v2 + PydanticAI; Celery + Redis for task queue; REST + WebSocket; Socket.IO server with Redis pub/sub for multi-instance broadcast.Geo & Search Layer — PostgreSQL + PostGIS for spatial indexing of listings; OpenSearch for full-text and faceted search; sub-300ms geo queries via PostGIS GIST index + OpenSearch geo_distance filter; Mapbox GL on web, flutter_map on mobile.AI Layer — OpenAI GPT-4/GPT-4o (chat + comparison + summaries) via PydanticAI routing; WebSocket streaming SSE to both clients; sherpa-ONNX on-device speech-to-text (Flutter); structured card output validation via PydanticAI before UI render.Realtime & Messaging — Socket.IO server on FastAPI + Redis pub/sub for multi-instance fan-out; raw WebSocket fallback; per-conversation channels for deal rooms and direct messages; server-side idempotency-key deduplication for offline outbox drain.Auth & Multi-Tenancy — Keycloak SSO with OAuth2 and role-scoped JWT; RBAC enforced at FastAPI middleware level; agency-scoped workspace isolation at database row level; five role types (agent, buyer, lawyer/valuer, caretaker, tenant) with distinct permission sets.Payments — Stripe Checkout + Subscriptions + webhooks for card billing; Startbutton API for M-Pesa and African mobile money; per-role subscription plans with Stripe webhook auto-reconciliation; PostgreSQL ledger for all payment and subscription events.Storage & CDN — Cloudinary for all listing photos, inspection images, and document uploads with signed URL access; FCM (Firebase Cloud Messaging) for push notifications across iOS, Android, and web; SendGrid for transactional emails.Infrastructure — Docker + GitHub Actions CI/CD; Nginx reverse proxy; PostgreSQL + PostGIS + pgvector; Redis 7 (Celery broker + Socket.IO pub/sub); Cloudinary CDN; horizontal Celery worker scaling with zero code changes.
Business Logic

The rules that run the product

Rules
  • All five roles (agent, buyer, lawyer/valuer, caretaker, tenant) share one Flutter codebase and one FastAPI backend; role-scoped JWT determines dashboard and data access at both API middleware and UI level
  • Listings must be geo-tagged with a PostGIS point on creation; without a location they cannot be indexed into OpenSearch or appear on the map search
  • A deal room is created only when an agent accepts a buyer enquiry; the room auto-populates with the listing agent, the buyer, and a default 9-milestone sequence
  • Milestone progression is sequential: a milestone cannot be marked complete until all required documents for that milestone are present in the document vault
  • Offline messages are assigned a temp-UUID on the device and stored in the Bloc outbox; the server accepts them only with an idempotency key to prevent duplicate delivery on reconnect-drain
  • Maintenance requests are auto-assigned a severity tier (Critical/High/Medium/Low) by the AI Butler based on description keywords; caretakers can override before accepting
  • Subscription plan gating is enforced at the FastAPI middleware level by reading the Stripe subscription status from the database — no client-side plan checks
  • All Cloudinary uploads use signed URLs with configurable expiry; no unsigned public access to listing photos, inspection images, or deal-room documents
Workflows
  • Listing Intake Workflow: Agent creates listing → photos uploaded to Cloudinary → location geo-tagged as PostGIS point → listing saved to PostgreSQL → Celery task indexes into OpenSearch → listing appears on buyer map within seconds
  • Buyer Enquiry to Deal Room Workflow: Buyer submits enquiry → structured intake form stored → agent receives FCM push → agent reviews and accepts → deal room created → 9 milestones initialized → lawyer and valuer invited → Socket.IO channel opened → all parties joined and notified
  • Maintenance Request Workflow: Tenant submits request with description and photo → AI Butler suggests severity tier → FCM push fires to caretaker → caretaker triages and accepts → work-in-progress updates logged → completion photos uploaded to Cloudinary → PDF inspection report generated by ReportLab → tenant and agent notified
  • Payment & Subscription Workflow: User selects plan → Stripe Checkout (card) or Startbutton (M-Pesa) payment initiated → payment webhook received by FastAPI → subscription record updated in PostgreSQL → role-scoped feature gates unlocked within seconds → confirmation email via SendGrid
Automations
  • Celery task auto-indexes new and updated listings into OpenSearch within seconds of save
  • FCM push notification fires on every deal-room milestone update, new message, maintenance event, and payment confirmation
  • AI Butler auto-generates a neighbourhood summary for any searched area the first time it is queried, cached in Redis for subsequent requests
  • Stripe and Startbutton webhook handlers auto-reconcile subscription status and payment records within seconds of payment event
  • Offline outbox drain fires automatically on Socket.IO reconnect, processing queued messages in send order with idempotency-key dedup
  • Celery Beat sends lease renewal reminders to tenants and agents at configurable intervals before lease expiry
Features

Everything inside

AI Butler Co-Pilot (EN/SW)

  • Streaming GPT-4o assistant on every screen via WebSocket — responds in the user's active language
  • Property comparison tables, professional suggestion cards, and buyer questionnaire drafts
  • sherpa-ONNX on-device speech-to-text: voice input processed on the device, no audio leaves the phone
  • Neighbourhood AI summaries for any searched area on the geo-map
  • PydanticAI validates all structured card outputs before UI render

Geo-Indexed Property Search

  • 300+ listings on a clustered Mapbox/Leaflet geo-map with 10 km radius filter
  • Sub-300ms geo queries via PostGIS GIST spatial index + OpenSearch geo_distance
  • Price range, property type, bedroom count, and amenity facets
  • AI-generated neighbourhood summaries on demand
  • Save-to-shortlist and side-by-side comparison from map or list view

Listing Intake & Agent CRM

  • Structured listing creation with Cloudinary photo upload, PostGIS geo-tag, and OpenSearch auto-index
  • Enquiry pipeline with lead-to-deal conversion tracking
  • Agency workspace with team invitation, listing assignment, and deal oversight
  • Bulk listing import via CSV for agency onboarding
  • Listing performance analytics: views, enquiry rate, and time-to-deal

9-Milestone Multi-Party Deal Room

  • Deal room spins up on agent acceptance of buyer enquiry with parties auto-populated
  • Nine sequential milestones with document-vault requirements gating progression
  • Shared document vault via Cloudinary with role-scoped access
  • Dispute tracker: raise, log, and resolve disputes inline in the deal room
  • Realtime milestone fan-out via Socket.IO + Redis pub/sub to all parties

Offline-First Messaging

  • Temp-UUID optimistic UI: messages shown instantly on send regardless of connectivity
  • Per-mutation Bloc outbox: unsent messages stored in Hive local store on device
  • Reconnect-drain: outbox processes in order on Socket.IO reconnect
  • Server-side idempotency-key deduplication prevents double delivery
  • Raw WebSocket fallback for environments where Socket.IO is blocked

Tenant Dashboard

  • Current lease details: property, landlord, start/end dates, monthly rent
  • Rent payment history with M-Pesa and Stripe transaction records
  • Maintenance request submission with photo attachment and status tracking
  • AI Butler answers lease and rent questions in EN/SW
  • FCM push notifications for payment reminders and maintenance updates

Caretaker Operations

  • FCM push on new maintenance request with property and tenant details
  • 4-tier severity triage: Critical / High / Medium / Low with AI-suggested initial tier
  • Work-in-progress logging with time stamps and photo uploads to Cloudinary
  • Branded PDF inspection report generation via ReportLab/WeasyPrint
  • Caretaker schedule view: all active and upcoming maintenance assignments

Lawyer & Valuer Portal

  • Invited to specific deals via deal-room parties tab with scoped JWT access
  • Document upload to deal-room vault: title deeds, valuation reports, legal opinions
  • Milestone sign-off: lawyers and valuers confirm completion of their milestone responsibilities
  • Searchable professional directory: buyers and agents can find lawyers/valuers via AI Butler
  • Deal-room chat participation with full offline-first messaging support

Bilingual EN/SW i18n

  • Approximately 1,900 localized strings across web (react-i18next) and mobile (ARB + flutter_localizations)
  • Compile-time i18n safety on Flutter: missing keys caught at build time, not runtime
  • One-tap language switching on mobile and web with no app restart required
  • AI Butler detects active language and responds in EN or SW accordingly
  • All notification copy (FCM, SendGrid) rendered in user's preferred language

Payments & Subscriptions

  • Stripe Checkout and Subscriptions for card billing with webhook auto-reconciliation
  • Startbutton API integration for M-Pesa and African mobile-money payments
  • Per-role subscription plans: Agent Pro, Agency, Tenant, Caretaker
  • Stripe Connect for agent commission payouts on completed deals
  • PostgreSQL ledger tracking all payment events, subscription changes, and refunds

Multi-Tenant RBAC & Auth

  • Keycloak SSO with OAuth2 and role-scoped JWT enforced at FastAPI middleware
  • Agency-scoped workspace isolation: team members see only their agency's data
  • Five role types with distinct permission sets and tailored dashboard views
  • Passkey (FIDO2/WebAuthn) and biometric login on Flutter mobile
  • Full audit logging on sensitive operations: deal-room actions, payment events, role changes
Tech Stack

Built on a modern stack

Frontend
Flutter · Dart · flutter_bloc · Material 3 · Hive (local store) · flutter_localizations + ARB (EN/SW) · flutter_map + Mapbox · FCM · sherpa-ONNX (on-device speech) · Keycloak + passkeys · flutter_secure_storage · Cloudinary SDKReact 18 · Vite · TypeScript · TanStack Query · TailwindCSS · Mapbox GL · react-i18next (EN/SW) · Socket.IO client · dnd-kit · Stripe CheckoutMaps & Geo: PostGIS GIST spatial index · OpenSearch geo_distance filter · Mapbox GL (web) · flutter_map + Leaflet (mobile)
Backend
FastAPI (Python) · Pydantic v2 · PydanticAI · async SQLAlchemy · asyncpg · Alembic · Celery + Redis · REST + WebSocket · Socket.IO server · uvicorn + gunicornAI & Speech: OpenAI GPT-4 / GPT-4o · PydanticAI (structured card outputs + routing) · sherpa-ONNX (on-device speech-to-text) · WebSocket streamingRealtime & Messaging: Socket.IO + Redis pub/sub (multi-instance fan-out) · raw WebSocket fallback · Bloc offline outbox · server-side idempotency-key deduplicationAuth & Multi-Tenancy: Keycloak SSO · OAuth2 · role-scoped JWT · RBAC middleware (FastAPI) · FIDO2/WebAuthn passkeys · Argon2 password hashing
Database
PostgreSQL + PostGIS (geo-indexed listings) · OpenSearch (full-text + faceted search) · Redis 7 (Celery broker + Socket.IO pub/sub) · Hive (Flutter local store)
DevOps
Docker · GitHub Actions CI/CD · Nginx reverse proxy · PostgreSQL + PostGIS · OpenSearch · Redis 7 · Cloudinary CDN · Linux production servers
Tools
Payments: Stripe Checkout + Subscriptions + Connect + webhooks · Startbutton API (M-Pesa + African mobile money) · PostgreSQL payment ledgerStorage & Comms: Cloudinary (listing photos, inspection images, deal documents — signed URLs) · FCM (push notifications) · SendGrid (transactional email)PDF Generation: ReportLab · WeasyPrint (branded inspection reports)
Results

Outcomes that move the business

Three Surfaces, Zero API Drift, ~40% Faster Features
🤖
AI Embedded Deep, Not Bolted On
🌍
Built for Emerging Markets, Not Retrofitted
📍
Sub-300ms Geo-Search at Scale
🤝
Multi-Party Deal Room Replaces WhatsApp + Spreadsheets
💬
Production Realtime Under Packet Loss
💳
African Payments as a First-Class Feature
  • Shipped five distinct roles (agent, buyer, lawyer/valuer, caretaker, tenant) from one Flutter codebase and one FastAPI backend with role-scoped JWT and RBAC — zero code duplication across roles
  • PostGIS + OpenSearch geo-search delivers sub-300ms map queries over 300+ listings and is architected for 10x volume without infrastructure changes
  • 9-milestone multi-party deal room with realtime Socket.IO sync replaces fragmented WhatsApp, email, and spreadsheet coordination for the full transaction lifecycle
  • Offline-first Bloc outbox with temp-UUID optimistic UI, reconnect-drain deduplication, and idempotency-key dedup — chat works reliably on flaky 3G across East Africa
  • Streaming OpenAI Butler in EN/SW with sherpa-ONNX on-device speech, PydanticAI structured card outputs, and context-aware screen reading
  • Bilingual EN/SW with ~1,900 localized strings and compile-time ARB i18n safety on Flutter — zero runtime i18n key errors
  • Startbutton M-Pesa + Stripe card billing as co-equal first-class payment methods with per-role subscription plans and webhook auto-reconciliation
  • Event-driven FastAPI core powering three surfaces — ~40% faster feature development, no API drift across React SPA, Flutter mobile, and AI chat

See it in action

My Role & Deliverables

Role: AI Full-Stack Engineer · React · Flutter · Python · FastAPI

Project Description: I built a full-stack AI PropTech SaaS for the East African real-estate market: React web SPAs, a cross-platform Flutter app (iOS/Android/Web), and a streaming OpenAI Butler chat — all on one event-driven FastAPI backend I architected to power every client without API drift. I shipped five roles (agent, buyer, lawyer/valuer, caretaker, tenant) from one codebase, covering the full transaction lifecycle: PostGIS geo-search over 300+ listings, a 9-milestone deal room, offline-first messaging for flaky 3G, EN/SW localization, and Stripe + M-Pesa payments.

Skills & Deliverables:

  • Full-Stack Development (FastAPI, React 18, Flutter — iOS/Android/Web)
  • AI App Development (OpenAI GPT-4o, PydanticAI structured outputs, WebSocket streaming)
  • Geo-Search Architecture (PostGIS, OpenSearch, Mapbox GL, sub-300ms queries)
  • Realtime Systems (Socket.IO, Redis pub/sub, offline-first Bloc outbox)
  • Multi-Role RBAC (Keycloak SSO, role-scoped JWT, five-role Flutter codebase)
  • Bilingual i18n (EN/SW, ~1,900 ARB strings, flutter_localizations, react-i18next)
  • African Payments (Stripe, Startbutton M-Pesa API, per-role subscription plans)
  • PDF Generation (ReportLab, WeasyPrint — branded inspection reports)
  • Multi-Party Deal Room (9-milestone workflow, document vault, dispute tracker)