Skip to content

graschik/hicaliber-test-task

Repository files navigation

Hicaliber Test Task


Project Setup

1. Clone the repository

git clone https://github.com/graschik/hicaliber-test-task
cd hicaliber-test-task

2. Environment configuration

Create environment file:

cp .env.example .env

3. Configure local domain

Add the following entry to your /etc/hosts file:

127.0.0.1 hicaliber-test

4. Run the project

docker compose -f compose.dev.yaml up -d

Enter the workspace container:

docker compose -f compose.dev.yaml exec workspace bash

Install dependencies:

composer install
npm install
npm run dev

Run migrations:

php artisan migrate
php artisan db:seed --class=HouseSeeder

Application will be available at:

http://hicaliber-test:8002

API Example

Search houses

Request

GET /api/v1/houses/search?filter[bedrooms]=4&filter[price_from]=0&filter[price_to]=513269&page[number]=2&page[size]=3

Full URL example:

http://hicaliber-test:8002/api/v1/houses/search?filter[bedrooms]=4&filter[price_from]=0&filter[price_to]=513269&page[number]=2&page[size]=3

Response

{
  "data": [
    {
      "id": 4,
      "name": "The Aspen",
      "bedrooms": 4,
      "storeys": 2,
      "bathrooms": 2,
      "garages": 2,
      "price": "384356.000",
      "created_at": "2026-01-21T17:27:13.000000Z",
      "updated_at": "2026-01-21T17:27:13.000000Z"
    },
    {
      "id": 9,
      "name": "The Geneva",
      "bedrooms": 4,
      "storeys": 2,
      "bathrooms": 3,
      "garages": 2,
      "price": "390600.000",
      "created_at": "2026-01-21T17:27:13.000000Z",
      "updated_at": "2026-01-21T17:27:13.000000Z"
    }
  ],
  "meta": {
    "total": 5,
    "current_page": 2,
    "page_size": 3,
    "last_page": 2
  }
}

Frontend Overview

The project includes a simple Vue-based frontend for interacting with the API.

What you can do in the UI

  • View a paginated list of houses
  • Filter houses by:
    • Name (text search)
    • Bedrooms
    • Storeys
    • Bathrooms
    • Garages
    • Price range (slider)
  • Sort results by any column:
    • Name
    • Bedrooms
    • Storeys
    • Bathrooms
    • Garages
    • Price
  • Change page size
  • Navigate between pages
  • Reset all filters to the initial state

All filtering, sorting, and pagination are handled server-side via the /api/v1/houses/search endpoint.

Frontend preview

Frontend preview

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published