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
- [ ] Send `villasinuae-legal-compliance.docx` to UAE PropTech lawyer
- [ ] Obtain trade licence with real estate portal activity
- [ ] Register with DLD/RERA if required for portal operations
- [ ] Verify Trakheesi compliance for listing display
- [ ] Complete PDPL Data Protection Impact Assessment
- [ ] Set up cookie consent banner
- [ ] Verify all email templates include unsubscribe link
- [ ] Confirm broker agreements include cold-calling prohibition
- [ ] Set up DIFC-registered WILLS provision info (for inheritance content)
- [ ] Estimated legal setup: AED 47,000-110,000 Year 1