Skip to content

lakshyagrg23/CribConcierge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ  CribConcierge

CribConcierge is an advanced AI-powered real estate platform that revolutionizes property exploration through immersive virtual reality tours, intelligent chat assistance, and seamless property management. Built with modern web technologies, it provides an unparalleled property browsing experience.

โœจ Features

๐Ÿ˜ Real Estate Property Management

  • Comprehensive Property Listings: Detailed property information with pricing, amenities, and descriptions
  • Advanced Image Storage: MongoDB GridFS integration for efficient image handling and retrieval
  • Property Search & Filtering: Advanced filtering capabilities for property discovery
  • Property Dashboard: Clean, responsive interface for managing and viewing properties

๐Ÿ•ถ Immersive VR Tours

  • 360ยฐ Virtual Reality Tours: Built with A-Frame for immersive property exploration
  • Room-by-Room Navigation: Seamless transitions between Kitchen, Bedroom, Bathroom, and Living Room
  • Interactive Controls: Click-based and keyboard navigation with smooth transitions
  • Real Photo Integration: Supports both regular photos and 360ยฐ panoramic images
  • Accessible URLs: Direct access via /tour/:propertyId for easy sharing

๐Ÿค– AI-Powered Chat Assistant

  • RAG (Retrieval-Augmented Generation): Powered by LangChain with FAISS vector store
  • Google Gemini 2.0 Flash: Advanced natural language understanding and generation
  • Context-Aware Responses: Conversational memory for intelligent follow-up questions
  • Interactive Property Cards: AI responses include interactive property recommendations
  • Smart System Prompts: Specialized for real estate domain expertise

๐ŸŽค Voice Assistant Integration

  • Speech Recognition: Browser-based voice commands for hands-free navigation
  • VR Tour Voice Control: Navigate rooms using natural language ("go to kitchen", "describe this room")
  • Text-to-Speech: Voice responses for enhanced accessibility
  • Command Suggestions: Built-in help system with voice command examples

๐Ÿ— Technical Architecture

Frontend Stack

Framework:      React 18 + TypeScript + Vite
UI Library:     Radix UI + Tailwind CSS + shadcn/ui
VR Engine:      A-Frame for 360ยฐ immersive tours
State Mgmt:     React Query (TanStack Query) + React Hooks
Routing:        React Router v6
Voice:          Web Speech API + SpeechSynthesis
Icons:          Lucide React

Backend Stack

Framework:      Flask (Python 3.8+)
Database:       MongoDB + GridFS (image storage)
AI/ML Stack:
  - LangChain (RAG pipeline)
  - Google Gemini 2.0 Flash (LLM)
  - HuggingFace Embeddings (sentence-transformers/all-MiniLM-L6-v2)
  - FAISS Vector Store (similarity search)
Image Service:  Pillow + GridFS integration
APIs:           RESTful endpoints with CORS support

Development Tools

Package Mgmt:   npm (frontend) + pip (backend)
Development:    Vite dev server + Flask debug mode
Linting:        ESLint + TypeScript
Environment:    PowerShell automation scripts

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.8+ with pip
  • Node.js 16+ with npm
  • MongoDB (local installation or cloud)
  • Google API Key (for Gemini AI)

1. Clone & Setup

git clone <repository-url>
cd CribConcierge

2. Environment Configuration

Create .env file in backend/ directory:

GEMINI_API_KEY="your-google-gemini-api-key"
MONGODB_URI="mongodb://localhost:27017/imageupload"

3. Automated Development Start

Windows (PowerShell):

cd scripts
.\start-dev.ps1

Manual Start:

# Backend (Terminal 1)
cd backend
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python app_integrated.py

# Frontend (Terminal 2)
cd frontend
npm install
npm run dev

4. Access the Application

๐Ÿ”ง Implementation Highlights

VR Tour System

  • Room Mapping Architecture:
    roomPhotoId        โ†’ Bedroom
    drawingRoomPhotoId โ†’ Living Room
    kitchenPhotoId     โ†’ Kitchen
    bathroomPhotoId    โ†’ Bathroom
    
  • A-Frame Integration: Custom components for scene management and transitions
  • Image Loading: Progressive loading with error handling and fallbacks
  • Voice Navigation: Natural language commands integrated with VR controls

AI Chat System

  • RAG Pipeline: Property Data โ†’ Embeddings โ†’ Vector Search โ†’ LLM Response
  • Memory Management: Conversation buffer for context-aware interactions
  • Enhanced Responses: Includes interactive property cards and VR tour promotions
  • Fallback Handling: Database-only responses when RAG system is unavailable

Property Database Schema

