Ikea's image micro-service
Project description Displaying an image carousel and provides images source to other micro-services
Basic Usage & Sample JSONs Examples are based on: https://www.ikea.com/us/en/p/malm-underbed-storage-box-for-high-bed-black-brown-60252721/
- For regular images displayed on the product main page. -> GET api/images/default/rg/:productId
{
"regular": [
"https://ikea-clone-image-service.s3.us-west-1.amazonaws.com/img7.jpg",
"https://ikea-clone-image-service.s3.us-west-1.amazonaws.com/img8.jpg",
"https://ikea-clone-image-service.s3.us-west-1.amazonaws.com/img9.jpg"
],
}
- For large images when the user clicks on the image on the produce size -> GET api/images/default/lg/:productId
{
"large": [
"https://ikea-clone-image-service.s3.us-west-1.amazonaws.com/img4.jpg",
"https://ikea-clone-image-service.s3.us-west-1.amazonaws.com/img5.jpg",
"https://ikea-clone-image-service.s3.us-west-1.amazonaws.com/img6.jpg"
],
}
-
For tiny images used on:
- "Other Colors" under "About" section -> GET api/images/thumnail/colors/:productId
{ "colors": [ "https://ikea-clone-image-service.s3.us-west-1.amazonaws.com/img10.jpg", "https://ikea-clone-image-service.s3.us-west-1.amazonaws.com/img11.jpg", "https://ikea-clone-image-service.s3.us-west-1.amazonaws.com/img12.jpg", "https://ikea-clone-image-service.s3.us-west-1.amazonaws.com/img13.jpg", "https://ikea-clone-image-service.s3.us-west-1.amazonaws.com/img14.jpg", ], }
-
For hand-drawn-style images of the product-size service if any -> GET api/images/sizeService/:productId
{
"sizeService": [
"https://ikea-clone-image-service.s3.us-west-1.amazonaws.com/img24.jpg"
]
}
-
For large thumbnail images used on: -> GET api/images/thumnail/lg/:productId
- "Other also viewed"
- "Goes well with"
- "More from product series"
{ "largeThumbnails": [ "https://ikea-clone-image-service.s3.us-west-1.amazonaws.com/img25.jpg" ], }
-
For medium thumbnail images used on: -> GET api/images/thumnail/med/:productId
- "Similar Products"
{ "mediumThumbnails": [ "https://ikea-clone-image-service.s3.us-west-1.amazonaws.com/img26.jpg" ], }
An nvmrc
file is included if using nvm.
- Node 6.13.0
- etc
From within the root directory:
npm install -g webpack
npm install