This project is a web-based e-commerce application built using React, Sass, and Strapi CMS. I built this project as part of my learning journey with these technologies. The application allows users to browse products, add them to cart, and purchase them using Stripe payment gateway.
- Node.js
- Strapi CMS
- Stripe API keys (Test or Live)
- Clone the repository and navigate to the project directory.
- Install the dependencies using
npm install
. - Set up the environment variables in
.env
file located in thefrontend
directory:
REACT_APP_STRIPE_DEV_APP_KEY
: Strapi cms API key for development environment.REACT_APP_STRIPE_APP_DEV_URL
: URL of the backend server for development environment.REACT_APP_STRIPE_PUBLISHABLE_KEY
: Stripe publishable key for payments.
- Run the frontend using
npm start
command in thefrontend
directory. - Set up the environment variables in
.env
file located in thebackend
directory:
HOST
: Server hostname.PORT
: Server port number.APP_KEYS
: Strapi app keys.API_TOKEN_SALT
: Salt for API tokens.ADMIN_JWT_SECRET
: Secret for admin JWT token.TRANSFER_TOKEN_SALT
: Salt for transfer tokens.DATABASE_CLIENT
: Database client.DATABASE_FILENAME
: Database filename.JWT_SECRET
: Secret for JWT token.STRIPE_KEY
: Stripe API key for payments.CLIENT_URL
: URL of the frontend server.
- Run the backend using
npm run develop
command in thebackend
directory.
Open the web browser and navigate to the URL of the frontend server. Browse products, add them to cart, and proceed to checkout. The Stripe payment gateway will be used to process the payment.
Contributions are welcome. Please open an issue or submit a pull request.