Skip to content

Commit ca3a3f0

Browse files
Made changes to README.md
1 parent 8a56086 commit ca3a3f0

File tree

1 file changed

+64
-71
lines changed

1 file changed

+64
-71
lines changed

README.md

Lines changed: 64 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,108 @@
11
# spring-boot-react-ecommerce-app
2-
Ecommerce application based on microservice architecture built using Spring-boot (back-end) and React JS (front-end).
2+
eCommerce application based on the microservices architecture built using Spring-boot (back-end) and React JS (front-end).
33

44
**DEMO**
5-
- Deployed to Heroku Cloud:
6-
7-
https://shoppers-ecom-app.herokuapp.com
5+
- Deployed to Heroku Cloud:
6+
7+
https://shoppers-ecom-app.herokuapp.com
8+
9+
**Note:** It is running on a free dyno, so the services go to sleep if not in use.
10+
For the first time, it may take some time to respond.
811

9-
**Note:** It is running on a free dyno, so the services goes to sleep if not in use.
10-
For the first time it may take some time to responds.
11-
1212
**FEATURES**
1313

14-
- Google OAuth 2.0 support for a quick login.
15-
- Regular Username/Password authentication.
16-
- Search bar and Search suggestions help to find products quickly.
17-
- Stores user information in MySQL database.
18-
- Stores API data in Redis Cache to minimize network calls.
19-
- Select filters to display products based on the selections.
20-
- Sort products by popularity, newest and prices.
21-
- Pagination to display max products on a single page.
22-
- Stores authentication details like token information in cookies.
23-
- Store cart's products information in cookies.
24-
- Payment service using Stripe's API to buy products.
25-
14+
- Google OAuth 2.0 support for quick login.
15+
- Regular Username/Password authentication.
16+
- Search bar and Search suggestions help to find products quickly.
17+
- Stores user information in the MySQL database.
18+
- Stores API data in Redis Cache to minimize network calls.
19+
- Select filters to display products based on the selections.
20+
- Sort products by popularity, newest, and prices.
21+
- Pagination to display max products on a single page.
22+
- Stores authentication details like token information in cookies.
23+
- Store cart's product information in cookies.
24+
- Payment service using Stripe's API to buy products.
25+
2626
**TOOLS USED**
2727

28-
- **ReactJS:** Front-end Javascript framework.
29-
- **Spring-boot 2.0:** Back-end JAVA framework to build microservices using Spring
30-
Rest Controller and Spring JPA.
31-
- **Material-UI:** Used Google's material design based on CSS Framework for a responsive website.
32-
- **Semantic-UI:** Used some components which Material-UI doesn't support.
33-
- **MySQL:** Stores product and user information.
34-
- **Redis:** Stores API data in key-value pairs.
35-
- **Cloudinary:** CDN server for storing product images.
36-
- **Google OAuth:** 3rd Party authentication service for quick login by retrieving user profile information.
37-
- **Stripe:** Payment service API to handle user payment requests.
38-
- **Heroku Cloud Platform:** Deploying microservices on Heroku.
39-
- **Docker-Compose:** Easy way to bring up the application using containerization
40-
and behaves similar in production environment.
41-
28+
- **ReactJS:** Front-end Javascript framework.
29+
- **Spring-boot 2.0:** Back-end JAVA framework to build microservices using Spring
30+
Rest Controller and Spring JPA.
31+
- **Material-UI:** Used Google's material design based on the CSS Framework for a responsive website.
32+
- **Semantic-UI:** Used some components which Material-UI doesn't support.
33+
- **MySQL:** Stores product and user information.
34+
- **Redis:** Stores API data in key-value pairs.
35+
- **Cloudinary:** CDN server for storing product images.
36+
- **Google OAuth:** 3rd Party authentication service for quick login by retrieving user profile information.
37+
- **Stripe:** Payment service API to handle user payment requests.
38+
- **Heroku Cloud Platform:** Deploying microservices on Heroku.
39+
- **Docker-Compose:** Easy way to bring up the application using containerization and behaves similarly in the production environment.
40+
4241
**MICROSERVICES**
4342

