Skip to content

Commit f3f6070

Browse files
authored
Update README.md
1 parent bf9d43e commit f3f6070

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

README.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,102 @@
22

33
## SPA link : https://nike-10001.web.app/
44

5-
This Full Stack Nike shoes e-commerce SPA (single page application) includes user authentication, user tracking, react routing, react hooks, react-context API, react dom manipulation, reusable components, react slick implementation, device responsiveness, dummy payment gateway API integration and the SPA's deployment on Firebase.
5+
This Full Stack e-commerce SPA (single page application) includes user authentication, user tracking, react routing, react hooks, react-context API, react dom manipulation, reusable components, react slick implementation, device responsiveness, dummy payment gateway API integration and the SPA's deployment on Firebase.
6+
67

78
### Dependencies used:
9+
810
-> npm (Node's packet manager)
11+
912
-> create-react-app (for default react js project setup)
13+
1014
-> react-dom
15+
1116
-> react-router-dom (for implementing SPA's page routing without page refresh)
17+
1218
-> react-slick (for implementing slick carousel)
19+
1320
-> react-currency-format (to standardize the calculated price of the total items)
21+
1422
-> react-stripe-checkout (to implement a dummy payment gateway API's integration)
23+
1524
-> material-core
25+
1626
-> material-ui (icon components)
27+
1728
-> firebase (for user authentication and tracking purposes and hosting the web app)
1829

30+
1931
### Repository Folder Structure:
32+
2033
-> build: Generated output compressed folder on running the 'npm run build' command for web app's production purposes.
34+
2135
-> public: Contains the index.html file which is used for lesser common purposes, but remains unchanged in this project.
36+
2237
-> src: Contains all the js and css files and subdirectories involved in the creation of the project.
38+
2339
-> firebase.json: This file is the root of the project directory created automatically by Firebase on running the 'firebase init' command.
40+
2441
-> package-lock.json: Generated automatically for any operations where npm modifies either the node-modules tree or package.json.
42+
2543
-> package.json: This file holds all the packages and dependencies required by the project.
2644

45+
2746
### Basic steps involved to create and deploy the project to production:
2847
1) Install a text editor of your choice (VS code is my preferance).
48+
2949
2) Slide in the CLI (Command Line Interface) and install react's framework provided by Facebook by running the command 'npm install -g create-react-app'
50+
3051
3) Now to install the default necessary dependancies of a react js project, navigate into the path where you would like to create the project and run the command 'create-react-app name_of_your_app'
52+
3153
4) Navigate into the folder and install the other libraries and dependancies which your project will require. ( npm install react-dom react-router-dom react-slick react-slick react-currency-format react-stripe-checkout), in my case.
54+
3255
5) npm install @material-ui/core
56+
3357
npm install @material-ui/icons
58+
3459
Run the above commands if your project requires material UI components.
60+
3561
6) Open the react js folder in your IDE and do some default clean-up work.
62+
3663
7) Create a components folder in your src folder and start creating the components of your project.
64+
3765
8) Make sure you use Browser Router, Route, Switch, Link and NavLink in your project to implement your SPA routing without page refresh.
66+
3867
9) Create a Firebase account with your google account.
68+
3969
10) Go to console in Firebase and add a new project. Complete the basic firebase project creation steps. Make sure you select checkbox of app hosting.
70+
4071
11) Then go to the project settings of your firebase project and look for Firebase SDK snippet in it. Select the config part and copy the firebase config snippet.
72+
4173
12) Create a new javascript file in the src folder of your react project naming 'firebase.js'. Export the authentication and database instances by using the firebase config snippet keys copied in the previous step. Use these exports in your project wherever you require them for authentication and realtime database creation and manipulation purposes.
74+
4275
13) To avoid the headache of prop-drilling you can use either React's context API or Redux as per your requirement and convenience. (In this project I used React's Context API)
76+
4377
14) Also, in your firebase project, enable the required sign-in method for the authentication your project uses.
78+
4479
15) If your project requires payment processes (dummy payments in my project), then integrate any payment gateway API in your project. (I used stripe in my project).
80+
4581
16) After the completion of your project, the next step is to deploy your project to production. We can do this using firebase hosting.
82+
4683
17) Open up the terminal of your IDE and run the command 'firebase login' command if this is your first time hosting an app on firebase. Do the default login steps and enable the scripts' access rights through your Windows Powershell.
84+
4785
18) Then run the command 'firebase init' to which creates and adds a firebase.json file in the root of your project. It is also required to deploy the assets used by your project with the firebase CLI.
86+
4887
19) Navigate to the hosting method from the options generated on running the 'firebase init' command amd press 'Spacebar' on your keyboard to select the option and then press enter.
88+
4989
20) Then from the options given further, select 'use an existing project'. And then select your firebase project.
90+
5091
21) In the next step type the 'build' command in your terminal and then type 'Y' to configure the app as an SPA.
92+
5193
22) Run the following command in the next step;
94+
5295
npm run build
96+
5397
23) On execution of the previous command, it will generate an optimized production build version of your entire app project in the form of a folder named 'build' in your root directory.
98+
5499
24) The final step is to run 'firebase deploy' command and on execution of it you will get an http link of your deployed app.
100+
55101
25) You can also get the link of your deployed app from your firebase project.
102+
56103
26) In the meanwhile, if you ever change any bit of code later on, you need to run the 'npm run build' command again.

0 commit comments

Comments
 (0)