GithubHelp home page GithubHelp logo

doesdevstuff / demonslayerflix Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.43 MB

DemonSlayerflix is a frontend Netflix clone but DemonSlayer-fied. It is built with React JS and uses the TMDB API to pull in data and images.

Home Page: https://demonslayerflix-b1913.web.app

HTML 13.01% CSS 23.40% JavaScript 63.59%

demonslayerflix's Introduction

DemonSlayerflix

DemonSlayerflix is a frontend Netflix clone but Demon Slayer-fied. It is built with React JS and uses the TMDB API to pull in data and images.

Introduction

This is a practice project to brush up on my skills in creating a react application and deploying it with firebase. This is DemonSlayerFlix, a frontend clone of Netflix's home page made just for the amazing anime series Demon Slayer

The basics

To create the skeleton of the react-app here are the commands to use (assuming you have node modules installed and up to date) :

  1. npx create-react-app <your-app-name> // This will load all the modules you will need
  2. cd <your-app-name>
  3. npm start
Firebase hosting

After setting up the basic react app we moved to hosting it, this allows us to then create the API key for TMDB as well.
Since we're hosting this on firebase we created a new project in Firebase and then navigated to setting up the hosting for our app.
Set an appropriate name for you app and then follow the commands listed below -

  1. npm install axios
  2. npm install firebase
  3. npm install -g firebase-tools
  4. firebase login

--=

After that we build our static site with :

  1. npm run build

Once the build is successful we are ready to initialise the firebase, to do we run the following :

  1. firebase init

This should give us a few options:

Project Setup:

  • ? Are you ready to proceed? Yes

  • ? Which Firebase features do you want to set up for this directory? Press Space to select features, then Enter to confirm your choices. Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys


Hosting Setup:

  • ? Please select an option: Use an 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)? Yes

  • ? Set up automatic builds and deploys with GitHub? No

  • ? File build/index.html already exists. Overwrite? No

Finally we can deploy our app using :

  1. firebase deploy

If you make any changes after this to your app remember to rebuild and the re-deploy the app using :

  • npm run build
  • firebase deploy

Frontend Clone - HomePage

LIVE DEMO - demonslayerflix-b1913.web.app OR demonslayerflix-b1913.firebaseapp.com

React Open Source? Yes! Firebase

Screenshot


Built With

Running the application yourself

Here's what you need to do to get this running locally on your computer.

  1. Register for a TMDB API key by following the instructions here to be able to use the API to pull in data and images displayed on the site
  2. Add the API key in this line in the request.js file
    const API_KEY = 'paste key in here'
  3. In the command line inside of the application's folder, run
    npm start
  4. Open http://localhost:3000 to view it in a browser

How to hide the API Key when uploading to any opensource platform :

  1. npm install dotenv
  2. Create a .env file in the root directory here is where we store the secret key.
  3. (IMP: every variable you define in the .env file should start with REACT_APP_)
    eg: REACT_APP_ACCESS_KEY=<insert_your_api_token>
  4. Now you can use the variable in any of your components like so const API_KEY = process.env.REACT_APP_ACCESS_KEY;
    The name should match the key given in the .env file
  5. Restart the local server using npm start. This step applies whenever you make changes to the .env file.
  6. Optionally, check if .env entry is present in .gitignore file. If the entry of .env exists in .gitignore then your .env file will not be pushed to github.

demonslayerflix's People

Contributors

doesdevstuff avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.