👉🏻 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
- Front end: React
- Back End: Node.js/Express, MongoDB or any other SQL DB
Task 1: Front End: Property Search / Listing Page
- This will be the home page listing all available properties
- Options to filter properties
- Location - Drop down - showing city list
- Available from date - calendar drop down
- Price range - slider
- Property type - dropdown
- This is a public page, i.e. non-authenticated users can also access it.
- No pagination to be implemented. All properties fetched from API should be shown in a single page
- Please make sure that the page is responsive
Task 2: Back End: API Development
Develop API endpoints for following requirements:
- Fetch all available properties
- Route: api/list-properties
- Method: Choose an appropriate method applicable
- Use this API to show the properties on the Property Search / Listing Page
- This is public endpoint, i.e. unauthenticated user can also access this
- Add a property
- Route: api/property
- Method: Choose an appropriate method applicable
- No front end to be developed for this
- This is a private endpoint, i.e. only authenticated users can access this page
- 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)
- Update a property
- Route: api/property/:id
- Method: Choose an appropriate method applicable
- No front end to be developed for this
- This is a private endpoint, i.e. only authenticated users can access this page
- 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)
- Users (property owners) can update only the properties they have listed and not the properties owned by others
- Delete a property
- Route: api/property/:id
- Method: Choose an appropriate method applicable
- This endpoint will be used by the property owners to delete any property that they have listed on the portal.
- Other requirements are similar to point 3 above
- List my properties
- Route: api/property
- Method: Choose an appropriate method applicable
- This endpoint will be used by property owners to get the list of all the properties they have listed on the portal
- Other requirements are similar to point 3 above