π DEVANG SHARMA π
π Linktree: https://linktr.ee/idevangsharma
This Project was Made in Masterclass by Devang Sharma in Collaboration with Newton School.
This project was bootstrapped with Create React App.
An amazing TESLA clone built using React JS for frontend and Firebase for Backend ππ
.
β
Introduction- DONE
Date : 3rd April 2022
Mentor: DEVANG SHARMA
Batch: NEWTON SCHOOL
Agenda : Tesla - Product Overview, Clone, and Hosting
β
Introduction :
β
Live Demo of Clone- Web Version
β
Scope and Definition
β
Tesla as a Product
β
Requirement clarification
(1) Functional
(2) Non Functional
(3) Out of Scope
β
Intro to React Js
β
Environment Setup- VS Code
β
Useful Extensions
β
Github Account
β
Create Repo: Tesla clone by devang [first name]:
β
Steps:
(1) Create App:
(2) Setup Firebase:
(3) Setup React Router: IMPORTANT and Its Use Cases (No Refresh- SPA with Multiple Pages):
(4) Build Nav Bar (Header) - STICKY
(5) Build Banner
(6) Product Component
(7) React Context API/ Redux
(8) Add to Basket Button
(9) Checkout Page
(10) Subtotal Component
(11) Login Page
(12) Deploy Page LIVE on Firebase
β
BEM Model in CSS (Block, Element, Modifier)
β
Heroku Account:
β
Firebase Account:
"Please Type 'Hi' in the Chat Box if you have joined and Can See this Screen". "We Will Start immediately After Every one has joined the session"
-> Introduction : DONE
-> Live Demo of Tesla: DONE
-> Live Demo of Clone- Web Version - DONE
-
Install Node and Npm (Node Package Manager) in your System - DONE
(https://nodejs.org/en/download/)
Check With: node -v and npm -v -
Diff between npm create and npx create
(npm install -g create-react-app --template redux)
(npx create-react-app tesla-clone-by-devang)
Redirect URI- http://localhost:3000/ - DONE
https://chrome.google.com/webstore/detail/colorzilla/bhlhnicpbhignbdhedgjhgdocnmhomnp/related?hl=en
(Type rfce and Enter)
(PRO Tip to Make Responsive Web Pages)
- DO NOT PUSH Node-Modules
Two Methods:
(1) Github Desktop
(2) Git Command
git status
git add . (Don't Use Node Modules)
git commit -m "Added Tesla Clone"
git push
(1) Create Profile On Heroku
(2) Create Repo
(3) Create Heroku App
(4) Select Region - US ot Europe
(5) Select Github Repo
(6) Deploy on Heroku
Build Will be Successful and Tesla Clone would be published to a LIVE Website.
(1) Post About in Linkedin
(2) Github Link and recording
(3) Certificate
(4) Newton School
Front-End:
Client Side:
- What you See/Experience as a User ?
(UI and UX)
UI: User interface
UX: User Experience
π Front End:
- Languages: HTML, CSS, JS, Typescript
- Frameworks: React, Angular, Vue
π BackEnd:
- Languages: Java, Node.js, Python, C++, C# etc
- Framework: Django, Flask, Spring Boot etc
π Mobile Application:
- Android (Google): Java, Kotlin
- iOS (Apple): Swift
π New things: Flutter, React Native : BOTH for Android and iOS
π Tesla Clone:
- Front End: React js with Redux
- Back End: Firebase
(1) Header
- Tesla Logo
- Navigation Bar:
- Model X
- Model Y
- Model S
- Hamburger Menu: List of Items
(2) Body:
- Different Products
Each Product:
- Bg Image
- Name of Model
- Order Online for Touchless Delivery
- 2 Buttons: (1) Custom Order (2) Existing Inventory
- Arrow Down Icon (Except On Last Page)
(21) User Profile:
- User Details
- Name
- Geoloaction (Lat, Long)
- Profile Picture
- Saved (Cart Items)
(2) Authentication:
- Sign Up (Create New Username and PW)
- Login (Match Username with PW)
Client ---> Username + PW ----> jkhghdjsg27863787897912 --> Server
{ username: devang@gmail.com PW: devang }
devang ---> jkhghdjsg27863787897912: ENCRYPTION
If Correct, Login Else, Incorrect Password
- Firebase: Set of Tools/Suite of Tools
- Firebase: Database
- Firebase: Authentication
- Firebase: Storage
- Firebase: Hosting
- Firebase: Messaging
- Firebase: Realtime Database
Link: https://firebase.google.com/
- Add Project
- Configure Google Analytics
- Register the App with Hosting
- npm install firebase
- sudo npm install -g firebase-tools
Link: https://console.firebase.google.com/
(1) Clone the Repo
(2) Install Dependencies
Command: npm install
(3) Run the App
Command: npm start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
BackEnd: FIREBASE: DONE
- Firebase: Set of Tools/Suite of Tools
- Firebase: Database
- Firebase: Authentication
- Firebase: Storage
- Firebase: Hosting
- Firebase: Messaging
- Firebase: Realtime Database
Free Hosting:
- Heroku
- Netifly
- AWS
- Github Pages
Firebase Setup:
(1) https://firebase.google.com/ Go to Console
Tesla Key:
// For Firebase JS SDK v7.20.0 and later, measurementId is optional const firebaseConfig = { apiKey: "AIzaSyAHMFvnrKGjcYhhz3OsB6SQwLsYFSX_su4", authDomain: "tesla-clone-b5fee.firebaseapp.com", projectId: "tesla-clone-b5fee", storageBucket: "tesla-clone-b5fee.appspot.com", messagingSenderId: "33288283283", appId: "1:33288283283:web:197d797196016b71415966", measurementId: "G-C6FSML87Q7" };
Group Photo: DONE
-> First React App
- Install Node and Npm (Node Package Manager) in your System (https://nodejs.org/en/download/)
Check With: node -v and npm -v
- Diff between npm create and npx create (npm install -g create-react-app)
Choose Any Folder: (npx create-react-app tesla-clone-by-devang)
Redux Template: (npx create-react-app tesla-clone-by-devang --template redux)
Code: npm start
-> Accounts Required : Github, Firebase or Heroku-
Redirect URI- http://localhost:3000/ - DONE
-> Coding, Coding and Coding: MOST Imp and Fun: 1 Hr 15 Mins-
-> Push to Github: 5 Mins-
-> Hosting on Heroku (Deployment on Prod): 10 Mins-
-> npm install and npm start commands (Local and Prod Builds)-
LIVE DEMO of Clone We Will Build:
---> React Routers:
Install:
npm install react-router-dom@5
OR
yarn add react-router-dom@5
---> NAV BAR
-> Tesla Logo:
(1) react-reveal Package
https://www.npmjs.com/package/react-reveal
npm install react-reveal --save
(2) styled-component
npm install styled-component --save
(3) material-ui
npm install material-ui --save
-> ColorZilla Chrome Extension
-> Es7 VS Code Extension (Type rfce and Enter)
-> object-fit: contain
(PRO Tip to Make Responsive Web Pages)
LIVE DEMO of Clone We Will Build:
CODING:
- Create Login Page
Flipkart -> Pay -> Paytm -> Payment -> Flipkart
Github Push
- DO NOT PUSH Node-Modules
Two Methods: (1) Github Desktop (2) Git Command
git status git add . (Don't Use Node Modules) git commit -m "Added Tesla Clone" git push
Host on Heroku (1) Create Profile On Heroku (2) Create Repo (3) Create Heroku App (4) Select Region - US ot Europe (5) Select Github Repo (6) Deploy on Heroku
Ending:
(1) Post About it on Linkedin: DONE (2) Github Link and recording (3) Certificate (4) Newton School
Client -Server Architecture
Dine in a Restaurant ?
"I want a Cheese Margharita Pizza"
Client: Making Request: Me
Server: Give Response: Kitchen
- Logic: Add Cheese + margharita to the topping
- DB: Ingredients + Crust + ....
API: Get Results from Server and Give it to Client: Waiter
UI: Size of Pizza, Looks, ...
UX: Taste of Pizza, How Crusty it is....
Front End:
- Languages: HTML, CSS, JS, Typescript
- Frameworks: React, Angular, Vue
BackEnd:
- Languages: Java, Node.js, Python, C++, C# etc
- Framework: Django, Spring Boot etc
Mobile Application:
- Android (Google): Java, Kotlin
- iOS (Apple): Swift
New things: Flutter, React Native : BOTH for Android and iOS
This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Note: this is a one-way operation. Once you eject
, you canβt go back!
If you arenβt satisfied with the build tool and configuration choices, you can eject
at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject
will still work, but they will point to the copied scripts so you can tweak them. At this point youβre on your own.
You donβt have to ever use eject
. The curated feature set is suitable for small and middle deployments, and you shouldnβt feel obligated to use this feature. However we understand that this tool wouldnβt be useful if you couldnβt customize it when you are ready for it.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
βοΈ All Credits Owned and reserved by DEVANG SHARMA, and in Collaboration with Newton School. Must Seek Author Approval before use.
βοΈ From DEVANG SHARMA