Backend

This directory contains the server-side code for the House Hunter application.

Structure

  • index.ts - Main entry point for the backend
  • database/ - Database schema and queries
  • routes/ - API route handlers

API Endpoints

Properties

  • GET /api/properties - Get all properties with optional filtering
    • Query parameters:
      • minPrice - Minimum price
      • maxPrice - Maximum price
      • minBedrooms - Minimum number of bedrooms
      • minBathrooms - Minimum number of bathrooms
      • city - Filter by city
      • state - Filter by state
      • searchTerm - Search in title, description, address, and city
  • GET /api/properties/:id - Get a single property by ID
  • GET /api/properties/cities - Get list of available cities
  • GET /api/properties/states - Get list of available states

Project Info

  • GET /api/project-info - Get information about the project for the view source link

Static Files

The backend serves static files from the /frontend and /shared directories.