Disclaimer: All logos and brand names used in this project are the property of their respective companies and are used here for educational purposes only. I do not claim ownership of any logos or brand names referenced in this project.
Grocery stores are an integral part of cultures worldwide. Creating a 3D grocery store, even if currently only interactable through the web, opens the possibility for further development into VR. In VR, users could "walk" through the store and shop as they would in a traditional grocery store.
I am passionate about transforming real-life walk-through experiences, such as museums and shopping centers, into 3D environments, especially on the web. Having previously created a virtual museum, I wanted to challenge myself by creating a grocery store this time.
-
Clone the repository:
git clone https://github.com/yourusername/your-repository-name.git
-
Change directory into the project folder:
cd GroceryStore -
Install the node modules:
npm install
-
Build the files:
npm run build
-
Run the Express.js server:
node server.js
-
Open the localhost it is hosted at (default on port 3000).
-
Use left and right arrow keys to "scroll" through the different products!!
-
Open the following file in a text editor:
src/components/data/database.json
-
To add a new product, choose a product category then add a product to it. Each product should have the following attributes:
name,type(brand),nutrition,price,quantity,image,model_type(box or cylinder types supported for now),scale(a 3D scale), androwsOfProduct(to show that certain products are getting sold more than others). Here's an example of a product:
{
"name": "Lucky Charms",
"type": "General Mills",
"nutrition": {
"calories": 110,
"protein": 2,
"fat": 1,
"sodium": 180,
"fiber": 0,
"carbs": 10,
"sugars": 10,
"potassium": 45,
"vitamins": "A, C, D, E, B6, B12",
"minerals": "Iron, Zinc, Calcium"
}
}- To add a new product category, you need two keys:
typeanddata.typeis the name of the product category, anddatais an array of products. To see how to make a new product, see the above point.
{
"type": "breakfast_cereals",
"data": [
{
"name": "Lucky Charms",
"type": "General Mills",
"nutrition": {
"calories": 110,
"protein": 2,
"fat": 1,
"sodium": 180,
"fiber": 0,
"carbs": 10,
"sugars": 10,
"potassium": 45,
"vitamins": "A, C, D, E, B6, B12",
"minerals": "Iron, Zinc, Calcium"
}
}
]
}

