help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
real-estate-bot
/
src
/
__pycache__
RSK World
real-estate-bot
Real Estate Bot - Python + Flask + OpenAI + SQLite + Property Search + AI Chatbot + Viewing Scheduler
__pycache__
  • __init__.cpython-313.pyc678 B
  • ai_recommendation_engine.cpython-313.pyc21.9 KB
  • app.cpython-313.pyc10.3 KB
  • blockchain_integration.cpython-313.pyc2.2 KB
  • chatbot.cpython-313.pyc15.7 KB
  • database.cpython-313.pyc18.9 KB
  • image_enhancer.cpython-313.pyc9.6 KB
  • multilang_support.cpython-313.pyc9 KB
  • neighborhood_analyzer.cpython-313.pyc6.7 KB
  • price_prediction_engine.cpython-313.pyc28.5 KB
  • property_search.cpython-313.pyc16 KB
  • virtual_tour_manager.cpython-313.pyc23.2 KB
  • voice_assistant.cpython-313.pyc27 KB
README.md
README.md
Raw Download

README.md

# Real Estate Bot

**AI-Powered Real Estate Assistant**

Author: RSK World (https://rskworld.in)
Founded by: Molla Samser
Designer & Tester: Rima Khatun
Contact: info@rskworld.com, +91 93305 39277
Year: 2026

## ๐Ÿ  Description

Real Estate Bot is an intelligent chatbot application designed to help users search for properties, schedule viewings, and get comprehensive information about real estate listings. Built with Python, Flask, and OpenAI API, this bot provides a conversational interface for property discovery and management.

## โœจ Features

- **๐Ÿ” Property Search**: Find properties based on location, price range, property type, bedrooms, and other criteria
- **๐Ÿ“… Viewing Scheduling**: Schedule property viewings with preferred dates and times
- **๐Ÿ’ฌ Property Inquiries**: Get detailed information about specific properties
- **๐Ÿ“ Location Information**: Learn about neighborhoods and areas
- **๐Ÿค– AI-Powered Chat**: Natural language processing with OpenAI GPT
- **๐Ÿ’พ Database Management**: SQLite database for properties, appointments, and user data
- **๐ŸŒ Web Interface**: Modern, responsive web UI with real-time chat
- **๐Ÿ“ฑ Mobile Friendly**: Fully responsive design for all devices

## ๐Ÿ› ๏ธ Technologies Used

- **Backend**: Python 3.8+, Flask
- **AI/ML**: OpenAI GPT API
- **Database**: SQLite
- **Frontend**: HTML5, CSS3, JavaScript (ES6+)
- **UI Framework**: Bootstrap 5
- **Icons**: Font Awesome
- **HTTP Client**: Requests
- **Environment Management**: python-dotenv

## ๐Ÿ“‹ Requirements

- Python 3.8 or higher
- pip package manager
- OpenAI API key
- Modern web browser

## ๐Ÿš€ Installation

1. **Clone the repository**
```bash
git clone <repository-url>
cd real-estate-bot
```

2. **Create virtual environment**
```bash
python -m venv venv

# Windows
venv\Scripts\activate

# macOS/Linux
source venv/bin/activate
```

3. **Install dependencies**
```bash
pip install -r requirements.txt
```

4. **Set up environment variables**
```bash
cp .env.example .env
```

Edit `.env` file and add your API keys:
```env
OPENAI_API_KEY=your_openai_api_key_here
SECRET_KEY=your_secret_key_here
```

5. **Initialize the database**
The database will be automatically created when you run the application for the first time.

## ๐Ÿƒโ€โ™‚๏ธ Running the Application

1. **Start the Flask application**
```bash
python src/app.py
```

2. **Open your web browser**
Navigate to `http://localhost:5000`

3. **Start chatting!**
The bot will be ready to help you find properties and answer your real estate questions.

## ๐Ÿ“ Project Structure

```
real-estate-bot/
โ”œโ”€โ”€ src/
โ”‚ โ”œโ”€โ”€ app.py # Main Flask application
โ”‚ โ”œโ”€โ”€ chatbot.py # Chatbot logic and AI integration
โ”‚ โ”œโ”€โ”€ database.py # Database management
โ”‚ โ””โ”€โ”€ property_search.py # Property search engine
โ”œโ”€โ”€ templates/
โ”‚ โ””โ”€โ”€ index.html # Main web interface
โ”œโ”€โ”€ static/
โ”‚ โ”œโ”€โ”€ css/
โ”‚ โ”‚ โ””โ”€โ”€ style.css # Custom styles
โ”‚ โ””โ”€โ”€ js/
โ”‚ โ””โ”€โ”€ chat.js # Frontend JavaScript
โ”œโ”€โ”€ data/
โ”‚ โ””โ”€โ”€ real_estate_bot.db # SQLite database
โ”œโ”€โ”€ tests/
โ”‚ โ””โ”€โ”€ test_*.py # Unit tests
โ”œโ”€โ”€ requirements.txt # Python dependencies
โ”œโ”€โ”€ .env # Environment variables
โ””โ”€โ”€ README.md # This file
```

## ๐Ÿ’ฌ Usage Examples

### Property Search
- "Show me apartments in Mumbai under 50 lakhs"
- "Find 3-bedroom houses in Delhi"
- "I'm looking for a 2BHK flat in Bangalore with parking"

### Schedule Viewings
- "Schedule a viewing for property 123"
- "I want to visit the apartment in Pune tomorrow"
- "Book an appointment for the house in Chennai"

### Property Information
- "Tell me about property 456"
- "What's the price of the 3BHK in Mumbai?"
- "What amenities are available in the Bangalore property?"

### Location Queries
- "Tell me about the neighborhood in Delhi"
- "What schools are near the property in Pune?"
- "How is the connectivity in Mumbai?"

## ๐Ÿ”ง Configuration

### Environment Variables

- `OPENAI_API_KEY`: Your OpenAI API key (required)
- `SECRET_KEY`: Flask secret key for sessions
- `DATABASE_URL`: Database connection URL (default: SQLite)
- `REAL_ESTATE_API_KEY`: External real estate API key (optional)
- `REAL_ESTATE_API_URL`: External real estate API URL (optional)

### Database Schema

The application uses SQLite with the following tables:

- **properties**: Property listings and details
- **users**: User information and preferences
- **appointments**: Scheduled property viewings
- **inquiries**: Property-related inquiries
- **chat_history**: Conversation logs

## ๐Ÿงช Testing

Run the test suite:
```bash
python -m pytest tests/
```

Or run individual tests:
```bash
python -m pytest tests/test_chatbot.py
python -m pytest tests/test_database.py
python -m pytest tests/test_property_search.py
```

## ๐Ÿ”Œ API Endpoints

### Chat API
- `POST /api/chat` - Send message to chatbot
- `GET /api/chat/history` - Get conversation history

### Property API
- `POST /api/properties/search` - Search properties
- `GET /api/properties/<id>` - Get property details
- `GET /api/properties/<id>/similar` - Get similar properties

### Appointment API
- `POST /api/appointments/schedule` - Schedule viewing
- `GET /api/appointments/<user_id>` - Get user appointments

### Inquiry API
- `POST /api/inquiries/submit` - Submit property inquiry

## ๐ŸŽจ Customization

### Adding New Property Types
Edit the `property_types` dictionary in `src/chatbot.py` to add new property types and keywords.

### Modifying Search Criteria
Update the search logic in `src/property_search.py` to add new search filters and criteria.

### Customizing UI
Modify the HTML templates and CSS files in the `templates/` and `static/css/` directories.

## ๐Ÿš€ Deployment

### Production Deployment with Gunicorn
```bash
pip install gunicorn
gunicorn -w 4 -b 0.0.0.0:5000 src.app:app
```

### Docker Deployment
```dockerfile
FROM python:3.9-slim

WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt

COPY . .
EXPOSE 5000

CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "src.app:app"]
```

### Environment Variables for Production
- Set `FLASK_ENV=production`
- Use a strong `SECRET_KEY`
- Configure proper database connections
- Set up proper logging

## ๐Ÿ”’ Security Considerations

- Keep your OpenAI API key secure and never commit it to version control
- Use environment variables for sensitive configuration
- Implement rate limiting for API endpoints
- Validate and sanitize all user inputs
- Use HTTPS in production
- Regularly update dependencies

## ๐Ÿค Contributing

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

## ๐Ÿ“ License

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

## ๐Ÿ“ž Support

For support and inquiries:

- **Email**: info@rskworld.com
- **Phone**: +91 93305 39277
- **Website**: https://rskworld.in
- **Support**: support@rskworld.com

## ๐Ÿ™ Acknowledgments

- OpenAI for the powerful GPT API
- Flask team for the excellent web framework
- Bootstrap for the responsive UI components
- Font Awesome for the beautiful icons

---

**ยฉ 2026 RSK World. All rights reserved.**

*Developed by Molla Samser*
*Designed & Tested by Rima Khatun*

*Content used for educational purposes only. View [Disclaimer](https://rskworld.in/disclaimer.php)*
๐Ÿš€ Support RSK World

Subscribe to our YouTube channel for latest tutorials & updates!



Click subscribe & support our work โค๏ธ

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer