This directory contains the backend API for the property listing website.
index.ts - Main entry point for the API/database - Database schema and queries/routes - API routes for properties and admin functionalityGET /api/properties - Get all propertiesGET /api/properties/with-images - Get all properties with their imagesGET /api/properties/:id - Get a specific property by IDGET /api/properties/:id/with-images - Get a specific property with its imagesGET /api/properties/category/:category - Get properties by categoryGET /api/properties/search - Search properties with filtersPOST /api/admin/login - Admin loginPOST /api/admin/logout - Admin logoutPOST /api/admin/properties - Create a new propertyPUT /api/admin/properties/:id - Update a propertyDELETE /api/admin/properties/:id - Delete a propertyPOST /api/admin/properties/:id/images - Add an image to a propertyDELETE /api/admin/images/:id - Delete a property imageAdmin routes are protected with a Bearer token authentication. The token is obtained by logging in with valid admin credentials.