Skip to content

Casalytics is a web application that allows you to search real estate listings across multiple property websites simultaneously. It uses Next.js for the frontend and Flask for the backend.

Notifications You must be signed in to change notification settings

fedejordan/casalytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Casalytics - Real Estate Property Search Engine

Casalytics is a web application that allows you to search real estate listings across multiple property websites simultaneously. It uses Next.js for the frontend and Flask for the backend.

🚀 Prerequisites

  • Node.js (v18 or higher)
  • Python (v3.8 or higher)
  • npm or yarn
  • pip (Python package manager)

🛠 Project Structure

propfinder/
├── api/                    # Backend (Flask)
│   ├── app.py             # Main Flask application
│   └── requirements.txt    # Python dependencies
├── app/                    # Frontend (Next.js)
│   ├── page.tsx           # Main page
│   └── globals.css        # Global styles
├── lib/                    # Shared utilities
│   └── api.ts             # API client
└── README.md              # This file

🔧 Environment Setup

Backend (Flask)

  1. Navigate to the backend directory:

    cd api
  2. Create and activate a virtual environment:

    # On Linux/macOS
    python -m venv venv
    source venv/bin/activate
    
    # On Windows
    python -m venv venv
    .\venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Start the development server:

    python app.py

The backend will be available at http://localhost:5000

Frontend (Next.js)

  1. From the project root, install dependencies:

    npm install
    # or
    yarn install
  2. Set up environment variables:

    # Create a .env.local file
    echo "NEXT_PUBLIC_API_URL=http://localhost:5000" > .env.local
  3. Start the development server:

    npm run dev
    # or
    yarn dev

The frontend will be available at http://localhost:3000

🌟 Features

  • 🏠 Search across multiple real estate websites simultaneously
  • 📊 Real-time statistics
  • 🔍 Natural language search
  • 📱 Responsive design
  • ⚡ Progressive result loading

🔍 API Endpoints

GET /api/stats

Returns general statistics:

  • Total properties
  • Total real estate agencies
  • Searches per day

POST /api/search

Performs a property search.

Payload:

{
  "query": "apartment for sale in villa urquiza with 3 rooms under 150,000 USD"
}

🧪 Testing

Backend

cd api
python -m pytest

Frontend

npm run test
# or
yarn test

📝 Development

Add a New Real Estate Agency

  1. Add the agency to the list in api/app.py
  2. Implement the corresponding scraper
  3. Update the tests

Modify the Frontend

  1. UI components are based on shadcn/ui
  2. Use Tailwind CSS for styling
  3. Follow the "use client" pattern for components using hooks

🤝 Contributing

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

📄 License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

Casalytics is a web application that allows you to search real estate listings across multiple property websites simultaneously. It uses Next.js for the frontend and Flask for the backend.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published