Skip to content

Latest commit

Β 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MoveSmart Logo

MoveSmart

Smart Relocation & Accommodation Platform for Urban India

Python Django React Tailwind CSS MongoDB XGBoost Google Gemini Three.js GSAP


πŸ“Œ Overview

MoveSmart is an intelligent, full-stack smart relocation and housing discovery platform engineered to address urban housing friction and relocation challenges across Indian tier-1 & tier-2 cities (initially launched in Ahmedabad).

The platform bridges the gap between accommodation seekers, property owners, certified brokers, and corporate HR teams by combining a weighted district recommendation engine, Grounded AI conversational assistance (Google Gemini), XGBoost fair rent estimation, and Isolation Forest anomaly detection for trust verification.


πŸ› οΈ Technology Stack

MoveSmart is built with modern, industry-standard technologies organized into decoupled frontend and backend layers:

Frontend Architecture

  • Framework & UI Library: React 18.3.1 (SPA with Vite / React Scripts)
  • Styling & Design Token System: Tailwind CSS 3.4.6, PostCSS, Custom CSS Variables (Design System Tokenized)
  • 3D City Visualization: Three.js 0.160.0, @react-three/fiber 8.17.10, @react-three/drei 9.121.5 (Interactive 3D GLB City Model)
  • Animations & Scrollytelling: GSAP 3.15.0 (@gsap/react, ScrollTrigger, ScrollSmoother, SplitText, Draggable)
  • Icons & Typography: Lucide React icons, Inter typography via Google Fonts
  • HTTP Client: Axios 1.7.2 with centralized JWT request/response interceptors

Backend Architecture

  • Core Framework: Python 3.11+, Django 5.0.6, Django REST Framework (DRF) 3.15.2
  • Authentication: JWT Bearer Tokens via djangorestframework-simplejwt 5.3.1
  • Database & Data Layer: PyMongo 4.8.0 (Direct schema-less MongoDB integration without Django ORM overhead)
  • Server Middleware: WhiteNoise 6.7.0 (Static asset handling), django-cors-headers 4.4.0 (CORS management)
  • WSGI Production Server: Gunicorn 22.0.0

Artificial Intelligence & Machine Learning

  • Grounded AI Relocation Assistant: Google Gemini API (google-generativeai 0.7.2) with context-bound prompt sanitization and fallback mechanisms
  • Fair Rent Estimation Engine: XGBoost Regressor (xgboost 2.0.3, scikit-learn 1.9.0) producing expected rent ranges and confidence intervals
  • Listing Trust & Anomaly Detection: Isolation Forest (scikit-learn 1.9.0) analyzing multi-feature listing outliers

Database & Data Storage

  • Database: MongoDB 6.0+ (MongoDB Atlas Cloud Cluster or local MongoDB instance)
  • Collections & Indexes: Compound geospatial, text, and TTL indexing managed via backend/db/indexes.py

πŸ“ System Architecture

                               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                               β”‚       MoveSmart Web Application (SPA)        β”‚
                               β”‚  React 18 + Tailwind CSS + Three.js + GSAP   β”‚
                               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                      β”‚ (JWT Bearer Token / HTTPS)
                                                      β–Ό
                               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                               β”‚           Django REST Framework API          β”‚
                               β”‚         Python 3.11+ / Django 5.0.6          β”‚
                               β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                                      β”‚               β”‚               β”‚
                                      β–Ό               β–Ό               β–Ό
                               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                               β”‚  PyMongo   β”‚   β”‚  Gemini AI β”‚   β”‚  ML Engine β”‚
                               β”‚ Data Layer β”‚   β”‚ Assistant  β”‚   β”‚ XGBoost &  β”‚
                               β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚ Iso Forest β”‚
                                     β”‚                           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                     β–Ό
                               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                               β”‚  MongoDB   β”‚
                               β”‚ Database   β”‚
                               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ‘₯ Roles & Platform Modules

MoveSmart features strict Role-Based Access Control (RBAC) supporting 5 specialized user personas:

