Store front for the band Generics that makes bank through the super-cool Stripe API!
Hosted at: https://generics.herokuapp.com
Stripe test card numbers: https://stripe.com/docs/testing#cards
-
Install Node Package Manager (NPM) by installing Node.js
-
From the terminal go to the project folder and run
npm install
- Ensure you have the following settings in an .env file in the project folder (or in .bashrc)
STRIPE_SECRET_KEY=<Stripe secret key>
STRIPE_PUBLIC_KEY=<Stripe Public key>
- Run the following command to start the app
npm start
- in the browser type localhost:3000
I focused mainly on demonstrating how Stripe enables a technical win for the business use case of E-commerce payments. To that end,
- I looked at relevant Stripe docs.
-
Found a basic template for a store front online.
-
Integrated required Stripe APIs in the right places to enable an end-to-end payments workflow:
- Hosted the demo on Heroku
While I'm quite comfortable with these technologies, the reason I picked them is they work well together as part of an ecosystem to deliver value. Agile Manifesto #10 comes to mind:
Simplicity - the art of maximizing the amount of work not done - is essential
While the app demonstrates the value proposition, if I had to broaden the immediate scope:
- I'd rewrite the HTML/JQuery front-end template in a component based technology like React or Angular to enhance responsiveness and maintainability.
- Separate the Stripe code into modules and add unit tests (in Jest or Mocha, maybe use Sinon.JS for fakes). This could also have value as documentation for unit testing with Node.js + Stripe API integration.
- Move the data to a DB, as opposed to having it come from items.json. The DB could be built out to serve as a central store for other apps demoing E-commerce use cases.