- Install Nodejs Latest LTS Version. (Project uses Nodejs 20.11.0 and npm 10.2.4)
- Install Yarn
- Install cdk
- Install aws cli
- Install docker docker
- Data setup: Download the Indo Fashion dataset from Kaggle and unzip the data. Here's how the folder structure and the entry in the JSON files look like:
- Clone this repository to your local computer.
- In the terminal, from the backend folder execute
yarn install
to install all dependencies. - Update the cdk.json - allowedip with the ip-address of your machine, this whitelists the source ip-address to allow traffic into API-Gateway.
- Ensure that your docker daemon is running
- Run
docker ps
- Make sure you set your aws credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN)
- Run
cdk bootstrap
- Ensure that you get Titan MultiModal access in Bedrock. Attached screenshot in project_asset for reference
- Run
cdk deploy
- Load images and json files to ingest S3 bucket as shown
- From the frontend folder, run
yarn install
to install the frontend dependencies. - Run
yarn start
to launch the react application locally from the browser. - Open http://localhost:3000 to view it in your browser.
- Enter the API endpoint URL created through the backend cdk deployment
- To deploy frontend browse to infra folder and run following commands
- Make sure you set your aws credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN)
- Run
cdk bootstrap
- Add S3 bucket name in
cdk.json
-loggingBucketName
:backendstack-xxxx
- Run
cdk deploy
- URL will be printed as output in the terminal to access frontend
-
Enter the API endpoint URl, click on
Find Similar Products
to view results based on image search. Alternatively you could upload new image by clickingChange Product
option and performing a search.
- In the terminal, from the backend folder, run the
cdk destroy
command to remove the aws resources.