Files
Project_Velocity/.Agent Context/Dubai Real Estate Tech Stack.md
2026-02-21 09:09:20 +05:30

7.9 KiB
Raw Blame History

Part 1: Software Requirements Specification (SRS)

1. Project Identity

  • Project Name: Velocity Suite (Internal Code: Project Mirage)
  • Client Target: Dubai Tier-1 Developers (Emaar, Damac, Sobha)
  • Mission: Eliminate "Time-to-Sale" through radical visualization and 24/7 responsiveness.

2. System Architecture

We will operate a Hybrid Cloud/Local infrastructure. The "Dream Weaver" requires massive GPU power (Cloud), while "The Oracle" runs on a secure, persistent state server.

  • Frontend (The Sales Tablet): Next.js (PWA) optimized for iPad Pro.
  • Orchestrator (The Oracle): OpenClaw Instance running on a VPS (Hetzner/AWS) connecting WhatsApp to Knowledge Base.
  • Visual Engine (The Dream Weaver): ComfyUI running in API Mode on a GPU Cluster (RunPod/Lambda Labs) with Flux + ControlNet.
  • Database: Supabase (PostgreSQL) for user auth/logs; Pinecone for Vector Embeddings.

3. Functional Requirements (FR)

Module A: "The Dream Weaver" (Virtual Staging)

  • FR-DW-01 (Live Capture): The iPad app must capture an image and immediately upload it to the inference server.
  • FR-DW-02 (Style Injection): Users must select a style preset (e.g., "Modern Islamic," "London Minimalist," "Neom Futurism") which maps to a specific LoRA/Prompt pair.
  • FR-DW-03 (Geometry Lock): The system must use ControlNet (Depth + Canny) to ensure the walls and windows do not move. Only furniture and textures change.
  • FR-DW-04 (Inpainting): The system must automatically mask "Empty Floor" and "Bare Walls" using Segment Anything Model (SAM) to prevent altering the view outside the window.

Module B: "The Oracle" (Sales Clone)

  • FR-OR-01 (Ingestion): OpenClaw must listen to incoming WhatsApp webhooks via the Business API.
  • FR-OR-02 (RAG Retrieval): Upon receiving a query (e.g., "ROI on Unit 404"), the agent must query the Vector DB containing the specific projects brochure, floor plan, and financial sheet.
  • FR-OR-03 (Lead Qualification): The agent must classify the user: "Whale" (High Intent) vs. "Tire Kicker" (Low Intent) based on keyword analysis (e.g., asks about "Payment Plan" vs. "Golden Visa").
  • FR-OR-04 (Handoff): If a "Whale" is detected, the system must trigger a PagerDuty/SMS alert to the human Sales Director.

Module C: "The Time Machine" (Construction Viewer)

  • FR-TM-01 (Splat Streaming): A web-based viewer (Three.js/Luma) that streams pre-processed 3D Gaussian Splats of the construction site.
  • FR-TM-02 (Time Slider): A UI slider to toggle between "Current Status" (Drone Scan) and "Future Completion" (Render).

---

Part 2: The 14-Day Sprint (Task List)

Team Structure:

  • You (Tech Lead): ComfyUI Workflows, AI Models.
  • Sayan (Full Stack): Frontend, OpenClaw setup, API Glue.
  • Abantika (User Proxy): Testing inputs, defining style presets.

Phase 1: The Foundation (Days 1-3)

  • Day 1: Infrastructure Setup
    • [ ] Deploy GPU Instance (RunPod - 1x H100 for speed).
    • [ ] Install ComfyUI + Flux + ControlNet + SAM Nodes.
    • [ ] Deploy OpenClaw on a standard VPS.
    • [ ] Set up Supabase Project (Auth + DB).
  • Day 2: The "Dream Weaver" Workflow
    • [ ] Build ComfyUI Workflow: Load Image -> ControlNet (Depth) -> Flux Inpaint -> Save Image.
    • [ ] Test "Empty Room" to "Furnished" pipeline manually.
    • [ ] Create 3 Presets: "Dubai Gold," "Minimalist," "Traditional."
  • Day 3: The "Oracle" Brain
    • [ ] Scrape a sample brochure (e.g., Emaar PDF).
    • [ ] Chunk text and embed into Pinecone.
    • [ ] Configure OpenClaw "Skill" to query Pinecone.

