Learn how to instantly get started with the Hypermode Commerce template
If you choose to use your own data, you’ll need to upload it using a CSV file and a Python script provided in Step 2.
python --version
or
python3 --version
in your terminal.
Unique Id,Product Name,Category,Selling Price,About Product,Image,Num Stars,In Stock
.
searchProducts
endpoint that match your query, sparkly shoes
. Feel free to experiment with
the query—adjust the maxItems
value to return more items, or change the
search query to see how the returned data matches your input. Additionally,
notice that the function ranks items based on their star rating and whether
they’re in stock.
.env.local
file in the root of your project and add your API key
and endpoint to it, like this:
Note: The intent of this quickstart is for proof of concepts. For more advanced usage, such as customizing search re-ranking logic, you’ll need to clone the template to your own repository to make and push changes. Refer to the next section for further instructions.
Use this template
in the upper-right corner and
selecting Create new repo.
This clones the code into your own GitHub
repository
New Project
.
Import a GitHub Repo
.
python --version
or
python3 --version
in your terminal.
/backend/extras/ecommerce_populate.py
to
seed your data, as well as sample data located in
/backend/extras/hyper_toys.csv
.
hyper_toys.csv
) with your own data. Make sure the headers in your CSV
match the following headers:
Uniq Id,Product Name,Category,Selling Price,About Product,Image,Num Stars,In Stock
ecommerce_populate.py
file to include your endpoint and API key,
which you can find in your Hypermode dashboard.
/backend/functions/assembly
directory.
search.ts
file and locate the
reRankAndFilterSearchResultObjects
function.main
branch automatically triggers a Hypermode
deployment.searchProducts
endpoint again, it
ranks products solely based on their star rating..env.local
file:
Note: Both of these values are available in the Hypermode consoleNext, just run the command
npm run dev
in your terminal to run the app
locally. Now you can test the changes you made to your backend functions.