44-
- **React-UI Service:** Front-end client UI which displays data and makes API calls using Axios API.
45-
- **Common Data Service:** Handles client request to provide common data such as product, filters, categories and order information etc.
46-
- **Authentication Service:** Creates user account and handles username/password authentication.
47-
- **Payment Service:** Handles payment request from the client and makes subsequent request to Stripe API
48-
for money deduction.
49-
- **Search Suggestion Service:** Provide default search suggestions and provides suggestions based on a prefix
50-
using Hashmap. The service creates the Hashmap based on available data from the database with various combination
51-
and populates the map.
43+
- **React-UI Service:** Front-end client UI which displays data and makes API calls using Axios API.
44+
- **Common Data Service:** Handles client request to provide common data such as product, filters, categories and order information, etc.
45+
- **Authentication Service:** Creates user account and handles username/password authentication.
46+
- **Payment Service:** Handles payment requests from the client and makes a subsequent request to Stripe API
47+
for money deduction.
48+
- **Search Suggestion Service:** Provide default search suggestions and provides suggestions based on a prefix using Hashmap. The service creates the Hashmap based on available data from the database with various combinations and populates the map.
5249

53-
**Steps for executing application using docker-compose:**
50+
**Steps for executing theapplication using docker-compose:**
5451
1. Clone/Download the repository.
5552

5653
2. Set the environmental variables which will be impacted on docker-compose.yml.
57-
You can check .env-setup file. Most of the variables are already set.
58-
You need to create Stripe account and Google OAuth credentials.
54+
You can checkthe .env-setup file. Most of the variables are already set.
55+
You need to create a Stripe account and Google OAuth credentials.
5956
These accounts are doesn't charge you anything and are absolutely free.
60-
57+
6158
You need to set below two env variables.
62-
59+
6360
REACT_APP_STRIPE_PUBLISH_KEY=<Your Stripe Publishable Key>
64-
65-
Go [Here](https://dashboard.stripe.com/register) to create Stripe account.
66-
61+
62+
Go [Here](https://dashboard.stripe.com/register) to create a Stripe account.
63+
6764
REACT_APP_GOOGLE_AUTH_CLIENT_ID=<Your Google AUTH Client ID>
68-
65+
6966
Go [Here](https://console.developers.google.com) to create Google OAuth Credentials.
7067

71-
3. Build all the microservices and run the app using docker-compose. This is done using ./start-all.sh script which creates
72-
the network and set the container dependencies based on the config mention in the docker-compose.yml.
68+
3. 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.
7369
This will build all the jar files and run all the services.
7470
```
75-
./start-all.sh
71+
./start-all.sh
7672
```
7773

78-
4. If you are making any change in the code then you need to you ./stop-all.sh to clean up
79-
the jars created by ./start-all.sh script. Also, you need to remove the images from the docker
80-
otherwise it will occupy the image spaces unnecessarily.
81-
74+
4. 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. Also, you need to remove the images from the docker otherwise it will occupy the image spaces unnecessarily.
75+
8276
You can check docker images with below command
8377
```
84-
docker images
78+
docker images
8579
```
86-
Remove multiple docker images
80+
Remove multiple docker images
8781
```
88-
docker images -a | grep -E "ecommerce|none" | awk '{print $3}' | xargs docker rmi -f
82+
docker images -a | grep -E "ecommerce|none" | awk '{print $3}' | xargs docker rmi -f
8983
```
9084

91-
**Steps to deploy on heroku using docker-compose:**
85+
**Steps to deploy on Heroku using docker-compose:**
9286

93-
1. create heroku.yml as docker-compose.yml is not invoked on heroku.
87+
1. create heroku.yml as docker-compose.yml is not invoked on Heroku.
9488

95-
2. If the application contains database then install mysql or any other database
96-
from heroku marketplace[https://elements.heroku.com].
97-
89+
2. If the application contains a database then install MySQL or any other database
90+
from Heroku marketplace[https://elements.heroku.com].
91+
9892
Note: Before installing you need to add credit/debit card info. Without this it
99-
wont allow you to install the database.
93+
won't allow you to install the database.
10094

101-
3. Set the config vars based on the database url.
102-
95+
3. Set the config vars based on the database URL.
96+
10397
4. Set the stack:container for the application in order to build with docker-compose.
10498
```
10599
heroku stack:set container -a <application-name>
106100
```
107-
101+
108102
5. Deploy individual service on Heroku.
109103

110104

111-
**References**
105+
**References**
112106
1. https://spring.io/blog/2015/06/08/cors-support-in-spring-framework
113107
2. https://devcenter.heroku.com/articles/build-docker-images-heroku-yml
114108
3. https://material-ui.com/
@@ -129,4 +123,3 @@ Ecommerce application based on microservice architecture built using Spring-boot
129123
18. https://stripe.com/docs
130124
19. https://developers.google.com/identity/protocols/oauth2
131125
20. https://devcenter.heroku.com/articles/heroku-redis
132-

0 commit comments

Comments
 (0)