{
  "_id": "ObjectId",
  "propertyName": "string",
  "propertyAddress": "string",
  "propertyCostRange": "string",
  "bedrooms": "number",
  "bathrooms": "number",
  "area": "string",
  "features": ["array"],
  "description": "string",
  "roomPhotoId": "string",
  "bathroomPhotoId": "string",
  "drawingRoomPhotoId": "string",
  "kitchenPhotoId": "string",
  "created_at": "datetime",
  "updated_at": "datetime"
}

๐Ÿ“ Project Structure

CribConcierge/
โ”œโ”€โ”€ ๐Ÿ“‚ backend/                 # Flask API server
โ”‚   โ”œโ”€โ”€ app_integrated.py       # Main application (AI + Image service)
โ”‚   โ”œโ”€โ”€ image_service.py        # GridFS image handling
โ”‚   โ”œโ”€โ”€ SYSTEM_PROMPT.PY       # AI system prompts
โ”‚   โ”œโ”€โ”€ requirements.txt        # Python dependencies
โ”‚   โ””โ”€โ”€ .env                   # Environment variables
โ”œโ”€โ”€ ๐Ÿ“‚ frontend/               # React + TypeScript UI
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/        # React components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ tour/         # VR tour components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ voice/        # Voice assistant
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ui/           # shadcn/ui components
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/            # Custom React hooks
โ”‚   โ”‚   โ”œโ”€โ”€ pages/            # Route components
โ”‚   โ”‚   โ”œโ”€โ”€ types/            # TypeScript definitions
โ”‚   โ”‚   โ””โ”€โ”€ utils/            # Utility functions
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ vite.config.ts
โ”œโ”€โ”€ ๐Ÿ“‚ scripts/               # Development automation
โ”‚   โ””โ”€โ”€ start-dev.ps1         # Windows startup script
โ”œโ”€โ”€ ๐Ÿ“‚ docs/                  # Documentation
โ”œโ”€โ”€ ๐Ÿ“‚ archive/               # Legacy code archive
โ””โ”€โ”€ README.md                 # Project documentation

๐ŸŒ API Endpoints

Property Management

POST /api/addListing          # Add new property
GET  /api/getListings         # Get all properties
GET  /api/getProperty/:id     # Get specific property

AI Chat Assistant

GET  /api/askIt?question=...  # AI-powered Q&A with RAG
POST /api/rebuildRAG          # Rebuild vector knowledge base
GET  /api/ragStatus           # Check RAG system status

Image Service

POST /api/upload              # Upload property images
POST /api/images/upload       # Alternative upload endpoint
GET  /api/images/:id          # Retrieve images by ID

๐ŸŽฎ Usage Guide

Adding Properties

  1. Navigate to Add Listing page
  2. Fill property details (name, address, price, etc.)
  3. Upload room photos (Kitchen, Bedroom, Bathroom, Living Room)
  4. Submit to create property with VR tour capability

Exploring VR Tours

  1. Click "3D Tour" button on any property card
  2. Use mouse/touch to look around 360ยฐ
  3. Click room buttons to navigate between spaces
  4. Use voice commands: "go to kitchen", "describe this room"
  5. Keyboard navigation: WASD keys for movement

AI Chat Assistant

  1. Type questions in the chat interface
  2. Ask about properties: "Show me 3-bedroom houses"
  3. Get recommendations: "What properties have VR tours?"
  4. Property details: "Tell me about the latest listing"

๐Ÿš€ Development Status

โœ… Completed Features

  • โœ… Complete property management system
  • โœ… MongoDB integration with GridFS storage
  • โœ… A-Frame VR tour implementation
  • โœ… AI chat assistant with RAG (LangChain + Gemini)
  • โœ… Voice assistant integration in VR tours
  • โœ… Interactive property cards in AI responses
  • โœ… Responsive UI with shadcn/ui components
  • โœ… Development automation scripts

๐Ÿ”„ In Progress

  • ๐Ÿ”„ Advanced voice navigation improvements
  • ๐Ÿ”„ Enhanced VR tour features (hotspots, annotations)
  • ๐Ÿ”„ Property comparison tools

๐Ÿ’ก Key Value Propositions

  • ๐ŸŒŸ Immersive Experience: 360ยฐ VR tours provide realistic property viewing
  • ๐Ÿง  AI Intelligence: Smart recommendations and conversational property search
  • ๐ŸŽค Voice Interaction: Hands-free property exploration and navigation
  • ๐Ÿ“ฑ Modern UX: Responsive design with smooth animations and transitions
  • โšก Performance: Optimized image loading and efficient data management
  • ๐Ÿ”— Integration Ready: RESTful APIs for easy third-party integrations

๐Ÿ›  Contributing

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published