https://netflix-523e3.web.app/
Before using this project, you will need to have installed Node.js, git, redux, tailwind, npm or yarn,
Front-End
$ git clone https://github.com/michal9108/netflix-reactjs-tailwind.git
$ cd netflix-reactjs-tailwind.git
$ npm install or yarn install
$ npm i qrcode or yarn add qrcode
The application will be listening on port 3000. Open http://localhost:3000 to view it in your browser.
Back-End
Firebase Setup
.js
fileWeb app
.$ npm install firebase or yarn add firebase
Firebase SDK's
to your newly created .js
file..env
file and paste there values of yourFirebase SDK's
Firebase Authentication
import { getAuth } from "firebase-auth";
and
export const auth = getAuth(app); //needed to be used in the context file, modify context file accordingly
3 Create Authentication context .js file within new project folder - context.
Firestore Database - cloud for storage
import { getFirestore } from "firebase/firestore";
and
export const db = getFirestore(app); //needed to be used in the context file, modify context file accordingly
$ firebase login
2.Choose your google account
3.Go to Firebase Hosting
4.Continue > Hosting > Get started 5. Install Firebase on your CLI
$ Install firebase CLI npm install -g firebase-tools
$ yarn run build
or
$ npm run build
$ firebase init
CLI - Choose Hosting
Configure files for Firebase Hosting and (optionally) set up Github Action deploys
Use existing project
What do you want to use as your public directory? build
Configure as a single-page app (rewrite all urls to /index.html)? No
Set up automatic builds and deploys with GitHub? (y/N) y
For which GitHub repository would you like to set up a GitHub workflow? (format: user/repository)
14.what script shoud run before every deploy? npm ci && npm run build
15.Set up automatic deployment to your site's live channel when a PR is merged y
What is the name of the GitHub branch associated with your site's live channel? - main
Start Deploy process:
$firebase deploy
Dir src contains
1.components - ReactJS components
2.context - Context needed for Firebase Authorisation
3.page - Different pages of the application
For detailed explanation on how things work, check out the react.js, and Firebase documentation.