1. πŸ‘€ Accommodation Seeker (find_accommodation)

  • Onboarding Questionnaire: Budget range, preferred transit modes, lifestyle priorities (Safety, Connectivity, Budget, Lifestyle).
  • Locality Recommendation Engine: Multi-criteria weighted scoring algorithm evaluating 12+ Ahmedabad districts.
  • Listing Discovery & Search: Filter approved property listings by locality, budget, bedrooms, amenities, and commute duration.
  • Grounded Gemini AI Assistant: Interactive chatbot answering location-specific moving, legal, neighborhood, and living query contexts.
  • Bookmarks & Enquiries: Save favorite listings and submit direct property inquiry forms.

2. 🏠 Property Owner (property_owner)

  • Listing Submission Flow: Submit new properties requiring mandatory admin approval (status: pending_review).
  • Listing Management Dashboard: View listing statuses (pending_review, approved, rejected), view counts, and inquiry counts.
  • Resubmission & Rejection Notice: Clear rejection reason banners allowing owners to edit and resubmit corrected listings.

3. πŸ’Ό Certified Broker / Agent (broker)

  • Multi-Owner Listing Management: Create and manage property listings on behalf of multiple property owners.
  • CRM Lead Pipeline: Interactive kanban board tracking client leads through status stages: new βž” contacted βž” converted | lost.
  • Commission Tracker: Log commission fees for converted leads with automated earnings summaries.
  • AI Client Matcher: Match broker portfolio listings against seeker relocation preferences.

4. 🏒 Company HR Relocation Lead (company)

  • Relocation Batch Management: Create corporate employee relocation batches (e.g., Tech Hires Q3).
  • Employee Roster & Allocation: Bulk import employees, assign housing allocations, and track relocation progress.
  • Bulk Housing Recommendation Engine: Reuses seeker scoring engine across entire employee cohorts.
  • Budget Tracking & JSON Exporter: Server-side real-time corporate budget tracking and one-click JSON report generation.

5. πŸ›‘οΈ Admin Queue Reviewer (admin_review)

  • Listing Review Queue: Review submitted owner/broker property listings before public search visibility.
  • One-Click Approval / Rejection: Approve listings (status: approved) or reject listings with mandatory feedback (status: rejected).
  • Platform Analytics: Monitor active listings, review backlog, and trust anomaly flags.

πŸ“‚ Project Directory Structure

MoveSmart/
β”œβ”€β”€ README.md                           # Main Project Documentation (This File)
β”œβ”€β”€ Codebase Understanding/             # Architecture overview docs & specifications
└── movesmart/
    β”œβ”€β”€ .env                            # Unified local environment secrets
    β”œβ”€β”€ .env.example                    # Sample environment configurations template
    β”œβ”€β”€ Memory.md                       # Development log & implementation history
    β”œβ”€β”€ render.yaml                     # Production Render deployment manifest
    β”œβ”€β”€ scratch_test_groq.py            # Utility script for LLM benchmark tests
    β”‚
    β”œβ”€β”€ backend/                        # Django REST Framework Backend
    β”‚   β”œβ”€β”€ manage.py                   # Django CLI management executable
    β”‚   β”œβ”€β”€ requirements.txt            # Locked Python dependencies
    β”‚   β”œβ”€β”€ Procfile                    # Web process config for deployment
    β”‚   β”œβ”€β”€ config/                     # Django core settings & URL routing
    β”‚   β”‚   β”œβ”€β”€ settings.py             # App configuration reading from .env
    β”‚   β”‚   β”œβ”€β”€ urls.py                 # Root API routing table
    β”‚   β”‚   └── wsgi.py                 # WSGI entry point
    β”‚   β”œβ”€β”€ apps/                       # Modular Django application apps
    β”‚   β”‚   β”œβ”€β”€ accounts/               # Auth, registration, role management
    β”‚   β”‚   β”œβ”€β”€ admin_review/           # Listing approval queue
    β”‚   β”‚   β”œβ”€β”€ assistant/              # Grounded Gemini AI chat handler
    β”‚   β”‚   β”œβ”€β”€ broker/                 # Broker CRM & lead pipeline
    β”‚   β”‚   β”œβ”€β”€ company/                # Corporate relocation batches
    β”‚   β”‚   β”œβ”€β”€ listings/               # Property listing CRUD & search
    β”‚   β”‚   β”œβ”€β”€ recommendations/        # Locality weighted scoring engine
    β”‚   β”‚   β”œβ”€β”€ commute/                # Commute matrix calculator & cache
    β”‚   β”‚   └── cost_of_living/         # Cost of living estimator
    β”‚   β”œβ”€β”€ db/                         # MongoDB database access layer & indexing
    β”‚   β”‚   β”œβ”€β”€ connection.py           # PyMongo client singleton
    β”‚   β”‚   └── indexes.py              # Automated collection index builder
    β”‚   β”œβ”€β”€ ml/                         # Machine learning model pipelines
    β”‚   β”‚   β”œβ”€β”€ rent_prediction/        # XGBoost fair rent model & training
    β”‚   β”‚   └── suspicious_listing/     # Isolation Forest anomaly detector
    β”‚   └── tests/                      # Automated unit test suites
    β”‚
    β”œβ”€β”€ frontend/                       # React 18 + Tailwind CSS Frontend
    β”‚   β”œβ”€β”€ package.json                # Frontend dependencies & scripts
    β”‚   β”œβ”€β”€ tailwind.config.js          # Custom color tokens & Inter font styling
    β”‚   β”œβ”€β”€ public/                     # Static public assets
    β”‚   β”‚   β”œβ”€β”€ smart-Building.png      # MoveSmart Logo Asset
    β”‚   β”‚   └── model.glb               # 3D City Model GLB Asset
    β”‚   └── src/                        # Application source code
    β”‚       β”œβ”€β”€ App.jsx                 # Route manager & top-level layout
    β”‚       β”œβ”€β”€ api/                    # Axios API integration modules
    β”‚       β”œβ”€β”€ components/             # Reusable UI components & 3D canvases
    β”‚       β”‚   β”œβ”€β”€ hero/               # 3D City Model canvas & hero section
    β”‚       β”‚   └── common/             # Badges, toasts, cards, navbars
    β”‚       β”œβ”€β”€ pages/                  # Top-level view pages (Landing, Login, Dashboard)
    β”‚       └── styles/                 # Tailwind directives & entrance keyframes
    β”‚
    β”œβ”€β”€ data/                           # Seed datasets & locality geo-matrices
    └── scripts/                        # Ingestion & setup scripts

