📊 Dubai Real Estate Analytics Platform

Complete documentation for the Dubai Real Estate analytics and API platform.

📑 Table of Contents

🎯 Overview

A comprehensive platform for analyzing and accessing Dubai real estate market data via REST APIs. This system provides property transaction data and powerful APIs for developers and businesses.

API Playground: http://localhost:8080/playground
API Documentation: http://localhost:8080/documentation
API Base URL: http://localhost:3000/api/v1

Key Features

What You Can Do

🚀 Getting Started

1. Access the API Playground

Navigate to http://localhost:8080/playground in your web browser. No login required - the playground is publicly accessible.

💡 Quick Start: The playground provides an interactive interface to test all API endpoints. You can generate code examples in multiple languages and execute requests directly from your browser.

2. Load Sample Data

Before testing endpoints, you need to load data into the system:

  1. In the playground, expand "Data Management" in the left sidebar
  2. Click "Load Sample Data" (if available) or use the API endpoint directly
  3. Alternatively, use the data collection endpoint to load fresh property data

3. Test an API Endpoint

Try a quick property valuation:

  1. Click "Valuations" > "Quick Valuation" in the sidebar
  2. Fill in the parameters (area, property type, bedrooms, size)
  3. Click "Try It!" to execute the request
  4. View the response and copy the generated code

4. Integrate into Your Application

Use the generated code examples to integrate the API into your application. The playground supports Shell (cURL), JavaScript, Python, and PHP code generation.

📊 Data Collection

The platform includes a sophisticated data collection system that processes property transaction data.

Key Capabilities

How It Works

1. Initialize data collection system 2. For each location (173 locations): - Collect SALE transactions (table format) - Collect RENTAL transactions (card format) - Parse property details (price, size, bedrooms, etc.) - Check for duplicates in database - Save new transactions - Log operation results 3. Complete collection and display summary

Data Fields

Field Description Example
location Area name "Dubai Marina"
building_name Building/project name "Marina Heights Tower"
property_type Type of property "apartment", "villa", "townhouse"
bedrooms Number of bedrooms 0 (studio), 1, 2, 3, 4, 5+
size_sqft Size in square feet 1200
price Transaction price in AED 2500000
deal_type Sale or rental "sale", "rental"
transaction_date Date of transaction 2026-01-15
developer_name Property developer "Emaar Properties"

Performance

Typical Data Collection Run:
• Duration: 30-45 minutes for all locations
• Pages processed: ~300-400 pages
• Properties found: ~13,000-15,000
• New transactions saved: ~1,000-2,000
• Duplicates skipped: ~12,000
• Success rate: 95%+

🗄️ Data Structure

The system uses PostgreSQL with two main tables:

1. Transactions Table

CREATE TABLE transactions ( id SERIAL PRIMARY KEY, location VARCHAR(255), building_name VARCHAR(255), property_type VARCHAR(100), bedrooms INTEGER, size_sqft DECIMAL(10,2), price DECIMAL(15,2), deal_type VARCHAR(20), -- 'sale' or 'rental' transaction_date DATE, developer_name VARCHAR(255), created_at TIMESTAMP DEFAULT NOW() ); -- Indexes for performance CREATE INDEX idx_location ON transactions(location); CREATE INDEX idx_building ON transactions(building_name); CREATE INDEX idx_date ON transactions(transaction_date DESC); CREATE INDEX idx_price ON transactions(price); CREATE INDEX idx_deal_type ON transactions(deal_type);

2. Data Collection Log Table

CREATE TABLE data_collection_log ( id SERIAL PRIMARY KEY, collection_type VARCHAR(50) NOT NULL, location VARCHAR(255), mode VARCHAR(20), -- 'sale' or 'rental' page_number INTEGER, properties_found INTEGER DEFAULT 0, properties_saved INTEGER DEFAULT 0, duplicates_skipped INTEGER DEFAULT 0, errors TEXT, started_at TIMESTAMP DEFAULT NOW(), completed_at TIMESTAMP, duration_seconds INTEGER, status VARCHAR(20) DEFAULT 'running' ); CREATE INDEX idx_data_collection_log_status ON data_collection_log(status); CREATE INDEX idx_data_collection_log_started ON data_collection_log(started_at DESC);

Current Database Stats

Total Transactions: 1,315
Unique Locations: 173
Unique Buildings: 421
Date Range: Dec 20, 2025 - Jan 19, 2026
Price Range: AED 1 - AED 52,976,739
Average Price: AED 1,750,378
Property Types: apartment (869), villa (52)
Deal Types: sale (869), rental (446)

🎮 API Playground

The platform includes an interactive API playground inspired by Unipile's developer portal for testing endpoints.

Features

How to Use

  1. Navigate to http://localhost:8080/playground
  2. Browse endpoints in the left sidebar (organized by category)
  3. Click an endpoint to load it
  4. Fill in parameters in the center panel
  5. Choose your programming language (Shell, JavaScript, Python, PHP)
  6. Click "Try It!" to execute the request
  7. View the response below
  8. Click "Copy" to copy the code example
Note: The playground connects to the business API endpoints running on port 3000. Make sure the API server is running before testing endpoints.

⚙️ Technical Architecture

Technology Stack

Layer Technology Purpose
Backend Node.js + Express.js Web server and API endpoints
Database PostgreSQL 14 Transaction and log storage
Data Collection Playwright (Chromium) Browser automation for data processing
Charts (Standard) Chart.js 4.4.1 Bar, line, donut, radar charts
Charts (Advanced) D3.js v7 Bubble, treemap, heatmap, scatter, box plot, quadrant
Authentication express-session Session-based auth with cookies
Date Handling chartjs-adapter-date-fns Time-based chart axes

Project Structure

dxbinteractstudy/ ├── src/ │ ├── server.js # Main API server (port 3000) │ ├── apiV1.js # Business API endpoints │ ├── dataCollector.js # Data collection logic │ ├── database.js # PostgreSQL connection pool │ └── dataStore.js # In-memory data cache ├── webapp/ │ ├── server.js # Webapp server (port 8080) │ └── public/ │ ├── playground.html # API playground interface │ ├── playground.css # Shared styles │ ├── playground.js # Playground logic │ └── documentation.html # This documentation ├── dataCollector.js # Data collection CLI entry point ├── docs/ # Markdown documentation ├── .env # Environment variables └── package.json # Dependencies

Environment Variables

# PostgreSQL Connection PGUSER=your_username PGHOST=localhost PGDATABASE=real_estate_db PGPASSWORD=your_password PGPORT=5432 # Webapp Configuration WEBAPP_PORT=8080 API_PORT=3000 # Session Security (optional) API_KEY_SECRET=your_session_secret

Port Allocation

Performance Optimizations

Security Features

Dubai Real Estate Analytics API

Built with Node.js, Express, PostgreSQL, Chart.js, and D3.js

API Playground | API Documentation