👉🏻 Please read the instructions very carefully


Problem Statement

You are building a comprehensive property portal where tenants can find properties as per their requirements and property owners can add/delete/update properties available with them for renting

Tech Stack

Task 1: Front End: Property Search / Listing Page

Untitled

Task 2: Back End: API Development

Develop API endpoints for following requirements:

  1. Fetch all available properties
    1. Route: api/list-properties
    2. Method: Choose an appropriate method applicable
    3. Use this API to show the properties on the Property Search / Listing Page
    4. This is public endpoint, i.e. unauthenticated user can also access this
  2. Add a property
    1. Route: api/property
    2. Method: Choose an appropriate method applicable
    3. No front end to be developed for this
    4. This is a private endpoint, i.e. only authenticated users can access this page
    5. This endpoint will be used by property owners to add properties, which will then be visible to tenants using the fetch API endpoint (point 1)
  3. Update a property
    1. Route: api/property/:id
    2. Method: Choose an appropriate method applicable
    3. No front end to be developed for this
    4. This is a private endpoint, i.e. only authenticated users can access this page
    5. This endpoint will be used by property owners to update their existing properties that they have listed on the portal. Updates done by property owners with this endpoint will be visible to tenants using the fetch API endpoint (point 1)
    6. Users (property owners) can update only the properties they have listed and not the properties owned by others
  4. Delete a property
    1. Route: api/property/:id
    2. Method: Choose an appropriate method applicable
    3. This endpoint will be used by the property owners to delete any property that they have listed on the portal.
    4. Other requirements are similar to point 3 above
  5. List my properties
    1. Route: api/property
    2. Method: Choose an appropriate method applicable
    3. This endpoint will be used by property owners to get the list of all the properties they have listed on the portal
    4. Other requirements are similar to point 3 above