eCommerce application based on the microservices architecture built using Spring Boot and ReactJS.
eCommerce application based on the microservices architecture built using Spring Boot and ReactJS.
DEMO
Deployed to Heroku Cloud:
https://shoppers-ecom-app.herokuapp.com
Note: It is running on a free dyno, so the services go to sleep if not in use. For the first time, it may take some time to respond.
FEATURES
TOOLS USED
MICROSERVICES
Steps for executing the application using docker-compose:
Installation Video: https://youtu.be/nPKYbdKPd0E
Clone/Download the repository.
Set the environmental variables which will be impacted on docker-compose.yml.
Rename the file ".env-sample" to ".env".
(Optional Step) You need to create a Stripe account and Google OAuth credentials.
The application works even if you don't create this account, only the payment and OAuth functionality will not work.
These accounts doesn't charge you anything and are absolutely free.
You need to set below two env variables.
REACT_APP_STRIPE_PUBLISH_KEY=<Your Stripe Publishable Key>
Go Here to create a Stripe account.
REACT_APP_GOOGLE_AUTH_CLIENT_ID=<Your Google AUTH Client ID>
Go Here to create Google OAuth Credentials.
Build all the microservices and run the app using docker-compose. This is done using ./start-all.sh script which creates the network and set the container dependencies based on the config mention in the docker-compose.yml. This will build all the jar files and run all the services.
./start-all.sh
If you are making any change in the code then you need to you ./stop-all.sh to clean up the jars created by ./start-all.sh script.
Payment Service Test Details:
Credit card no.: 4242 4242 4242 4242
Expiry: Any future date
CVV: Any 3-digit number
Steps to deploy on Heroku using docker-compose:
create heroku.yml as docker-compose.yml is not invoked on Heroku.
If the application contains a database then install MySQL or any other database
from Heroku marketplace[https://elements.heroku.com].
Note: Before installing you need to add credit/debit card info. Without this it
won't allow you to install the database.
Set the config vars based on the database URL.
Set the stack:container for the application in order to build with docker-compose.
heroku stack:set container -a <application-name>
Deploy individual service on Heroku.
References