βš™οΈ Environment Variables (.env)

Create a .env file in movesmart/ or movesmart/backend/ using the following keys:

# -----------------------------------------------------------------------------
# Django Core Settings
# -----------------------------------------------------------------------------
DJANGO_SECRET_KEY=django-insecure-your-super-secret-key-change-this-in-production
DJANGO_DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1,testserver

# -----------------------------------------------------------------------------
# Database Configuration (MongoDB Atlas or Local MongoDB)
# -----------------------------------------------------------------------------
MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/?retryWrites=true&w=majority
DATABASE_NAME=movesmart_db

# -----------------------------------------------------------------------------
# Authentication & JWT Configuration
# -----------------------------------------------------------------------------
JWT_SECRET=your-jwt-signing-secret-key
JWT_ACCESS_TOKEN_LIFETIME_MINUTES=60

# -----------------------------------------------------------------------------
# External APIs & Services
# -----------------------------------------------------------------------------
GEMINI_API_KEY=your-google-gemini-api-key
MAPS_API_KEY=your-google-maps-api-key

# -----------------------------------------------------------------------------
# CORS Configuration
# -----------------------------------------------------------------------------
CORS_ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000

πŸš€ Step-by-Step Installation & Local Setup

Prerequisites

Ensure you have the following installed on your machine:


1. Clone the Repository

git clone https://github.com/your-username/MoveSmart.git
cd MoveSmart

2. Backend Setup (Django + PyMongo + ML)

Navigate to the backend directory and set up Python environment:

cd movesmart/backend

# Step 2.1: Create virtual environment
python -m venv venv

# Step 2.2: Activate virtual environment
# On Windows (PowerShell):
.\venv\Scripts\Activate.ps1
# On Linux/macOS:
source venv/bin/activate

# Step 2.3: Install backend dependencies
pip install -r requirements.txt

# Step 2.4: Create environment file
# Copy .env.example to .env and configure your MONGO_URI & GEMINI_API_KEY
cp ../.env.example .env

# Step 2.5: Build MongoDB Collection Indexes
python db/indexes.py

# Step 2.6: Train ML Models (Offline Training Step)
python ml/rent_prediction/train.py
python ml/suspicious_listing/train.py