Phase 2: The Core Build (Days 4-9)

  • Day 4: Frontend - Dream Weaver
    • [ ] Next.js Camera Component (Access iPad Camera).
    • [ ] Preset Selector UI (Carousel of styles).
    • [ ] API Route /api/stage connecting Frontend to ComfyUI.
  • Day 5: Latency Optimization
    • [ ] Tune ComfyUI: Switch to Flux-Schnell (Turbo) for <4 second generation.
    • [ ] Implement "Optimistic Loading" (Show a blur hash while generating).
  • Day 6: The Oracle - WhatsApp Integration
    • [ ] Register Meta Developer App (WhatsApp Business API Test Number).
    • [ ] Connect OpenClaw Webhook to Meta.
    • [ ] Test basic conversation flow: "Hi" -> "Welcome to Verdant Spire."
  • Day 7: The Oracle - Logic
    • [ ] Implement "Intent Classifier" System Prompt in OpenClaw.
    • [ ] Critical: Add "Handoff" logic. If user asks "Can I meet?", trigger alert.
  • Day 8: The Time Machine (MVP)
    • [ ] Take a sample drone video (or stock footage).
    • [ ] Process via Luma AI API to get a .splat file.
    • [ ] Embed Splat Viewer in the Next.js app.
  • Day 9: Integration
    • [ ] Unified Dashboard: "The Velocity Suite" Landing Page.
    • [ ] Login Screen (Ahmed Archetype).

Phase 3: The Polish & "Wow" Factor (Days 10-14)

  • Day 10: Style Calibration (Abantika)
    • [ ] Test 50 room photos.
    • [ ] Adjust ControlNet weights (If walls are warping, increase strength).
    • [ ] Refine "Arabic Luxury" prompts.
  • Day 11: The "Report" Generation
    • [ ] When Dream Weaver finishes, auto-generate a PDF with the new image + Price Quote.
    • [ ] Button: "Email to Client."
  • Day 12: Stress Testing
    • [ ] Simulate 10 simultaneous users on the GPU.
    • [ ] Ensure WhatsApp bot handles rapid-fire questions.
  • Day 13: The Demo Deck
    • [ ] Record a seamless video of: Taking a photo -> iPad Generates -> Client smiles.
    • [ ] Record a video of: "Oracle" negotiating at 3 AM.
  • Day 14: Launch Ready
    • [ ] Deploy to Vercel (Frontend).
    • [ ] Final Security Check (Ensure API keys are not exposed).

---

Part 3: Project Structure

Plaintext

/velocity-suite-monorepo
├── /apps
│ ├── /web-dashboard # Next.js (The iPad App)
│ │ ├── /components
│ │ │ ├── CameraCapture.tsx
│ │ │ ├── StyleSelector.tsx
│ │ │ └── SplatViewer.tsx
│ │ ├── /pages
│ │ │ ├── dream-weaver.tsx
│ │ │ └── oracle-logs.tsx
│ │ └── /utils
│ │ └── comfyClient.ts # WebSocket handler for ComfyUI
│ │
│ └── /oracle-agent # OpenClaw Instance
│ ├── /skills # Custom Skills
│ │ ├── retrieval_skill.py # RAG Logic
│ │ └── crm_update.py # Pushes leads to Salesforce/Hubspot
│ ├── config.yaml # OpenClaw Config
│ └── system_prompt.md # The "Sales Persona" definition

├── /infrastructure
│ ├── /comfy-workflows # The JSON files
│ │ ├── flux_staging_turbo.json
│ │ └── upscale_detailer.json
│ └── /docker # Deployment containers

└── /data
├── /prompts # The "Style" Library (Modern, Arabic, Zen)
└── /brochures # Raw PDF text for the Oracle

Part 4: Technical Brief (The "Secret Sauce")

To make this truly "Unfair," we implement Latency Hiding:

  1. Dream Weaver: While the image is generating (4-6 seconds), the screen doesn't just spin. It displays "Analyzing Floorplan...", "Matching Textures...", "Importing Italian Marble...". This makes the wait feel like work being done.
  2. The Oracle: Use OpenClaw's "Thinking" mode. Configure it to be "High" thinking for complex queries (like ROI) so it double-checks math, but "Low" for greetings to be instant.
  3. ComfyUI: Use the IP-Adapter node. This allows you to take a photo of a specific expensive couch the developer wants to sell and "inject" it into the generated room. This turns the tool from "Pretty Pictures" to "Inventory Mover."