Smart e-commerce with Python and Nextjs-Part 1

Dennis Moyo
2 min readJun 14, 2021

Almost everyone does online shopping these days. Its convenient and makes shopping more fun for people of all ages.At times though users may need to travel to other cities or countries and may not really know where to get the best clothing for that city/country. This is where smart e-commerce comes in.

Smart e-commerce helps the user know the weather conditions of their destination and also where to buy the right clothes for that particular time. In this tutorial we will be looking at how to create a smart e-commerce recommendation system(chatbot) using python and nextjs. We will be using Nextjs(Reactjs) for the frontend and Rasa nlu for the backend.

Creating our Nextjs Project

Let’s start by creating a Nextjs project. In your terminal make a directory where your app will live. In this directory first create a package.json file using the command npm init -y. Then install nextjs and react by typing the command npm install — save react next. After we should then create a folder called pages where our javascript files will live. In the pages folder make a new file index.js. This will be our main page. This page will contain our rasa bot UI ad will be the page the user uses to communicate with python.

This is what our UI will look like.

In the next part we will be looking at our nextjs code and adding logic to connect to our python servers.

--

--