Skip to content

Lagnajit09/react-E-Commerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An E-commerce application using ReactJS and Strapi(for Backend, database and API)

This project was bootstrapped with Create React App.

Visit Template for the Frontend part to build your own e-commerce application.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

Download the project zip folder and unzip it at

C:\Users\HP\Desktop\E-commerce\client

Install node modules in the project directory using the command

npm install -g node-modules

For Strapi, create a 'api' folder at root directory i.e.

C:\Users\HP\Desktop\E-commerce

In the terminal, cd ../api

For installing Strapi, run npx create-strapi-app@latest .

Run and give the database details for the application. Finally run npm develop

My Database design:

Untitled

The relations are many-to-many between products, categories and subCategories. Then you can add your data in the content-manager section.

Go to Settings->API Tokens

Finally, copy your API token and paste in the .env file in the src folder.

.env file

  REACT_APP_API_TOKEN = *your-api-token* 
  REACT_APP_API_URL = http://localhost:1337/api
  REACT_APP_UPLOAD_URL = http://localhost:1337

HOME PAGE

Screenshot 2024-01-16 215644 Screenshot 2024-01-16 215757

CATEGORY PAGE

Screenshot 2024-01-16 215824

PRODUCT PAGE

Screenshot 2024-01-16 215846