# Step 2.7: Run Backend Unit Tests
python -m unittest discover tests

# Step 2.8: Start Django Development Server
python manage.py runserver

The Django REST API backend will start at:
πŸ‘‰ http://localhost:8000/ (Health check endpoint: http://localhost:8000/api/health)


3. Frontend Setup (React + Tailwind + Three.js)

Open a new terminal window and navigate to the frontend directory:

cd MoveSmart/movesmart/frontend

# Step 3.1: Install NPM dependencies
npm install

# Step 3.2: Launch React Development Server
npm run dev # or npm start

The React frontend web application will open at:
πŸ‘‰ http://localhost:3000/


🌐 API Endpoint Quick Reference

Module Method Endpoint Description Auth Required
Auth POST /api/auth/register Register new user account No
Auth POST /api/auth/login Authenticate user & issue JWT No
Auth POST /api/auth/role Select role & complete onboarding Yes
Listings GET /api/listings Search & browse approved listings No
Listings POST /api/listings Create property listing (pending_review) Yes (Owner/Broker)
Listings GET /api/listings/:id View single listing details No
ML Models GET /api/listings/:id/rent-prediction XGBoost predicted fair rent range No
ML Models GET /api/listings/:id/trust-score Isolation Forest trust anomaly score No
Scoring POST /api/recommendations/areas Locality weighted scoring recommendation Yes
AI Assistant POST /api/assistant/chat Grounded Gemini relocation assistant Yes
Broker GET /api/leads Fetch broker CRM leads Yes (Broker)
Broker POST /api/commissions Log lead conversion commission Yes (Broker)
Company HR GET /api/company/relocation-batches List corporate relocation batches Yes (Company HR)
Company HR POST /api/company/relocation-batches/:id/search Bulk relocation cohort search Yes (Company HR)
Admin GET /api/admin/review-queue List listings pending approval Yes (Admin)
Admin POST /api/admin/listings/:id/approve Approve property listing Yes (Admin)
Admin POST /api/admin/listings/:id/reject Reject listing with reason Yes (Admin)
System GET /api/health Health & system monitoring No

πŸ—„οΈ Database Collections Summary

MoveSmart operates on MongoDB schema-less collections optimized with PyMongo:

  • users: User authentication credentials, profiles, assigned role, and role-specific metadata.
  • listings: Property inventory (status: "pending_review", "approved", "rejected"), rent price, specs, locality, amenities, and owner/broker IDs.
  • saved_items: Seeker bookmarked property listings.
  • enquiries: Direct tenant-to-owner property inquiries.
  • leads: Broker CRM leads pipeline (lead_status: "new", "contacted", "converted", "lost").
  • commissions: Financial audit logs for broker converted leads.
  • relocation_batches: Corporate HR batches with embedded employees[] rosters and allocations.
  • commute_cache: Matrix distance & travel duration cache with TTL indexes.

πŸ§ͺ Testing & Quality Assurance

MoveSmart includes automated unit tests for backend API routes, role permissions, and ML engine endpoints:

cd movesmart/backend

# Run all test suites
python -m unittest discover tests

# Test specific app suite (e.g. listings)
python -m unittest tests.test_listings

🚒 Production Deployment

  1. MongoDB Atlas: Deploy a MongoDB cluster, create a database user, and configure MONGO_URI in production secrets. Run python db/indexes.py.
  2. Backend (Render / App Runner / Railway): Deploy Django backend using Gunicorn (gunicorn config.wsgi:application). Set DJANGO_DEBUG=False and set production environment variables.
  3. Frontend (Vercel / Netlify): Build frontend static bundle using npm run build and connect to backend API domain.

πŸ“œ License & Acknowledgments

Designed & Developed for the MoveSmart Urban Relocation Platform.
Built using Python, Django, DRF, PyMongo, MongoDB, React, Tailwind CSS, Three.js, GSAP, XGBoost, Scikit-Learn, and Google Gemini API.

About

MoveSmart is a full-stack relocation platform that helps users discover housing and neighborhoods with AI-powered locality recommendations, rent estimation, and listing anomaly detection. It combines web-scraped data, XGBoost, Isolation Forest, and Gemini to support fair pricing, trustworthy listings, and smarter relocation decisions.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages