Khurram Badar / Archive / Papers / VillasInUAE.com — Complete Platform Architecture & Setup Guide

VillasInUAE.com — Complete Platform Architecture & Setup Guide

briefing · 2026-04-13 · 1432 words · Khurram Badar

Platform Overview File Manifest (30 files across the full build) Database Layer Frontend.

ai · business · energy · real estate · technology · uae

VillasInUAE.com — Complete Platform Architecture & Setup Guide

Platform Overview

VillasInUAE is an autonomous AI-powered real estate platform for the UAE villa market. It aggregates listings from Bayut, PropertyFinder, and Dubizzle, allows brokers and developers to list directly, and generates leads through an AI chatbot (SIRAJ), smart alerts, and multi-channel marketing — all self-running with zero daily intervention.

---

File Manifest (30 files across the full build)

Database Layer

Run order: `schema.sql` → `schema-autonomous.sql` → `schema-broker-developer.sql`

Frontend

SIRAJ AI System

Backend Services

Configuration & Documentation

---

Architecture Diagram

```
┌─────────────────────────────────────────────────────────────┐
│ VERCEL (Next.js) │
│ ┌─────────┐ ┌──────────┐ ┌────────────┐ ┌──────────────┐ │
│ │ Frontend │ │ API │ │ Cron Jobs │ │ SIRAJ Chat │ │
│ │ Pages │ │ Routes │ │ (18 jobs) │ │ /api/siraj │ │
│ └────┬─────┘ └────┬─────┘ └─────┬──────┘ └──────┬───────┘ │
│ │ │ │ │ │
│ ┌────┴────────────┴─────────────┴───────────────┴───────┐ │
│ │ SUPABASE (Postgres + Auth + RLS) │ │
│ │ users · listings · brokers · developers · projects │ │
│ │ direct_listings · offplan_units · payment_plans │ │
│ │ moderation_queue · listing_leads · cron_runs │ │
│ └────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘

External Services:
Anthropic API ──→ SIRAJ chatbot + moderation engine (Haiku)
Apify ──→ Scrape Bayut + PropertyFinder + Dubizzle (every 12h)
Resend ──→ Email sequences + smart alerts + notifications
Meta Graph API ──→ Facebook + Instagram auto-posting
WhatsApp Business API ──→ Broadcasts + SIRAJ bot + alerts
Telethon ──→ Telegram channel monitoring (200+ channels)
Google OAuth ──→ Sign in with Google (Supabase Auth)
```

---

Setup — From Zero to Live

Step 1: Supabase (15 min)

Step 2: Anthropic API (5 min)

Step 3: Apify Scrapers (20 min)

Step 4: Resend Email (10 min)

Step 5: WhatsApp Business API (30 min)

Step 6: Meta Social (15 min)

Step 7: Telegram Monitor (10 min)

Step 8: Owner Config (2 min)

Step 9: Deploy to Vercel (10 min)

Step 10: Post-Deploy Verification

---

Autonomous Flow: What Happens Without You

| Time | What Runs | What Happens |
|------|-----------|-------------|
| Every 2 min | Smart alerts | New matches sent to subscribers |
| Every 5 min | Email queue | Pending emails dispatched |
| Every 5 min | Moderation | SIRAJ reviews pending listings/profiles |
| Every 10 min | Health check | All 15 subsystems checked, self-heal if needed |
| Every 6 hrs | Listing expiry | 30-day old listings expired, brokers notified |
| 6am + 6pm | Scrapers | Bayut + PF + Dubizzle refreshed |
| 7am, 12pm, 6pm | Social posts | Broker listings posted to FB + IG |
| 9am daily | Owner report | Your WhatsApp gets full daily summary |
| 10am daily | Broker outreach | Unclaimed Telegram listings → WhatsApp invites |
| 11am daily | Re-engagement | Inactive users get win-back emails |
| Midnight | Stats rollup | Broker + developer performance calculated |
| Sunday 9am | Weekly report | All subscribers get market digest |
| Monday 8am | Owner weekly | Growth trends + business metrics |
| 1st of month | Monthly report | Full business intelligence |
| 1st of month | Construction | Developers reminded to post updates |

---

Revenue Model

| Stream | How | Price |
|--------|-----|-------|
| Broker subscriptions | Starter / Pro / Enterprise tiers | AED 500-3,000/month |
| Developer listings | Basic / Premium / Enterprise | AED 1,000-5,000/month |
| Featured listings | Homepage + search priority | AED 500-2,000/listing |
| Lead packages | Qualified buyer leads | AED 50-200/lead |
| Valuation reports | AI-generated market analysis | AED 100-500/report |

---

Estimated Costs (Monthly)

| Service | Cost |
|---------|------|
| Vercel Pro | $20 |
| Supabase Pro | $25 |
| Anthropic (Haiku) | $8-15 |
| Apify (scraping) | $30-50 |
| Resend (email) | $0-20 |
| WhatsApp Business | $0-30 |
| Telegram hosting | $5-10 |
| Domain + DNS | $2 |
| **Total** | **$90-172/month** |

Break-even: 1 Pro broker subscription (AED 1,500) covers the entire infrastructure.

---

Legal Checklist Before Launch

← LightMountain Advisory — AI Deal Intelligence ToolKeturah Ardh Plot Purchases — Position Memo →
Two years of working thought, indexed.
Ask me to present it in your conference room — WhatsApp +971 55 623 9111
Book Session →