File size: 3,833 Bytes
771f178
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
const express = require('express');
const cors = require('cors');

const app = express();
const port = process.env.PORT || 9000;

app.use(cors());
app.use(express.json());

// Mock Database data for UI demonstration with specific details and unique 3D previews
const mockProperties = [
    {
        id: 1,
        title: "فيلا ذكية مطلة على البحيرة",
        price: "15,500,000 ج.م",
        location: "ماونتن فيو آي سيتي، التجمع الخامس",
        type: "فيلا مستقلة",
        image: "https://images.unsplash.com/photo-1613977257363-707ba9348227?w=1000",
        source: "Property Finder",
        url: "#",
        lat: 30.0167,
        lng: 31.4167,
        beds: 5,
        baths: 4,
        area: 450,
        threeDTourUrl: "https://my.matterport.com/show/?m=JkxrH6WUKQx" // Example real matterport link
    },
    {
        id: 2,
        title: "شقة فندقية تشطيب كامل",
        price: "6,200,000 ج.م",
        location: "زد ويست، الشيخ زايد",
        type: "شقة",
        image: "https://images.unsplash.com/photo-1522708323590-d24dbb6b0267?w=1000",
        source: "Aqarmap",
        url: "#",
        lat: 30.0444,
        lng: 30.9833,
        beds: 3,
        baths: 2,
        area: 180,
        threeDTourUrl: "https://my.matterport.com/show/?m=yKkE2g1iQyM"
    },
    {
        id: 3,
        title: "تاون هاوس بكومبوند مغلق",
        price: "9,800,000 ج.م",
        location: "سيليا، العاصمة الإدارية",
        type: "تاون هاوس",
        image: "https://images.unsplash.com/photo-1512917774080-9991f1c4c750?w=1000",
        source: "RealEstate.gov",
        url: "#",
        lat: 30.0000,
        lng: 31.7000,
        beds: 4,
        baths: 3,
        area: 280,
        threeDTourUrl: "https://my.matterport.com/show/?m=xWzT8yKj7x"
    },
    {
        id: 4,
        title: "بنتهاوس مع روف خاص",
        price: "11,000,000 ج.م",
        location: "بالم هيلز، أكتوبر",
        type: "بنتهاوس",
        image: "https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1000",
        source: "Property Finder",
        url: "#",
        lat: 29.9500,
        lng: 30.9333,
        beds: 4,
        baths: 4,
        area: 320,
        threeDTourUrl: "https://my.matterport.com/show/?m=2t9bE6B3s7m"
    },
    {
        id: 5,
        title: "شقة غرفتين بمقدم 5%",
        price: "3,500,000 ج.م",
        location: "تاج سيتي، القاهرة الجديدة",
        type: "شقة",
        image: "https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?w=1000",
        source: "Aqarmap",
        url: "#",
        lat: 30.0767,
        lng: 31.3967,
        beds: 2,
        baths: 1,
        area: 120,
        threeDTourUrl: "https://my.matterport.com/show/?m=u6GvJ7h8Lq"
    },
    {
        id: 6,
        title: "قصر فاخر تصميم كلاسيكي",
        price: "45,000,000 ج.م",
        location: "القطامية هايتس، التجمع الخامس",
        type: "قصر",
        image: "https://images.unsplash.com/photo-1600607687931-cebf5871f585?w=1000",
        source: "RealEstate.gov",
        url: "#",
        lat: 29.9867,
        lng: 31.4067,
        beds: 8,
        baths: 7,
        area: 1200,
        threeDTourUrl: "https://my.matterport.com/show/?m=9kR3m2Lp1q"
    }
];

app.get('/api/properties', (req, res) => {
    res.json({ success: true, data: mockProperties });
});

app.post('/api/scrape', (req, res) => {
    console.log("Scraping initiated...");
    res.json({ success: true, message: "Scraping job started in the background" });
});

app.listen(port, () => {
    console.log(`Aggregator API is running on http://localhost:${port}`);
});