Simple react demo store for showcasing Voucherify abilities.
Add your Voucherify
Application ID and
Application Secret Key to your environment variables. We're using Heroku Redis to store client sessions. Provide
REDIS_URL to your environment variables or use another method to store session data.
Your environment variables should look like this:
The fastest way to install the demo store is to clone this project, set up a Heroku web application, add Heroku Redis extension, and then configure environment variables. After that, you can deploy this cloned store directly into your Heroku web application.
After deployment, the script runs post-install where it populates your Voucherify account with custom products, validation rules, campaigns, and vouchers.
Setup correct env and env.development values:
In the project folder run,
npm install to set up the Application. After that, run
npm run setup to create Campaigns, Products Validation Rules, and Validation Rules assignment.
After setting up run
npm start to serve the entire application from port 3000
for development mode you now need to run two processes (i.e. 2 terminal tabs)
npm run dev-server - this will start your server at localhost:3000 (it'll restart automatically upon any changes in server.js)
npm run dev
this will start the react-scripts server at localhost:3001 => which is how you open up the app in the browser
server.jsto learn more about how we use Voucherify API to validate and redeem coupons and process payments.
Remember to add
Your website URL or
* to Client-side Settings of your project in Voucherify.
Feel free to contact me regarding any demo store issues - piotr.gacek[at]voucherify.io