Skip to content

arkobrat/rentai-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RentAI

Exhausted at the thought of searching for rentals and confused by the plethora of filters on PropertyGuru? Or are you just looking to optimize your property searches to find the best listings?

RentAI is an AI-powered search engine which enables you to search for PropertyGuru listings using natural language.

RentAI

Features

  • Natural language search for Singapore property rentals (no need to select filters explicitly)
  • Automatic filter extraction to identify bedrooms, price range and other parameters
  • Auto-matching for MRT stations and districts by location (if entered)
  • Direct links to actual PropertyGuru listings
  • Local result caching layer for instant navigation between pages for the same query
  • Dark mode support

Quick Start

Prerequisites

  • Python 3.9+
  • Node.js 18+
  • npm or yarn

Setup

# Clone and navigate to project
cd rentai-app

# Run quick setup script (Mac/Linux)
bash QUICKSTART.sh

# Or manually:
# Terminal 1 - Backend
cd backend
pip install -r requirements.txt
playwright install chromium
# Create .env with GROQ_API_KEY=your_key
python main.py

# Terminal 2 - Frontend
cd frontend
npm install
npm run dev

The app runs on localhost:3000 by default in the development environment. The FastAPI backend runs on localhost:8000 by default.

Use .env.development and .env.production files to change the deployment location. An example is given in .env.example.

Architecture

Frontend Stack

  • Framework: Next.js
  • Styling: Tailwind CSS
  • Language: TypeScript

Backend Stack

  • Framework: FastAPI
  • Web Scraping: Playwright (headless browser automation)
  • AI Agent: LangChain + Groq (llama-3.3-70b)
  • Server: Uvicorn (ASGI)

Troubleshooting

Backend Won't Start

# Check Python version
python3 --version  # Should be 3.9+

# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate  # or `.venv\Scripts\activate` on Windows

# Install dependencies
pip install -r requirements.txt

# Install Playwright
playwright install chromium

Missing Groq API Key

  1. Get a free key from console.groq.com
  2. Create backend/.env:
    GROQ_API_KEY=your_key_here
    
    An example is provided in .env.example.

Frontend Can't Connect to Backend

  1. Ensure backend is running: python main.py from backend directory
  2. Check that the port that the backed is running on (default: 8000) is not blocked
  3. Verify CORS is enabled in api.py

Playwright Browser Issues

# Reinstall browsers
playwright install chromium

Or run with visible browser
(Change headless=False in init_api.py for debugging)

Dependencies

Backend

  • fastapi - Modern Python web framework
  • uvicorn - ASGI application server
  • playwright - Browser automation for scraping
  • langchain - LLM framework
  • langchain-groq - Groq integration
  • pydantic - Data validation
  • python-dotenv - Environment variable management

Frontend

  • next - React framework
  • react - UI library
  • tailwindcss - Utility-first CSS
  • lucide-react - Icon library

License

This project demonstrates integration with PropertyGuru for educational purposes only.

Contributing

Contributions welcome! Areas for improvement:

  • Add more property sources (Rently, 99.co)
  • Improve LLM prompts for better filter extraction
  • Add user preferences/saved searches
  • Implement email alerts for new listings
  • Add property recommendations
  • Enhance UI/UX with animations

Support

For issues:

  1. Check SETUP.md for detailed setup instructions
  2. Review FastAPI docs: https://fastapi.tiangolo.com/

Future Enhancements

  • User authentication and saved searches
  • Email alerts for matching properties
  • Advanced filtering and sorting options
  • Property comparison tool
  • Investment analysis features
  • Map view with property locations
  • Reviews and ratings system
  • Multiple language support

About

Natural language search for PropertyGuru

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors