Giter Site home page Giter Site logo

velflix's Introduction

Velflix

License

About

Velflix is a Laravel Netflix clone project using TALL stack (Tailwindcss, Alpinejs, Laravel, Livewire ).

Note Work in Progress

Table of Contents

Screenshots

home page

see full page here

movies header

movies

see full page here

Detail movies

Requirements

Package Version
Node V14.19.1+
Npm V6.14.16+
Composer V2.2.6+
Php V8.0.17+
Mysql V 8.0.27+

Installation

Warning Make sure to follow the requirements first.

Here is how you can run the project locally:

  1. Clone this repo

    git clone https://github.com/josuapsianturi/velflix.git
  2. Go into the project root directory

    cd velflix
  3. Copy .env.example file to .env file

    cp .env.example .env
  4. Create database velflix (you can change database name)

  5. Create account and get an API key themoviedb here. Make sure to copy API Read Access Token (v4 auth).

  6. Go to .env file

    • set database credentials (DB_DATABASE=velflix, DB_USERNAME=root, DB_PASSWORD=)
    • paste TMDB_TOKEN=(your API key)

    Make sure to follow your database username and password

  7. Install PHP dependencies

    composer install
  8. Generate key

    php artisan key:generate
  9. install front-end dependencies

    npm install && npm run dev
  10. Run migration

    php artisan migrate
    
  11. Run seeder

    php artisan db:seed
    

    this command will create 2 users (admin and normal user):

    email: [email protected] , password: password

    email: [email protected] , password: password

  12. Run server

    for valet users visit velflix.test in your favorite browser

    php artisan serve
  13. Visit localhost:8000 in your favorite browser.

    Make sure to follow your Laravel local Development Environment.

  14. Newsletter feature configuration (optional)

  • Go to mailchimp
  • Register your account, get API key and paste it into .env file. If you need help, you can follow these steps:
    • Click Sign Up Free
    • Enter your data, check your email and verify
    • select Free, Next
    • Do you have a list of contacts? (NO)
    • Do you sell products or services online? (Neither, Products)
    • continue
  • Go to Profile > Extras > API keys
  • Create a key and copy API key
  • open the velflix project, go to .env file and paste it into MAILCHIMP_KEY=paste API key here
  • Go to web.php and paste this code at the bottom or you can follow the documentation here
   Route::get('ping', function() {
   $mailchimp = new MailchimpMarketing\ApiClient();
   $mailchimp->setConfig([
       'apiKey' => config('services.mailchimp.key'),
       'server' => 'us5',
   ]);

   $response = $mailchimp->lists->getAllLists();
   ddd($response);
   });

make sure you fill in the server correctly, check the link at the top of your admin Mailchimp, for me its https://us5.admin.mailchimp.com/account/api/ so i give the value of server is us5. if you get us6, change the server value to be us6.

  • visit localhost:8000/ping or velflix.test/ping and copy value of id in the "lists" > 0 > "id"
  • open project, in .env file paste the id into MAILCHIMP_LIST_SUBSCRIBERS=paste id here and we ready to go
  • visit localhost:8000 or velflix.test test email for subscribing , and refresh your admin mailchimp it should be Your audience has increased 1 contact.
  1. Setup Laravel Socialite login with Google account (optional)
  • Go to the Google Developers Console get "GOOGLE_CLIENT_ID" and "GOOGLE_CLIENT_SECRET". paste it into .env file. if you need help, you can follow these steps:
  • Click Credentials menu, click "select a project" at the navbar > ALL > No organization > new project.
  • project name 'velflix', location should be no organization > Create.
  • Go to OAuth consent screen menu > Select External and Create
  • App Information > app name 'velflix' choose user support email, fill email in developer contact information, save and continue
  • Go to Credentials menu > click +Create Credentials at the top > select "OAuth Client ID" > select Application type "Web Application" > Name 'velflix'
  • At the Authorized redirect URIs > +ADD URI > paste this into it http://127.0.0.1:8000/login/google/callback > Create.

NOTE: you can change the port to be 8080 or others, but make sure when you run php artisan serve, your project run in the same port.

  • Copy Your Client ID and Your Client Secret
  • Open velflix project, go to .env file and paste it in GOOGLE_CLIENT_ID=paste_here and GOOGLE_CLIENT_SECRET=paste_here and we ready to go
    php artisan serve
  • let's test, visit the project in your browser > Login > Login Google > choose account > and if success, it should be redirect to the movies page.

Let me know if you get in trouble.

Testing

Warning Every time you run testing, you should run php artisan db:seed first

    ./vendor/bin/pest

movies

Cypress ( E2E Testing )

  1. Run the cypress:boilerplate command to copy over the initial boilerplate files for your Cypress tests.

        php artisan cypress:boilerplate
  2. Let's run it now

        npx cypress open

Contributing

Pull requests are welcome.

License

Velflix is an open-sourced software licensed under the MIT license

velflix's People

Contributors

dependabot[bot] avatar imgbotapp avatar josuapsianturi 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.