├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── .styleci.yml ├── README.md ├── app ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── AboutController.php │ │ ├── Auth │ │ │ └── LoginController.php │ │ ├── Controller.php │ │ ├── HomeController.php │ │ ├── PreviewController.php │ │ ├── SettingsController.php │ │ └── StreamController.php │ ├── Kernel.php │ ├── Livewire │ │ ├── Followed.php │ │ ├── Settings.php │ │ ├── Streams.php │ │ └── Traits │ │ │ └── FormatStreamsTrait.php │ └── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php ├── Models │ └── User.php └── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── queue.php ├── services.php ├── session.php ├── twitch-api.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ └── 2019_08_19_000000_create_failed_jobs_table.php └── seeders │ └── DatabaseSeeder.php ├── package-lock.json ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── css │ └── app.css ├── favicon-mask.svg ├── favicon.svg ├── index.php ├── js │ ├── app.js │ └── app.js.LICENSE.txt ├── mix-manifest.json ├── og.png ├── robots.txt └── web.config ├── resources ├── css │ └── app.css ├── js │ └── app.js ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── about.blade.php │ ├── components │ ├── link.blade.php │ ├── logo.blade.php │ ├── primary.blade.php │ ├── secondary.blade.php │ └── title.blade.php │ ├── index.blade.php │ ├── layouts │ ├── default.blade.php │ └── stream.blade.php │ ├── livewire │ ├── followed.blade.php │ ├── settings.blade.php │ └── streams.blade.php │ ├── preview.blade.php │ ├── settings.blade.php │ └── stream.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tailwind.config.js ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── webpack.mix.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | LOG_LEVEL=debug 9 | 10 | DB_CONNECTION=mysql 11 | DB_HOST=127.0.0.1 12 | DB_PORT=3306 13 | DB_DATABASE=twitchls_next 14 | DB_USERNAME=root 15 | DB_PASSWORD= 16 | 17 | BROADCAST_DRIVER=log 18 | CACHE_DRIVER=file 19 | QUEUE_CONNECTION=sync 20 | SESSION_DRIVER=file 21 | SESSION_LIFETIME=120 22 | 23 | REDIS_HOST=127.0.0.1 24 | REDIS_PASSWORD=null 25 | REDIS_PORT=6379 26 | 27 | TWITCH_CLIENT_ID= 28 | TWITCH_CLIENT_SECRET= 29 | TWITCH_REDIRECT_URI=http://localhost/login/twitch/callback/ 30 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /vendor 6 | .env 7 | .env.backup 8 | .phpunit.result.cache 9 | Homestead.json 10 | Homestead.yaml 11 | npm-debug.log 12 | yarn-error.log 13 | envoy.config.php 14 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | disabled: 4 | - no_unused_imports 5 | finder: 6 | not-name: 7 | - index.php 8 | - server.php 9 | js: 10 | finder: 11 | not-name: 12 | - webpack.mix.js 13 | css: true 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # twitchls v2 2 | 3 | Alternative Twitch.tv listing, with a limited set of features. Historically this was used to force Twitch.tv streams in HLS mode for a better experience on MacOS Safari. Built using [Laravel 8](https://laravel.com/), [Livewire](https://laravel-livewire.com/), [Alpine.js](https://github.com/alpinejs/alpine) and [TailwindCSS](https://tailwindcss.com/). 4 | 5 | This application is running on [twitchls.com](https://twitchls.com). 6 | 7 | ## Development 8 | 9 | ```shell 10 | composer install 11 | npm install 12 | 13 | # Frontend development 14 | npm run dev 15 | 16 | # For production 17 | npm run prod 18 | 19 | # Tests 20 | vendor/bin/phpunit 21 | ``` 22 | 23 | In order to Login via Twitch and load the followed streams you need to [register your application on the Twitch.tv website](http://www.twitch.tv/settings/connections). After you've registered, fill the `TWITCH_CLIENT_ID`, `TWITCH_CLIENT_SECRET` and `TWITCH_REDIRECT_URL` with the appropriate values in the `.env` file. 24 | 25 | ## License 26 | 27 | Twitchls is licensed under the [MIT license](http://opensource.org/licenses/MIT). 28 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 28 | } 29 | 30 | /** 31 | * Register the commands for the application. 32 | * 33 | * @return void 34 | */ 35 | protected function commands() 36 | { 37 | $this->load(__DIR__.'/Commands'); 38 | 39 | require base_path('routes/console.php'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | reportable(function (Throwable $e) { 37 | // 38 | }); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Controllers/AboutController.php: -------------------------------------------------------------------------------- 1 | redirect(); 20 | } 21 | 22 | /** 23 | * Logs the user out and redirects to home 24 | * 25 | * @return \Illuminate\Http\Response 26 | */ 27 | public function handleLogout() 28 | { 29 | Auth::logout(); 30 | 31 | return redirect()->route('home'); 32 | } 33 | 34 | /** 35 | * Obtain the user information from GitHub. 36 | * 37 | * @return \Illuminate\Http\Response 38 | */ 39 | public function handleProviderCallback() 40 | { 41 | $social = Socialite::driver('twitch')->user(); 42 | 43 | $user = User::firstOrCreate( 44 | [ 45 | 'id' => $social->getId() 46 | ], 47 | [ 48 | 'refresh_token' => $social->refreshToken, 49 | 'token' => $social->token, 50 | 'email' => $social->getEmail(), 51 | 'name' => $social->getName() 52 | ] 53 | ); 54 | 55 | Auth::login($user); 56 | 57 | return redirect()->route('home'); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | route('home'); 19 | } 20 | 21 | return view('preview'); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Controllers/SettingsController.php: -------------------------------------------------------------------------------- 1 | strtolower($stream)]); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 33 | \App\Http\Middleware\EncryptCookies::class, 34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 35 | \Illuminate\Session\Middleware\StartSession::class, 36 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 37 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 38 | \App\Http\Middleware\VerifyCsrfToken::class, 39 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 40 | ], 41 | 42 | 'api' => [ 43 | 'throttle:api', 44 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 45 | ], 46 | ]; 47 | 48 | /** 49 | * The application's route middleware. 50 | * 51 | * These middleware may be assigned to groups or used individually. 52 | * 53 | * @var array 54 | */ 55 | protected $routeMiddleware = [ 56 | 'auth' => \App\Http\Middleware\Authenticate::class, 57 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 58 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 59 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 60 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 61 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 62 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 63 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 64 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 65 | ]; 66 | } 67 | -------------------------------------------------------------------------------- /app/Http/Livewire/Followed.php: -------------------------------------------------------------------------------- 1 | getStreams($twitch); 25 | } 26 | 27 | public function poll(Twitch $twitch) 28 | { 29 | $this->streams = []; 30 | $this->getStreams($twitch); 31 | } 32 | 33 | private function getStreams(Twitch $twitch, $cursor = null) 34 | { 35 | $this->twitch = $twitch; 36 | 37 | $query = ['first' => 18, 'after' => $cursor]; 38 | $cacheKey = "streams_{$cursor}_{$this->filter}"; 39 | 40 | if (Auth::user() && $this->filter === 'followed') { 41 | $id = Auth::id(); 42 | 43 | $follows = Cache::remember( 44 | "followed_users_{$id}", 300, function () { 45 | $result = $this->twitch->getUsersFollows(['from_id' => Auth::id(), 'first' => 100]); 46 | 47 | return collect( 48 | $result->data() 49 | )->map( 50 | function ($item) { 51 | return $item->to_id; 52 | } 53 | )->toArray(); 54 | } 55 | ); 56 | 57 | $query['user_id'] = $follows; 58 | $cacheKey = "streams_{$cursor}_{$id}"; 59 | } 60 | 61 | $cache = Cache::remember( 62 | $cacheKey, 120, function () use ($query) { 63 | return $this->formatStreams($this->twitch->getStreams($query)); 64 | } 65 | ); 66 | 67 | // Fetch avatars 68 | if (count($cache['streams']) > 0) { 69 | $ids = $cache['streams']->map( 70 | function ($stream) { 71 | return $stream['user_id']; 72 | } 73 | ); 74 | 75 | $result = $this->twitch->getUsers(['user_id' => $ids]); 76 | 77 | // dd($result->data()); 78 | } 79 | 80 | $this->streams = array_merge($this->streams, $cache['streams']->toArray()); 81 | } 82 | 83 | public function render() 84 | { 85 | return view('livewire.followed'); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /app/Http/Livewire/Settings.php: -------------------------------------------------------------------------------- 1 | user= Auth::user(); 20 | 21 | if (!is_null($this->user->settings) && array_key_exists('followed', $this->user->settings)) { 22 | $this->followed = $this->user->settings['followed']; 23 | } 24 | } 25 | 26 | public function toggleFollowed() 27 | { 28 | $this->followed = !$this->followed; 29 | $this->user->settings = \array_merge($this->user->settings ?? [], ['followed' => $this->followed]); 30 | $this->user->save(); 31 | } 32 | 33 | 34 | public function render() 35 | { 36 | return view('livewire.settings'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Http/Livewire/Streams.php: -------------------------------------------------------------------------------- 1 | filter = 'followed'; 32 | } 33 | 34 | $this->getStreams($twitch); 35 | $this->twitch = $twitch; 36 | 37 | $this->games = Cache::remember( 38 | 'games', 180, function () { 39 | $result = $this->twitch->getTopGames(['first' => 100]); 40 | 41 | return collect( 42 | $result->data() 43 | )->map( 44 | function ($item) { 45 | return collect($item)->toArray(); 46 | } 47 | )->toArray(); 48 | } 49 | ); 50 | 51 | $this->filteredGames = $this->games; 52 | } 53 | 54 | public function incrementHighlight() 55 | { 56 | if ($this->highlightIndex === count($this->filteredGames) - 1) { 57 | return; 58 | } 59 | 60 | $this->highlightIndex++; 61 | } 62 | 63 | public function decrementHighlight() 64 | { 65 | if ($this->highlightIndex === 0) { 66 | return; 67 | } 68 | 69 | $this->highlightIndex--; 70 | } 71 | 72 | private function getStreams(Twitch $twitch, $cursor = null) 73 | { 74 | $this->twitch = $twitch; 75 | 76 | $query = ['first' => 18, 'after' => $cursor]; 77 | $cacheKey = "streams_{$cursor}_{$this->filter}"; 78 | 79 | if (Auth::user() && $this->filter === 'followed') { 80 | $id = Auth::id(); 81 | 82 | $follows = Cache::remember( 83 | "followed_users_{$id}", 0, function () { 84 | $cursor = null; 85 | $data = []; 86 | 87 | do { 88 | $result = $this->twitch->getUsersFollows(['from_id' => Auth::id(), 'first' => 100], $cursor); 89 | array_push($data, ...$result->data()); 90 | $cursor = $result->next(); 91 | } while ($result->hasMoreResults()); 92 | 93 | return collect($data)->map( 94 | function ($item) { 95 | return $item->to_id; 96 | } 97 | )->toArray(); 98 | } 99 | ); 100 | 101 | $query['first'] = 100; 102 | $query['user_id'] = $follows; 103 | $cacheKey = "streams_{$cursor}_{$id}"; 104 | } else { 105 | $query['game_id'] = $this->filter; 106 | } 107 | 108 | $cache = Cache::remember( 109 | $cacheKey, 120, function () use ($query) { 110 | return $this->formatStreams($this->twitch->getStreams($query)); 111 | } 112 | ); 113 | 114 | $this->streams = array_merge($this->streams, $cache['streams']->toArray()); 115 | $this->cursor = $cache['cursor']; 116 | $this->next = $cache['next']; 117 | } 118 | 119 | public function updatedQuery() 120 | { 121 | if (empty($this->query)) { 122 | $this->filteredGames = $this->games; 123 | return; 124 | } 125 | 126 | $this->filteredGames = collect( 127 | $this->games 128 | )->filter( 129 | function ($item) { 130 | return strpos(strtolower($item['name']), strtolower($this->query)) === false ? false : true; 131 | } 132 | )->toArray(); 133 | } 134 | 135 | public function filterBy(Twitch $twitch, $value) 136 | { 137 | $this->filter = $value; 138 | $this->streams = []; 139 | 140 | if ($this->filter !== null && $this->filter !== 'followed') { 141 | $this->filterName = collect($this->games)->where('id', $this->filter)->first()['name']; 142 | } 143 | 144 | $this->getStreams($twitch); 145 | } 146 | 147 | public function filterByHighlight(Twitch $twitch) 148 | { 149 | if (count($this->filteredGames) === 0) { 150 | return; 151 | } 152 | 153 | $this->filterBy($twitch, $this->filteredGames[$this->highlightIndex]['id']); 154 | } 155 | 156 | public function loadMore(Twitch $twitch, $cursor) 157 | { 158 | $this->getStreams($twitch, $cursor); 159 | } 160 | 161 | public function render() 162 | { 163 | return view('livewire.streams'); 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /app/Http/Livewire/Traits/FormatStreamsTrait.php: -------------------------------------------------------------------------------- 1 | $result->hasMoreResults(), 10 | 'cursor' => $result->paginator->cursor(), 11 | 'streams' => collect( 12 | $result->data() 13 | )->map( 14 | function ($item) { 15 | $item->thumbnail_352 = str_replace('{width}', '352', $item->thumbnail_url); 16 | $item->thumbnail_352 = str_replace('{height}', '198', $item->thumbnail_352); 17 | 18 | $item->thumbnail_480 = str_replace('{width}', '480', $item->thumbnail_url); 19 | $item->thumbnail_480 = str_replace('{height}', '270', $item->thumbnail_480); 20 | 21 | $item->thumbnail_640 = str_replace('{width}', '640', $item->thumbnail_url); 22 | $item->thumbnail_640 = str_replace('{height}', '360', $item->thumbnail_640); 23 | 24 | $item->thumbnail_768 = str_replace('{width}', '768', $item->thumbnail_url); 25 | $item->thumbnail_768 = str_replace('{height}', '432', $item->thumbnail_768); 26 | 27 | $item->thumbnail_url = str_replace('{width}', '960', $item->thumbnail_url); 28 | $item->thumbnail_url = str_replace('{height}', '540', $item->thumbnail_url); 29 | 30 | $item->user_name = $this->formatUserName($item->user_name); 31 | $item->viewer_count_formatted = $this->formatViewers($item->viewer_count); 32 | 33 | return collect($item)->toArray(); 34 | } 35 | ), 36 | ]; 37 | } 38 | 39 | /** 40 | * Due to a weird implementation, helix api returns display names instead of 41 | * user names. We remove the spaces and semicolons, from the display name. 42 | * This fixes some channels, not all of them 43 | * 44 | * https://github.com/twitchdev/issues/issues/3 45 | */ 46 | private function formatUserName($name) 47 | { 48 | return str_replace([' ', ':'], '', $name); 49 | } 50 | 51 | private function formatViewers($count) 52 | { 53 | if ($count >= 1000 && $count < 100000) { 54 | // 16.4k 55 | return round($count / 1000, 1) . 'k'; 56 | } else if ($count >= 100000 && $count < 1000000) { 57 | // 168k 58 | return round($count / 1000) . 'k'; 59 | } else if ($count >= 1000000) { 60 | // 1.45M 61 | return round($count / 1000000, 2) . 'M'; 62 | } 63 | 64 | return $count; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 26 | return redirect(RouteServiceProvider::HOME); 27 | } 28 | } 29 | 30 | return $next($request); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | 'array' 38 | ]; 39 | } 40 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | \SocialiteProviders\Manager\SocialiteWasCalled::class => [ 22 | 'SocialiteProviders\\Twitch\\TwitchExtendSocialite@handle', 23 | ], 24 | ]; 25 | 26 | /** 27 | * Register any events for your application. 28 | * 29 | * @return void 30 | */ 31 | public function boot() 32 | { 33 | // 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | configureRateLimiting(); 39 | 40 | $this->routes(function () { 41 | Route::prefix('api') 42 | ->middleware('api') 43 | ->namespace($this->namespace) 44 | ->group(base_path('routes/api.php')); 45 | 46 | Route::middleware('web') 47 | ->namespace($this->namespace) 48 | ->group(base_path('routes/web.php')); 49 | }); 50 | } 51 | 52 | /** 53 | * Configure the rate limiters for the application. 54 | * 55 | * @return void 56 | */ 57 | protected function configureRateLimiting() 58 | { 59 | RateLimiter::for('api', function (Request $request) { 60 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); 61 | }); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": [ 6 | "framework", 7 | "laravel" 8 | ], 9 | "license": "MIT", 10 | "require": { 11 | "php": "^7.3|^8.0", 12 | "fideloper/proxy": "^4.4", 13 | "fruitcake/laravel-cors": "^2.0", 14 | "guzzlehttp/guzzle": "^7.0.1", 15 | "laravel/framework": "^8.12", 16 | "laravel/socialite": "^5.1", 17 | "laravel/tinker": "^2.5", 18 | "livewire/livewire": "^2.3", 19 | "predis/predis": "^1.1", 20 | "romanzipp/laravel-twitch": "^3.0", 21 | "socialiteproviders/twitch": "^5.3" 22 | }, 23 | "require-dev": { 24 | "facade/ignition": "^2.5", 25 | "fakerphp/faker": "^1.9.1", 26 | "mockery/mockery": "^1.4.2", 27 | "nunomaduro/collision": "^5.0", 28 | "phpunit/phpunit": "^9.3.3" 29 | }, 30 | "config": { 31 | "optimize-autoloader": true, 32 | "preferred-install": "dist", 33 | "sort-packages": true 34 | }, 35 | "extra": { 36 | "laravel": { 37 | "dont-discover": [] 38 | } 39 | }, 40 | "autoload": { 41 | "psr-4": { 42 | "App\\": "app/", 43 | "Database\\Factories\\": "database/factories/", 44 | "Database\\Seeders\\": "database/seeders/" 45 | } 46 | }, 47 | "autoload-dev": { 48 | "psr-4": { 49 | "Tests\\": "tests/" 50 | } 51 | }, 52 | "minimum-stability": "dev", 53 | "prefer-stable": true, 54 | "scripts": { 55 | "post-autoload-dump": [ 56 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 57 | "@php artisan package:discover --ansi" 58 | ], 59 | "post-root-package-install": [ 60 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 61 | ], 62 | "post-create-project-cmd": [ 63 | "@php artisan key:generate --ansi" 64 | ] 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /config/app.php: -------------------------------------------------------------------------------- 1 | env('APP_NAME', 'Laravel'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Application Environment 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This value determines the "environment" your application is currently 24 | | running in. This may determine how you prefer to configure various 25 | | services the application utilizes. Set this in your ".env" file. 26 | | 27 | */ 28 | 29 | 'env' => env('APP_ENV', 'production'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Application Debug Mode 34 | |-------------------------------------------------------------------------- 35 | | 36 | | When your application is in debug mode, detailed error messages with 37 | | stack traces will be shown on every error that occurs within your 38 | | application. If disabled, a simple generic error page is shown. 39 | | 40 | */ 41 | 42 | 'debug' => (bool) env('APP_DEBUG', false), 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Application URL 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This URL is used by the console to properly generate URLs when using 50 | | the Artisan command line tool. You should set this to the root of 51 | | your application so that it is used when running Artisan tasks. 52 | | 53 | */ 54 | 55 | 'url' => env('APP_URL', 'http://localhost'), 56 | 57 | 'asset_url' => env('ASSET_URL', null), 58 | 59 | /* 60 | |-------------------------------------------------------------------------- 61 | | Application Timezone 62 | |-------------------------------------------------------------------------- 63 | | 64 | | Here you may specify the default timezone for your application, which 65 | | will be used by the PHP date and date-time functions. We have gone 66 | | ahead and set this to a sensible default for you out of the box. 67 | | 68 | */ 69 | 70 | 'timezone' => 'UTC', 71 | 72 | /* 73 | |-------------------------------------------------------------------------- 74 | | Application Locale Configuration 75 | |-------------------------------------------------------------------------- 76 | | 77 | | The application locale determines the default locale that will be used 78 | | by the translation service provider. You are free to set this value 79 | | to any of the locales which will be supported by the application. 80 | | 81 | */ 82 | 83 | 'locale' => 'en', 84 | 85 | /* 86 | |-------------------------------------------------------------------------- 87 | | Application Fallback Locale 88 | |-------------------------------------------------------------------------- 89 | | 90 | | The fallback locale determines the locale to use when the current one 91 | | is not available. You may change the value to correspond to any of 92 | | the language folders that are provided through your application. 93 | | 94 | */ 95 | 96 | 'fallback_locale' => 'en', 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Faker Locale 101 | |-------------------------------------------------------------------------- 102 | | 103 | | This locale will be used by the Faker PHP library when generating fake 104 | | data for your database seeds. For example, this will be used to get 105 | | localized telephone numbers, street address information and more. 106 | | 107 | */ 108 | 109 | 'faker_locale' => 'en_US', 110 | 111 | /* 112 | |-------------------------------------------------------------------------- 113 | | Encryption Key 114 | |-------------------------------------------------------------------------- 115 | | 116 | | This key is used by the Illuminate encrypter service and should be set 117 | | to a random, 32 character string, otherwise these encrypted strings 118 | | will not be safe. Please do this before deploying an application! 119 | | 120 | */ 121 | 122 | 'key' => env('APP_KEY'), 123 | 124 | 'cipher' => 'AES-256-CBC', 125 | 126 | /* 127 | |-------------------------------------------------------------------------- 128 | | Autoloaded Service Providers 129 | |-------------------------------------------------------------------------- 130 | | 131 | | The service providers listed here will be automatically loaded on the 132 | | request to your application. Feel free to add your own services to 133 | | this array to grant expanded functionality to your applications. 134 | | 135 | */ 136 | 137 | 'providers' => [ 138 | 139 | /* 140 | * Laravel Framework Service Providers... 141 | */ 142 | Illuminate\Auth\AuthServiceProvider::class, 143 | Illuminate\Broadcasting\BroadcastServiceProvider::class, 144 | Illuminate\Bus\BusServiceProvider::class, 145 | Illuminate\Cache\CacheServiceProvider::class, 146 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, 147 | Illuminate\Cookie\CookieServiceProvider::class, 148 | Illuminate\Database\DatabaseServiceProvider::class, 149 | Illuminate\Encryption\EncryptionServiceProvider::class, 150 | Illuminate\Filesystem\FilesystemServiceProvider::class, 151 | Illuminate\Foundation\Providers\FoundationServiceProvider::class, 152 | Illuminate\Hashing\HashServiceProvider::class, 153 | Illuminate\Mail\MailServiceProvider::class, 154 | Illuminate\Notifications\NotificationServiceProvider::class, 155 | Illuminate\Pagination\PaginationServiceProvider::class, 156 | Illuminate\Pipeline\PipelineServiceProvider::class, 157 | Illuminate\Queue\QueueServiceProvider::class, 158 | Illuminate\Redis\RedisServiceProvider::class, 159 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, 160 | Illuminate\Session\SessionServiceProvider::class, 161 | Illuminate\Translation\TranslationServiceProvider::class, 162 | Illuminate\Validation\ValidationServiceProvider::class, 163 | Illuminate\View\ViewServiceProvider::class, 164 | 165 | /* 166 | * Package Service Providers... 167 | */ 168 | \SocialiteProviders\Manager\ServiceProvider::class, 169 | 170 | /* 171 | * Application Service Providers... 172 | */ 173 | App\Providers\AppServiceProvider::class, 174 | App\Providers\AuthServiceProvider::class, 175 | // App\Providers\BroadcastServiceProvider::class, 176 | App\Providers\EventServiceProvider::class, 177 | App\Providers\RouteServiceProvider::class, 178 | 179 | ], 180 | 181 | /* 182 | |-------------------------------------------------------------------------- 183 | | Class Aliases 184 | |-------------------------------------------------------------------------- 185 | | 186 | | This array of class aliases will be registered when this application 187 | | is started. However, feel free to register as many as you wish as 188 | | the aliases are "lazy" loaded so they don't hinder performance. 189 | | 190 | */ 191 | 192 | 'aliases' => [ 193 | 194 | 'App' => Illuminate\Support\Facades\App::class, 195 | 'Arr' => Illuminate\Support\Arr::class, 196 | 'Artisan' => Illuminate\Support\Facades\Artisan::class, 197 | 'Auth' => Illuminate\Support\Facades\Auth::class, 198 | 'Blade' => Illuminate\Support\Facades\Blade::class, 199 | 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, 200 | 'Bus' => Illuminate\Support\Facades\Bus::class, 201 | 'Cache' => Illuminate\Support\Facades\Cache::class, 202 | 'Config' => Illuminate\Support\Facades\Config::class, 203 | 'Cookie' => Illuminate\Support\Facades\Cookie::class, 204 | 'Crypt' => Illuminate\Support\Facades\Crypt::class, 205 | 'DB' => Illuminate\Support\Facades\DB::class, 206 | 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 207 | 'Event' => Illuminate\Support\Facades\Event::class, 208 | 'File' => Illuminate\Support\Facades\File::class, 209 | 'Gate' => Illuminate\Support\Facades\Gate::class, 210 | 'Hash' => Illuminate\Support\Facades\Hash::class, 211 | 'Http' => Illuminate\Support\Facades\Http::class, 212 | 'Lang' => Illuminate\Support\Facades\Lang::class, 213 | 'Log' => Illuminate\Support\Facades\Log::class, 214 | 'Mail' => Illuminate\Support\Facades\Mail::class, 215 | 'Notification' => Illuminate\Support\Facades\Notification::class, 216 | 'Password' => Illuminate\Support\Facades\Password::class, 217 | 'Queue' => Illuminate\Support\Facades\Queue::class, 218 | 'Redirect' => Illuminate\Support\Facades\Redirect::class, 219 | 'Redis' => Illuminate\Support\Facades\Redis::class, 220 | 'Request' => Illuminate\Support\Facades\Request::class, 221 | 'Response' => Illuminate\Support\Facades\Response::class, 222 | 'Route' => Illuminate\Support\Facades\Route::class, 223 | 'Schema' => Illuminate\Support\Facades\Schema::class, 224 | 'Session' => Illuminate\Support\Facades\Session::class, 225 | 'Storage' => Illuminate\Support\Facades\Storage::class, 226 | 'Str' => Illuminate\Support\Str::class, 227 | 'URL' => Illuminate\Support\Facades\URL::class, 228 | 'Validator' => Illuminate\Support\Facades\Validator::class, 229 | 'View' => Illuminate\Support\Facades\View::class, 230 | 231 | ], 232 | 233 | ]; 234 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'api' => [ 45 | 'driver' => 'token', 46 | 'provider' => 'users', 47 | 'hash' => false, 48 | ], 49 | ], 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | User Providers 54 | |-------------------------------------------------------------------------- 55 | | 56 | | All authentication drivers have a user provider. This defines how the 57 | | users are actually retrieved out of your database or other storage 58 | | mechanisms used by this application to persist your user's data. 59 | | 60 | | If you have multiple user tables or models you may configure multiple 61 | | sources which represent each model / table. These sources may then 62 | | be assigned to any extra authentication guards you have defined. 63 | | 64 | | Supported: "database", "eloquent" 65 | | 66 | */ 67 | 68 | 'providers' => [ 69 | 'users' => [ 70 | 'driver' => 'eloquent', 71 | 'model' => App\Models\User::class, 72 | ], 73 | 74 | // 'users' => [ 75 | // 'driver' => 'database', 76 | // 'table' => 'users', 77 | // ], 78 | ], 79 | 80 | /* 81 | |-------------------------------------------------------------------------- 82 | | Resetting Passwords 83 | |-------------------------------------------------------------------------- 84 | | 85 | | You may specify multiple password reset configurations if you have more 86 | | than one user table or model in the application and you want to have 87 | | separate password reset settings based on the specific user types. 88 | | 89 | | The expire time is the number of minutes that the reset token should be 90 | | considered valid. This security feature keeps tokens short-lived so 91 | | they have less time to be guessed. You may change this as needed. 92 | | 93 | */ 94 | 95 | 'passwords' => [ 96 | 'users' => [ 97 | 'provider' => 'users', 98 | 'table' => 'password_resets', 99 | 'expire' => 60, 100 | 'throttle' => 60, 101 | ], 102 | ], 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Password Confirmation Timeout 107 | |-------------------------------------------------------------------------- 108 | | 109 | | Here you may define the amount of seconds before a password confirmation 110 | | times out and the user is prompted to re-enter their password via the 111 | | confirmation screen. By default, the timeout lasts for three hours. 112 | | 113 | */ 114 | 115 | 'password_timeout' => 10800, 116 | 117 | ]; 118 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'useTLS' => true, 41 | ], 42 | ], 43 | 44 | 'redis' => [ 45 | 'driver' => 'redis', 46 | 'connection' => 'default', 47 | ], 48 | 49 | 'log' => [ 50 | 'driver' => 'log', 51 | ], 52 | 53 | 'null' => [ 54 | 'driver' => 'null', 55 | ], 56 | 57 | ], 58 | 59 | ]; 60 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | | Supported drivers: "apc", "array", "database", "file", 30 | | "memcached", "redis", "dynamodb" 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'apc' => [ 37 | 'driver' => 'apc', 38 | ], 39 | 40 | 'array' => [ 41 | 'driver' => 'array', 42 | 'serialize' => false, 43 | ], 44 | 45 | 'database' => [ 46 | 'driver' => 'database', 47 | 'table' => 'cache', 48 | 'connection' => null, 49 | ], 50 | 51 | 'file' => [ 52 | 'driver' => 'file', 53 | 'path' => storage_path('framework/cache/data'), 54 | ], 55 | 56 | 'memcached' => [ 57 | 'driver' => 'memcached', 58 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 59 | 'sasl' => [ 60 | env('MEMCACHED_USERNAME'), 61 | env('MEMCACHED_PASSWORD'), 62 | ], 63 | 'options' => [ 64 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 65 | ], 66 | 'servers' => [ 67 | [ 68 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 69 | 'port' => env('MEMCACHED_PORT', 11211), 70 | 'weight' => 100, 71 | ], 72 | ], 73 | ], 74 | 75 | 'redis' => [ 76 | 'driver' => 'redis', 77 | 'connection' => 'cache', 78 | ], 79 | 80 | 'dynamodb' => [ 81 | 'driver' => 'dynamodb', 82 | 'key' => env('AWS_ACCESS_KEY_ID'), 83 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 84 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 85 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 86 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 87 | ], 88 | 89 | ], 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Cache Key Prefix 94 | |-------------------------------------------------------------------------- 95 | | 96 | | When utilizing a RAM based store such as APC or Memcached, there might 97 | | be other applications utilizing the same cache. So, we'll specify a 98 | | value to get prefixed to all our keys so we can avoid collisions. 99 | | 100 | */ 101 | 102 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), 103 | 104 | ]; 105 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Database Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here are each of the database connections setup for your application. 26 | | Of course, examples of configuring each database platform that is 27 | | supported by Laravel is shown below to make development simple. 28 | | 29 | | 30 | | All database work in Laravel is done through the PHP PDO facilities 31 | | so make sure you have the driver for your particular database of 32 | | choice installed on your machine before you begin development. 33 | | 34 | */ 35 | 36 | 'connections' => [ 37 | 38 | 'sqlite' => [ 39 | 'driver' => 'sqlite', 40 | 'url' => env('DATABASE_URL'), 41 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 42 | 'prefix' => '', 43 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 44 | ], 45 | 46 | 'mysql' => [ 47 | 'driver' => 'mysql', 48 | 'url' => env('DATABASE_URL'), 49 | 'host' => env('DB_HOST', '127.0.0.1'), 50 | 'port' => env('DB_PORT', '3306'), 51 | 'database' => env('DB_DATABASE', 'forge'), 52 | 'username' => env('DB_USERNAME', 'forge'), 53 | 'password' => env('DB_PASSWORD', ''), 54 | 'unix_socket' => env('DB_SOCKET', ''), 55 | 'charset' => 'utf8mb4', 56 | 'collation' => 'utf8mb4_unicode_ci', 57 | 'prefix' => '', 58 | 'prefix_indexes' => true, 59 | 'strict' => true, 60 | 'engine' => null, 61 | 'options' => extension_loaded('pdo_mysql') ? array_filter([ 62 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), 63 | ]) : [], 64 | ], 65 | 66 | 'pgsql' => [ 67 | 'driver' => 'pgsql', 68 | 'url' => env('DATABASE_URL'), 69 | 'host' => env('DB_HOST', '127.0.0.1'), 70 | 'port' => env('DB_PORT', '5432'), 71 | 'database' => env('DB_DATABASE', 'forge'), 72 | 'username' => env('DB_USERNAME', 'forge'), 73 | 'password' => env('DB_PASSWORD', ''), 74 | 'charset' => 'utf8', 75 | 'prefix' => '', 76 | 'prefix_indexes' => true, 77 | 'schema' => 'public', 78 | 'sslmode' => 'prefer', 79 | ], 80 | 81 | 'sqlsrv' => [ 82 | 'driver' => 'sqlsrv', 83 | 'url' => env('DATABASE_URL'), 84 | 'host' => env('DB_HOST', 'localhost'), 85 | 'port' => env('DB_PORT', '1433'), 86 | 'database' => env('DB_DATABASE', 'forge'), 87 | 'username' => env('DB_USERNAME', 'forge'), 88 | 'password' => env('DB_PASSWORD', ''), 89 | 'charset' => 'utf8', 90 | 'prefix' => '', 91 | 'prefix_indexes' => true, 92 | ], 93 | 94 | ], 95 | 96 | /* 97 | |-------------------------------------------------------------------------- 98 | | Migration Repository Table 99 | |-------------------------------------------------------------------------- 100 | | 101 | | This table keeps track of all the migrations that have already run for 102 | | your application. Using this information, we can determine which of 103 | | the migrations on disk haven't actually been run in the database. 104 | | 105 | */ 106 | 107 | 'migrations' => 'migrations', 108 | 109 | /* 110 | |-------------------------------------------------------------------------- 111 | | Redis Databases 112 | |-------------------------------------------------------------------------- 113 | | 114 | | Redis is an open source, fast, and advanced key-value store that also 115 | | provides a richer body of commands than a typical key-value system 116 | | such as APC or Memcached. Laravel makes it easy to dig right in. 117 | | 118 | */ 119 | 120 | 'redis' => [ 121 | 122 | 'client' => env('REDIS_CLIENT', 'phpredis'), 123 | 124 | 'options' => [ 125 | 'cluster' => env('REDIS_CLUSTER', 'redis'), 126 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), 127 | ], 128 | 129 | 'default' => [ 130 | 'url' => env('REDIS_URL'), 131 | 'host' => env('REDIS_HOST', '127.0.0.1'), 132 | 'password' => env('REDIS_PASSWORD', null), 133 | 'port' => env('REDIS_PORT', '6379'), 134 | 'database' => env('REDIS_DB', '0'), 135 | ], 136 | 137 | 'cache' => [ 138 | 'url' => env('REDIS_URL'), 139 | 'host' => env('REDIS_HOST', '127.0.0.1'), 140 | 'password' => env('REDIS_PASSWORD', null), 141 | 'port' => env('REDIS_PORT', '6379'), 142 | 'database' => env('REDIS_CACHE_DB', '1'), 143 | ], 144 | 145 | ], 146 | 147 | ]; 148 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "sftp", "s3" 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_ACCESS_KEY_ID'), 61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 62 | 'region' => env('AWS_DEFAULT_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | 'url' => env('AWS_URL'), 65 | 'endpoint' => env('AWS_ENDPOINT'), 66 | ], 67 | 68 | ], 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Symbolic Links 73 | |-------------------------------------------------------------------------- 74 | | 75 | | Here you may configure the symbolic links that will be created when the 76 | | `storage:link` Artisan command is executed. The array keys should be 77 | | the locations of the links and the values should be their targets. 78 | | 79 | */ 80 | 81 | 'links' => [ 82 | public_path('storage') => storage_path('app/public'), 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Log Channels 25 | |-------------------------------------------------------------------------- 26 | | 27 | | Here you may configure the log channels for your application. Out of 28 | | the box, Laravel uses the Monolog PHP logging library. This gives 29 | | you a variety of powerful log handlers / formatters to utilize. 30 | | 31 | | Available Drivers: "single", "daily", "slack", "syslog", 32 | | "errorlog", "monolog", 33 | | "custom", "stack" 34 | | 35 | */ 36 | 37 | 'channels' => [ 38 | 'stack' => [ 39 | 'driver' => 'stack', 40 | 'channels' => ['single'], 41 | 'ignore_exceptions' => false, 42 | ], 43 | 44 | 'single' => [ 45 | 'driver' => 'single', 46 | 'path' => storage_path('logs/laravel.log'), 47 | 'level' => env('LOG_LEVEL', 'debug'), 48 | ], 49 | 50 | 'daily' => [ 51 | 'driver' => 'daily', 52 | 'path' => storage_path('logs/laravel.log'), 53 | 'level' => env('LOG_LEVEL', 'debug'), 54 | 'days' => 14, 55 | ], 56 | 57 | 'slack' => [ 58 | 'driver' => 'slack', 59 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 60 | 'username' => 'Laravel Log', 61 | 'emoji' => ':boom:', 62 | 'level' => env('LOG_LEVEL', 'critical'), 63 | ], 64 | 65 | 'papertrail' => [ 66 | 'driver' => 'monolog', 67 | 'level' => env('LOG_LEVEL', 'debug'), 68 | 'handler' => SyslogUdpHandler::class, 69 | 'handler_with' => [ 70 | 'host' => env('PAPERTRAIL_URL'), 71 | 'port' => env('PAPERTRAIL_PORT'), 72 | ], 73 | ], 74 | 75 | 'stderr' => [ 76 | 'driver' => 'monolog', 77 | 'handler' => StreamHandler::class, 78 | 'formatter' => env('LOG_STDERR_FORMATTER'), 79 | 'with' => [ 80 | 'stream' => 'php://stderr', 81 | ], 82 | ], 83 | 84 | 'syslog' => [ 85 | 'driver' => 'syslog', 86 | 'level' => env('LOG_LEVEL', 'debug'), 87 | ], 88 | 89 | 'errorlog' => [ 90 | 'driver' => 'errorlog', 91 | 'level' => env('LOG_LEVEL', 'debug'), 92 | ], 93 | 94 | 'null' => [ 95 | 'driver' => 'monolog', 96 | 'handler' => NullHandler::class, 97 | ], 98 | 99 | 'emergency' => [ 100 | 'path' => storage_path('logs/laravel.log'), 101 | ], 102 | ], 103 | 104 | ]; 105 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_MAILER', 'smtp'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Mailer Configurations 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure all of the mailers used by your application plus 24 | | their respective settings. Several examples have been configured for 25 | | you and you are free to add your own as your application requires. 26 | | 27 | | Laravel supports a variety of mail "transport" drivers to be used while 28 | | sending an e-mail. You will specify which one you are using for your 29 | | mailers below. You are free to add additional mailers as required. 30 | | 31 | | Supported: "smtp", "sendmail", "mailgun", "ses", 32 | | "postmark", "log", "array" 33 | | 34 | */ 35 | 36 | 'mailers' => [ 37 | 'smtp' => [ 38 | 'transport' => 'smtp', 39 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 40 | 'port' => env('MAIL_PORT', 587), 41 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 42 | 'username' => env('MAIL_USERNAME'), 43 | 'password' => env('MAIL_PASSWORD'), 44 | 'timeout' => null, 45 | 'auth_mode' => null, 46 | ], 47 | 48 | 'ses' => [ 49 | 'transport' => 'ses', 50 | ], 51 | 52 | 'mailgun' => [ 53 | 'transport' => 'mailgun', 54 | ], 55 | 56 | 'postmark' => [ 57 | 'transport' => 'postmark', 58 | ], 59 | 60 | 'sendmail' => [ 61 | 'transport' => 'sendmail', 62 | 'path' => '/usr/sbin/sendmail -bs', 63 | ], 64 | 65 | 'log' => [ 66 | 'transport' => 'log', 67 | 'channel' => env('MAIL_LOG_CHANNEL'), 68 | ], 69 | 70 | 'array' => [ 71 | 'transport' => 'array', 72 | ], 73 | ], 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Global "From" Address 78 | |-------------------------------------------------------------------------- 79 | | 80 | | You may wish for all e-mails sent by your application to be sent from 81 | | the same address. Here, you may specify a name and address that is 82 | | used globally for all e-mails that are sent by your application. 83 | | 84 | */ 85 | 86 | 'from' => [ 87 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 88 | 'name' => env('MAIL_FROM_NAME', 'Example'), 89 | ], 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Markdown Mail Settings 94 | |-------------------------------------------------------------------------- 95 | | 96 | | If you are using Markdown based email rendering, you may configure your 97 | | theme and component paths here, allowing you to customize the design 98 | | of the emails. Or, you may simply stick with the Laravel defaults! 99 | | 100 | */ 101 | 102 | 'markdown' => [ 103 | 'theme' => 'default', 104 | 105 | 'paths' => [ 106 | resource_path('views/vendor/mail'), 107 | ], 108 | ], 109 | 110 | ]; 111 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | 'block_for' => 0, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => env('AWS_ACCESS_KEY_ID'), 55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'), 58 | 'suffix' => env('SQS_SUFFIX'), 59 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 60 | ], 61 | 62 | 'redis' => [ 63 | 'driver' => 'redis', 64 | 'connection' => 'default', 65 | 'queue' => env('REDIS_QUEUE', 'default'), 66 | 'retry_after' => 90, 67 | 'block_for' => null, 68 | ], 69 | 70 | ], 71 | 72 | /* 73 | |-------------------------------------------------------------------------- 74 | | Failed Queue Jobs 75 | |-------------------------------------------------------------------------- 76 | | 77 | | These options configure the behavior of failed queue job logging so you 78 | | can control which database and table are used to store the jobs that 79 | | have failed. You may change them to any database / table you wish. 80 | | 81 | */ 82 | 83 | 'failed' => [ 84 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 85 | 'database' => env('DB_CONNECTION', 'mysql'), 86 | 'table' => 'failed_jobs', 87 | ], 88 | 89 | ]; 90 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | 'twitch' => [ 34 | 'client_id' => env('TWITCH_CLIENT_ID'), 35 | 'client_secret' => env('TWITCH_CLIENT_SECRET'), 36 | 'redirect' => env('TWITCH_REDIRECT_URI') 37 | ], 38 | 39 | ]; 40 | -------------------------------------------------------------------------------- /config/session.php: -------------------------------------------------------------------------------- 1 | env('SESSION_DRIVER', 'file'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Session Lifetime 26 | |-------------------------------------------------------------------------- 27 | | 28 | | Here you may specify the number of minutes that you wish the session 29 | | to be allowed to remain idle before it expires. If you want them 30 | | to immediately expire on the browser closing, set that option. 31 | | 32 | */ 33 | 34 | 'lifetime' => env('SESSION_LIFETIME', 120), 35 | 36 | 'expire_on_close' => false, 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Session Encryption 41 | |-------------------------------------------------------------------------- 42 | | 43 | | This option allows you to easily specify that all of your session data 44 | | should be encrypted before it is stored. All encryption will be run 45 | | automatically by Laravel and you can use the Session like normal. 46 | | 47 | */ 48 | 49 | 'encrypt' => false, 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | Session File Location 54 | |-------------------------------------------------------------------------- 55 | | 56 | | When using the native session driver, we need a location where session 57 | | files may be stored. A default has been set for you but a different 58 | | location may be specified. This is only needed for file sessions. 59 | | 60 | */ 61 | 62 | 'files' => storage_path('framework/sessions'), 63 | 64 | /* 65 | |-------------------------------------------------------------------------- 66 | | Session Database Connection 67 | |-------------------------------------------------------------------------- 68 | | 69 | | When using the "database" or "redis" session drivers, you may specify a 70 | | connection that should be used to manage these sessions. This should 71 | | correspond to a connection in your database configuration options. 72 | | 73 | */ 74 | 75 | 'connection' => env('SESSION_CONNECTION', null), 76 | 77 | /* 78 | |-------------------------------------------------------------------------- 79 | | Session Database Table 80 | |-------------------------------------------------------------------------- 81 | | 82 | | When using the "database" session driver, you may specify the table we 83 | | should use to manage the sessions. Of course, a sensible default is 84 | | provided for you; however, you are free to change this as needed. 85 | | 86 | */ 87 | 88 | 'table' => 'sessions', 89 | 90 | /* 91 | |-------------------------------------------------------------------------- 92 | | Session Cache Store 93 | |-------------------------------------------------------------------------- 94 | | 95 | | While using one of the framework's cache driven session backends you may 96 | | list a cache store that should be used for these sessions. This value 97 | | must match with one of the application's configured cache "stores". 98 | | 99 | | Affects: "apc", "dynamodb", "memcached", "redis" 100 | | 101 | */ 102 | 103 | 'store' => env('SESSION_STORE', null), 104 | 105 | /* 106 | |-------------------------------------------------------------------------- 107 | | Session Sweeping Lottery 108 | |-------------------------------------------------------------------------- 109 | | 110 | | Some session drivers must manually sweep their storage location to get 111 | | rid of old sessions from storage. Here are the chances that it will 112 | | happen on a given request. By default, the odds are 2 out of 100. 113 | | 114 | */ 115 | 116 | 'lottery' => [2, 100], 117 | 118 | /* 119 | |-------------------------------------------------------------------------- 120 | | Session Cookie Name 121 | |-------------------------------------------------------------------------- 122 | | 123 | | Here you may change the name of the cookie used to identify a session 124 | | instance by ID. The name specified here will get used every time a 125 | | new session cookie is created by the framework for every driver. 126 | | 127 | */ 128 | 129 | 'cookie' => env( 130 | 'SESSION_COOKIE', 131 | Str::slug(env('APP_NAME', 'laravel'), '_').'_session' 132 | ), 133 | 134 | /* 135 | |-------------------------------------------------------------------------- 136 | | Session Cookie Path 137 | |-------------------------------------------------------------------------- 138 | | 139 | | The session cookie path determines the path for which the cookie will 140 | | be regarded as available. Typically, this will be the root path of 141 | | your application but you are free to change this when necessary. 142 | | 143 | */ 144 | 145 | 'path' => '/', 146 | 147 | /* 148 | |-------------------------------------------------------------------------- 149 | | Session Cookie Domain 150 | |-------------------------------------------------------------------------- 151 | | 152 | | Here you may change the domain of the cookie used to identify a session 153 | | in your application. This will determine which domains the cookie is 154 | | available to in your application. A sensible default has been set. 155 | | 156 | */ 157 | 158 | 'domain' => env('SESSION_DOMAIN', null), 159 | 160 | /* 161 | |-------------------------------------------------------------------------- 162 | | HTTPS Only Cookies 163 | |-------------------------------------------------------------------------- 164 | | 165 | | By setting this option to true, session cookies will only be sent back 166 | | to the server if the browser has a HTTPS connection. This will keep 167 | | the cookie from being sent to you if it can not be done securely. 168 | | 169 | */ 170 | 171 | 'secure' => env('SESSION_SECURE_COOKIE'), 172 | 173 | /* 174 | |-------------------------------------------------------------------------- 175 | | HTTP Access Only 176 | |-------------------------------------------------------------------------- 177 | | 178 | | Setting this value to true will prevent JavaScript from accessing the 179 | | value of the cookie and the cookie will only be accessible through 180 | | the HTTP protocol. You are free to modify this option if needed. 181 | | 182 | */ 183 | 184 | 'http_only' => true, 185 | 186 | /* 187 | |-------------------------------------------------------------------------- 188 | | Same-Site Cookies 189 | |-------------------------------------------------------------------------- 190 | | 191 | | This option determines how your cookies behave when cross-site requests 192 | | take place, and can be used to mitigate CSRF attacks. By default, we 193 | | will set this value to "lax" since this is a secure default value. 194 | | 195 | | Supported: "lax", "strict", "none", null 196 | | 197 | */ 198 | 199 | 'same_site' => 'lax', 200 | 201 | ]; 202 | -------------------------------------------------------------------------------- /config/twitch-api.php: -------------------------------------------------------------------------------- 1 | env('TWITCH_CLIENT_ID', ''), 8 | 9 | /* 10 | * The Client Secret to use for OAuth requests. 11 | */ 12 | 'client_secret' => env('TWITCH_CLIENT_SECRET', ''), 13 | 14 | /* 15 | * The Redirect URI to use for generating OAuth authorization. 16 | */ 17 | 'redirect_url' => env('TWITCH_REDIRECT_URI', ''), 18 | 19 | 'oauth_client_credentials' => [ 20 | /* 21 | * Since May 01, 2020, Twitch requires all API requests to contain a valid Access Token. 22 | * This can be achieved with the Client Credentials flow. 23 | * 24 | * The package will attempt to generate a Access Token for unauthenticated requests. 25 | * NOTICE: This will only be enabled if a Client ID and Client Secret have been specified. 26 | */ 27 | 'auto_generate' => true, 28 | 29 | /* 30 | * Enable caching the Access Token to minimize workload. 31 | */ 32 | 'cache' => true, 33 | 34 | /* 35 | * The cache driver to use for storing Client Credentials. 36 | */ 37 | 'cache_driver' => env('CACHE_DRIVER', ''), 38 | 39 | /* 40 | * The cache store to use for storing Client Credentials. 41 | */ 42 | 'cache_store' => env('CACHE_DRIVER', ''), 43 | 44 | /* 45 | * The cache key to use for storing information. 46 | */ 47 | 'cache_key' => 'twitch-api-client-credentials', 48 | ], 49 | ]; 50 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | *.sqlite-journal 3 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->name, 27 | 'email' => $this->faker->unique()->safeEmail, 28 | 'email_verified_at' => now(), 29 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 30 | 'remember_token' => Str::random(10), 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | string('id')->primary(); 18 | $table->string('name'); 19 | $table->string('email'); 20 | $table->string('token'); 21 | $table->string('refresh_token'); 22 | $table->json('settings')->nullable(); 23 | $table->rememberToken(); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('users'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('uuid')->unique(); 19 | $table->text('connection'); 20 | $table->text('queue'); 21 | $table->longText('payload'); 22 | $table->longText('exception'); 23 | $table->timestamp('failed_at')->useCurrent(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('failed_jobs'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "npm run development -- --watch", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^1.7.4", 14 | "cross-env": "^7.0.3", 15 | "laravel-mix": "^6.0.49", 16 | "lodash": "^4.17.21", 17 | "resolve-url-loader": "^4.0.0", 18 | "vue-template-compiler": "^2.6.14" 19 | }, 20 | "dependencies": { 21 | "autoprefixer": "^10.3.1", 22 | "postcss": "^8.4.31", 23 | "tailwindcss": "^2.2.7" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/css/app.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,600;0,700;1,300&display=swap); 2 | /*! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com*/ 3 | 4 | /*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */html{-webkit-text-size-adjust:100%;line-height:1.15;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;margin:0}hr{color:inherit;height:0}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=submit],button{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:Poppins,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{font-family:inherit;line-height:inherit}*,:after,:before{border:0 solid;box-sizing:border-box}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#a1a1aa;opacity:1}input::placeholder,textarea::placeholder{color:#a1a1aa;opacity:1}button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{color:inherit;line-height:inherit;padding:0}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{border-color:currentColor}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{bottom:0;left:0;right:0;top:0}.top-0{top:0}.right-0{right:0}.bottom-0{bottom:0}.left-0{left:0}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.mx-auto{margin-left:auto;margin-right:auto}.my-6{margin-bottom:1.5rem;margin-top:1.5rem}.my-auto{margin-bottom:auto;margin-top:auto}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-16{margin-top:4rem}.mr-2{margin-right:.5rem}.-mr-4{margin-right:-1rem}.-mr-20{margin-right:-5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-8{margin-bottom:2rem}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-2{height:.5rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-12{height:3rem}.h-2px{height:2px}.h-5\/6{height:83.333333%}.h-full{height:100%}.h-screen{height:100vh}.w-0{width:0}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-20{width:5rem}.w-64{width:16rem}.group:hover .group-hover\:w-full,.w-full{width:100%}.max-w-2xl{max-width:42rem}.max-w-6xl{max-width:72rem}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.origin-top-right{transform-origin:top right}.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px}.translate-x-5{--tw-translate-x:1.25rem}.rotate-180{--tw-rotate:180deg}@keyframes spin{to{transform:rotate(1turn)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.cursor-pointer{cursor:pointer}.cursor-col-resize{cursor:col-resize}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-lg{border-radius:.5rem}.rounded-full{border-radius:9999px}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-b-lg{border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem}.border-2{border-width:2px}.border-transparent{border-color:transparent}.bg-black{--tw-bg-opacity:1;background-color:rgba(36,45,46,var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(223,231,232,var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgba(131,156,158,var(--tw-bg-opacity))}.bg-teal-200{--tw-bg-opacity:1;background-color:rgba(178,245,234,var(--tw-bg-opacity))}.bg-teal-500,.group:hover .group-hover\:bg-teal-500{--tw-bg-opacity:1;background-color:rgba(56,178,172,var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(223,231,232,var(--tw-bg-opacity))}.hover\:bg-teal-900:hover{--tw-bg-opacity:1;background-color:rgba(35,78,82,var(--tw-bg-opacity))}@media (prefers-color-scheme:dark){.dark\:bg-black{--tw-bg-opacity:1;background-color:rgba(36,45,46,var(--tw-bg-opacity))}.dark\:bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.dark\:bg-gray-500{--tw-bg-opacity:1;background-color:rgba(131,156,158,var(--tw-bg-opacity))}.dark\:bg-gray-900{--tw-bg-opacity:1;background-color:rgba(26,30,31,var(--tw-bg-opacity))}.dark\:hover\:bg-black:hover{--tw-bg-opacity:1;background-color:rgba(36,45,46,var(--tw-bg-opacity))}}.fill-current{fill:currentColor}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-8{padding-bottom:2rem;padding-top:2rem}.py-10{padding-bottom:2.5rem;padding-top:2.5rem}.pt-2{padding-top:.5rem}.pt-6{padding-top:1.5rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.font-sans{font-family:Poppins,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.font-semibold{font-weight:600}.font-bold{font-weight:700}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-4{line-height:1rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.tracking-wide{letter-spacing:.025em}.text-black{--tw-text-opacity:1;color:rgba(36,45,46,var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgba(229,62,62,var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgba(131,156,158,var(--tw-text-opacity))}.text-teal-100{--tw-text-opacity:1;color:rgba(230,255,250,var(--tw-text-opacity))}.group:hover .group-hover\:text-teal-500,.hover\:text-teal-500:hover,.text-teal-500{--tw-text-opacity:1;color:rgba(56,178,172,var(--tw-text-opacity))}.hover\:text-teal-900:hover{--tw-text-opacity:1;color:rgba(35,78,82,var(--tw-text-opacity))}@media (prefers-color-scheme:dark){.dark\:hover\:text-white:hover,.dark\:text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}}.underline{text-decoration:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.hover\:opacity-100:hover{opacity:1}*,:after,:before{--tw-shadow:0 0 #0000}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05)}.focus\:outline-none:focus,.outline-none{outline:2px solid transparent;outline-offset:2px}*,:after,:before{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-2:focus,.ring-0{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-teal-500:focus,.ring-teal-500{--tw-ring-opacity:1;--tw-ring-color:rgba(56,178,172,var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition{transition-duration:.15s;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:background-color,border-color,color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}::-moz-selection{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(56,178,172,var(--tw-bg-opacity));color:rgba(255,255,255,var(--tw-text-opacity))}::selection{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(56,178,172,var(--tw-bg-opacity));color:rgba(255,255,255,var(--tw-text-opacity))}@media (min-width:640px){.sm\:mt-0{margin-top:0}.sm\:mt-10{margin-top:2.5rem}.sm\:mt-16{margin-top:4rem}.sm\:mt-32{margin-top:8rem}.sm\:mb-16{margin-bottom:4rem}.sm\:flex-row{flex-direction:row}.sm\:gap-8{gap:2rem}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}}@media (min-width:768px){.md\:static{position:static}.md\:block{display:block}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}.md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}.md\:py-12{padding-bottom:3rem;padding-top:3rem}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width:1024px){.lg\:mt-0{margin-top:0}.lg\:w-1\/3{width:33.333333%}.lg\:w-2\/3{width:66.666667%}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:text-5xl{font-size:3rem;line-height:1}} 5 | -------------------------------------------------------------------------------- /public/favicon-mask.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class); 50 | 51 | $response = tap($kernel->handle( 52 | $request = Request::capture() 53 | ))->send(); 54 | 55 | $kernel->terminate($request, $response); 56 | -------------------------------------------------------------------------------- /public/js/app.js: -------------------------------------------------------------------------------- 1 | (()=>{var t,e={80:()=>{window.stream=function(){var t,e=null!==(t=localStorage.getItem("chat-width"))&&void 0!==t?t:375;return{dragging:!1,chatWidth:isNaN(e)?375:parseInt(e),tempChatWidth:375,startDrag:!1,chat:!0,mode:window.matchMedia("(prefers-color-scheme: dark)").matches?"&darkpopout":"",init:function(){window.innerWidth>768?this.$refs.chat.style.width=this.chatWidth+"px":(this.$refs.chat.style.width="100%",this.chat=!1)},toggleChat:function(){this.chat=!this.chat},dragStart:function(t){this.dragging=!0,this.startDrag=t.pageX},dragMove:function(t){this.dragging&&(this.tempChatWidth=this.chatWidth+this.startDrag-t.pageX,this.$refs.chat.style.width=this.tempChatWidth+"px")},dragStop:function(){this.dragging=!1,this.chatWidth=this.tempChatWidth,localStorage.setItem("chat-width",this.chatWidth)},toggleFullscreen:function(){document.fullscreenElement||document.webkitFullscreenElement?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():document.documentElement.requestFullscreen?document.documentElement.requestFullscreen():document.documentElement.webkitRequestFullscreen&&document.documentElement.webkitRequestFullscreen(document.ALLOW_KEYBOARD_INPUT)}}}},662:()=>{}},i={};function n(t){var r=i[t];if(void 0!==r)return r.exports;var a=i[t]={exports:{}};return e[t](a,a.exports,n),a.exports}n.m=e,t=[],n.O=(e,i,r,a)=>{if(!i){var h=1/0;for(l=0;l=a)&&Object.keys(n.O).every((t=>n.O[t](i[s])))?i.splice(s--,1):(c=!1,a0&&t[l-1][2]>a;l--)t[l]=t[l-1];t[l]=[i,r,a]},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t={773:0,170:0};n.O.j=e=>0===t[e];var e=(e,i)=>{var r,a,[h,c,s]=i,o=0;if(h.some((e=>0!==t[e]))){for(r in c)n.o(c,r)&&(n.m[r]=c[r]);if(s)var l=s(n)}for(e&&e(i);on(80)));var r=n.O(void 0,[170],(()=>n(662)));r=n.O(r)})(); -------------------------------------------------------------------------------- /public/js/app.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Lodash 4 | * Copyright OpenJS Foundation and other contributors 5 | * Released under MIT license 6 | * Based on Underscore.js 1.8.3 7 | * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 8 | */ 9 | -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js?id=00b843d2225e9caf1d99dd7b9b6b9f85", 3 | "/css/app.css": "/css/app.css?id=1d432bf203221f52a97308f83c973a88" 4 | } 5 | -------------------------------------------------------------------------------- /public/og.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martink635/twitchls/5269b9db88bff8ee11c70a93f056fc2c2baa54ea/public/og.png -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,600;0,700;1,300&display=swap'); 2 | 3 | @tailwind base; 4 | @tailwind components; 5 | @tailwind utilities; 6 | 7 | ::selection { 8 | @apply text-white bg-teal-500; 9 | } 10 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | window.stream = () => { 2 | const defaultWidth = 375 3 | const width = localStorage.getItem('chat-width') ?? defaultWidth 4 | 5 | return { 6 | dragging: false, 7 | chatWidth: isNaN(width) ? defaultWidth : parseInt(width), 8 | tempChatWidth: defaultWidth, 9 | startDrag: false, 10 | chat: true, 11 | mode: window.matchMedia('(prefers-color-scheme: dark)').matches ? '&darkpopout' : '', 12 | init() { 13 | if (window.innerWidth > 768) { 14 | this.$refs.chat.style.width = this.chatWidth + 'px' 15 | } else { 16 | this.$refs.chat.style.width = '100%' 17 | this.chat = false 18 | } 19 | }, 20 | toggleChat() { 21 | this.chat = !this.chat 22 | }, 23 | dragStart($event) { 24 | this.dragging = true 25 | this.startDrag = $event.pageX 26 | }, 27 | dragMove($event) { 28 | if (this.dragging) { 29 | this.tempChatWidth = this.chatWidth + this.startDrag - $event.pageX 30 | this.$refs.chat.style.width = this.tempChatWidth + 'px' 31 | } 32 | }, 33 | dragStop() { 34 | this.dragging = false 35 | this.chatWidth = this.tempChatWidth 36 | localStorage.setItem('chat-width', this.chatWidth) 37 | }, 38 | toggleFullscreen() { 39 | if ( 40 | !document.fullscreenElement && 41 | !document.webkitFullscreenElement 42 | ) { 43 | if (document.documentElement.requestFullscreen) { 44 | document.documentElement.requestFullscreen(); 45 | } else if (document.documentElement.webkitRequestFullscreen) { 46 | document.documentElement.webkitRequestFullscreen( 47 | document.ALLOW_KEYBOARD_INPUT 48 | ); 49 | } 50 | } else { 51 | if (document.exitFullscreen) { 52 | document.exitFullscreen(); 53 | } else if (document.webkitExitFullscreen) { 54 | document.webkitExitFullscreen(); 55 | } 56 | } 57 | }, 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'password' => 'The provided password is incorrect.', 18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/en/validation.php: -------------------------------------------------------------------------------- 1 | 'The :attribute must be accepted.', 17 | 'active_url' => 'The :attribute is not a valid URL.', 18 | 'after' => 'The :attribute must be a date after :date.', 19 | 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', 20 | 'alpha' => 'The :attribute may only contain letters.', 21 | 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.', 22 | 'alpha_num' => 'The :attribute may only contain letters and numbers.', 23 | 'array' => 'The :attribute must be an array.', 24 | 'before' => 'The :attribute must be a date before :date.', 25 | 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', 26 | 'between' => [ 27 | 'numeric' => 'The :attribute must be between :min and :max.', 28 | 'file' => 'The :attribute must be between :min and :max kilobytes.', 29 | 'string' => 'The :attribute must be between :min and :max characters.', 30 | 'array' => 'The :attribute must have between :min and :max items.', 31 | ], 32 | 'boolean' => 'The :attribute field must be true or false.', 33 | 'confirmed' => 'The :attribute confirmation does not match.', 34 | 'date' => 'The :attribute is not a valid date.', 35 | 'date_equals' => 'The :attribute must be a date equal to :date.', 36 | 'date_format' => 'The :attribute does not match the format :format.', 37 | 'different' => 'The :attribute and :other must be different.', 38 | 'digits' => 'The :attribute must be :digits digits.', 39 | 'digits_between' => 'The :attribute must be between :min and :max digits.', 40 | 'dimensions' => 'The :attribute has invalid image dimensions.', 41 | 'distinct' => 'The :attribute field has a duplicate value.', 42 | 'email' => 'The :attribute must be a valid email address.', 43 | 'ends_with' => 'The :attribute must end with one of the following: :values.', 44 | 'exists' => 'The selected :attribute is invalid.', 45 | 'file' => 'The :attribute must be a file.', 46 | 'filled' => 'The :attribute field must have a value.', 47 | 'gt' => [ 48 | 'numeric' => 'The :attribute must be greater than :value.', 49 | 'file' => 'The :attribute must be greater than :value kilobytes.', 50 | 'string' => 'The :attribute must be greater than :value characters.', 51 | 'array' => 'The :attribute must have more than :value items.', 52 | ], 53 | 'gte' => [ 54 | 'numeric' => 'The :attribute must be greater than or equal :value.', 55 | 'file' => 'The :attribute must be greater than or equal :value kilobytes.', 56 | 'string' => 'The :attribute must be greater than or equal :value characters.', 57 | 'array' => 'The :attribute must have :value items or more.', 58 | ], 59 | 'image' => 'The :attribute must be an image.', 60 | 'in' => 'The selected :attribute is invalid.', 61 | 'in_array' => 'The :attribute field does not exist in :other.', 62 | 'integer' => 'The :attribute must be an integer.', 63 | 'ip' => 'The :attribute must be a valid IP address.', 64 | 'ipv4' => 'The :attribute must be a valid IPv4 address.', 65 | 'ipv6' => 'The :attribute must be a valid IPv6 address.', 66 | 'json' => 'The :attribute must be a valid JSON string.', 67 | 'lt' => [ 68 | 'numeric' => 'The :attribute must be less than :value.', 69 | 'file' => 'The :attribute must be less than :value kilobytes.', 70 | 'string' => 'The :attribute must be less than :value characters.', 71 | 'array' => 'The :attribute must have less than :value items.', 72 | ], 73 | 'lte' => [ 74 | 'numeric' => 'The :attribute must be less than or equal :value.', 75 | 'file' => 'The :attribute must be less than or equal :value kilobytes.', 76 | 'string' => 'The :attribute must be less than or equal :value characters.', 77 | 'array' => 'The :attribute must not have more than :value items.', 78 | ], 79 | 'max' => [ 80 | 'numeric' => 'The :attribute may not be greater than :max.', 81 | 'file' => 'The :attribute may not be greater than :max kilobytes.', 82 | 'string' => 'The :attribute may not be greater than :max characters.', 83 | 'array' => 'The :attribute may not have more than :max items.', 84 | ], 85 | 'mimes' => 'The :attribute must be a file of type: :values.', 86 | 'mimetypes' => 'The :attribute must be a file of type: :values.', 87 | 'min' => [ 88 | 'numeric' => 'The :attribute must be at least :min.', 89 | 'file' => 'The :attribute must be at least :min kilobytes.', 90 | 'string' => 'The :attribute must be at least :min characters.', 91 | 'array' => 'The :attribute must have at least :min items.', 92 | ], 93 | 'multiple_of' => 'The :attribute must be a multiple of :value', 94 | 'not_in' => 'The selected :attribute is invalid.', 95 | 'not_regex' => 'The :attribute format is invalid.', 96 | 'numeric' => 'The :attribute must be a number.', 97 | 'password' => 'The password is incorrect.', 98 | 'present' => 'The :attribute field must be present.', 99 | 'regex' => 'The :attribute format is invalid.', 100 | 'required' => 'The :attribute field is required.', 101 | 'required_if' => 'The :attribute field is required when :other is :value.', 102 | 'required_unless' => 'The :attribute field is required unless :other is in :values.', 103 | 'required_with' => 'The :attribute field is required when :values is present.', 104 | 'required_with_all' => 'The :attribute field is required when :values are present.', 105 | 'required_without' => 'The :attribute field is required when :values is not present.', 106 | 'required_without_all' => 'The :attribute field is required when none of :values are present.', 107 | 'same' => 'The :attribute and :other must match.', 108 | 'size' => [ 109 | 'numeric' => 'The :attribute must be :size.', 110 | 'file' => 'The :attribute must be :size kilobytes.', 111 | 'string' => 'The :attribute must be :size characters.', 112 | 'array' => 'The :attribute must contain :size items.', 113 | ], 114 | 'starts_with' => 'The :attribute must start with one of the following: :values.', 115 | 'string' => 'The :attribute must be a string.', 116 | 'timezone' => 'The :attribute must be a valid zone.', 117 | 'unique' => 'The :attribute has already been taken.', 118 | 'uploaded' => 'The :attribute failed to upload.', 119 | 'url' => 'The :attribute format is invalid.', 120 | 'uuid' => 'The :attribute must be a valid UUID.', 121 | 122 | /* 123 | |-------------------------------------------------------------------------- 124 | | Custom Validation Language Lines 125 | |-------------------------------------------------------------------------- 126 | | 127 | | Here you may specify custom validation messages for attributes using the 128 | | convention "attribute.rule" to name the lines. This makes it quick to 129 | | specify a specific custom language line for a given attribute rule. 130 | | 131 | */ 132 | 133 | 'custom' => [ 134 | 'attribute-name' => [ 135 | 'rule-name' => 'custom-message', 136 | ], 137 | ], 138 | 139 | /* 140 | |-------------------------------------------------------------------------- 141 | | Custom Validation Attributes 142 | |-------------------------------------------------------------------------- 143 | | 144 | | The following language lines are used to swap our attribute placeholder 145 | | with something more reader friendly such as "E-Mail Address" instead 146 | | of "email". This simply helps us make our message more expressive. 147 | | 148 | */ 149 | 150 | 'attributes' => [], 151 | 152 | ]; 153 | -------------------------------------------------------------------------------- /resources/views/about.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.default') 2 | 3 | @section('content') 4 |
5 | 6 | About 7 | 8 |

This website started as an alternative way to watch Twitch.tv with HLS playback enabled with chat in the sidebar. At that point (2015) 10 | this 11 | was not available on the official page by default and it was the best way to watch streams on macOS Safari. As 12 | of right now this is all enabled on the official Twitch.tv page as well.

14 | 15 |

So, why does this website still exist?

16 |

Over the years hundreds of thousands of unique users have used this to watch Twitch.tv streams. As long as users will watch streams using this 18 | service it will 19 | be 20 | online. After the recent (2020) Twitch.tv 21 | changes the userbase keeps 22 | growing. 23 |

24 | 25 |

"I would like this missing feature!"

26 |

The goal of this project is to keep the watching experience as fast and as light as possible. This also means 27 | only a handful of features are available and implemented. This project is completely open-source and available 28 | on Github. Feel 29 | free to 30 | submit 31 | issues with feature requests and bugs on Github, but keep in 33 | mind, 34 | not everything will be made.

35 | 36 |

How to dark mode?

37 |

It's currently toggled automatically if your system is set to dark mode.

38 | 39 |

Supporting this project

40 |

We receive messages regarding how to support this project. We are not taking donations, and this site is 41 | inexpensive to run. But if you are looking for web/app design/development, feel free to use the links in the 42 | footer to get in touch.

43 |
44 | @endsection 45 | -------------------------------------------------------------------------------- /resources/views/components/link.blade.php: -------------------------------------------------------------------------------- 1 | merge(['class' => 'underline transition duration-150 hover:text-teal-900 dark:hover:text-white']) }}>{{ $slot }} 3 | -------------------------------------------------------------------------------- /resources/views/components/logo.blade.php: -------------------------------------------------------------------------------- 1 | 3 | 4 | 7 | 10 | 13 | 16 | 19 | 22 | 25 | 28 | 31 | 34 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /resources/views/components/primary.blade.php: -------------------------------------------------------------------------------- 1 | merge(['class' => 'transition duration-150 cursor-pointer hover:text-teal-500 group']) }}> 2 | {{ $slot }} 3 |
5 |
6 |
7 | -------------------------------------------------------------------------------- /resources/views/components/secondary.blade.php: -------------------------------------------------------------------------------- 1 | merge(['class' => 'transition duration-150 cursor-pointer hover:text-teal-500 group-hover:text-teal-500 group']) }}> 3 | {{ $slot }} 4 |
5 |
6 | -------------------------------------------------------------------------------- /resources/views/components/title.blade.php: -------------------------------------------------------------------------------- 1 |

2 | {{ $slot }} 3 |

4 | -------------------------------------------------------------------------------- /resources/views/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.default') 2 | 3 | @section('content') 4 | 5 | What would you like to watch today? 6 | 7 | @livewire('streams') 8 | @endsection 9 | -------------------------------------------------------------------------------- /resources/views/layouts/default.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Twitchls - Alternative Twitch.tv listing 11 | 12 | 13 | Twitchls - Alternative Twitch.tv listing 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | @livewireStyles 37 | 38 | 39 | 40 | 41 | 42 |
43 | 44 | @if (env('APP_ENV') !== 'production') 45 | 50 | @endif 51 | 52 |
53 | 54 | 55 | 56 |
57 | About 58 | @guest 59 | Log In with Twitch.tv 60 | @endguest 61 | 62 | @auth 63 | Settings 64 | Log out 65 | @endauth 66 |
67 | 68 |
69 | 70 |
71 | @yield('content') 72 |
73 | 74 |
76 | 77 | 78 | Alternative Twitch.tv listing with chat. Available on Github. 80 | Designed with by 81 | urska.design 82 |
83 | 84 | @livewireScripts 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /resources/views/layouts/stream.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{ $stream }} - Twitchls 11 | 12 | 13 | Twitchls - Alternative Twitch.tv listing 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | @livewireStyles 36 | 37 | 38 | 39 | 40 | 41 | @yield('content') 42 | 43 | 44 | 45 | @livewireScripts 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /resources/views/livewire/followed.blade.php: -------------------------------------------------------------------------------- 1 | @if (Auth::user() && !is_null(Auth::user()->settings) && Auth::user()->settings['followed']) 2 | 3 | 33 | @endif 34 | -------------------------------------------------------------------------------- /resources/views/livewire/settings.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
4 | Show followed sidebar on stream screen 5 | 11 |
12 | 13 |
14 | Color scheme (coming soon) 15 | 21 |
22 |
23 | -------------------------------------------------------------------------------- /resources/views/livewire/streams.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 21 | 22 | {{-- 23 | --}} 24 |
25 | 26 |
27 | 28 |
30 |
32 | 37 | 38 |
39 | @if ($filter && $filter !== 'followed') 40 | {{ $this->filterName }} 41 | @else 42 | Filter by game 43 | @endif 44 | 46 | 48 | 49 |
50 |
51 | 52 |
54 |
56 | @foreach ($filteredGames as $item) 57 |
59 |
60 | {{ $item['name'] }} 61 | @if ($filter === $item['id']) 62 | 64 | 67 | 68 | @endif 69 |
70 |
71 | @endforeach 72 |
73 |
74 | 75 |
76 | 77 |
78 |
79 | 80 | 104 | 105 | @if ($next) 106 |
107 | 108 | Load more 109 | 110 |
111 | @endif 112 |
-------------------------------------------------------------------------------- /resources/views/preview.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.default') 2 | 3 | @section('content') 4 |
5 | 6 | Preview version 7 | 8 |

A preview/prerelease version. If you are unsure why are you here or what this is, you 9 | should probably use the stable version at https://twitchls.com. 10 |

11 | 12 |

13 | This version might be unstable as it contains the latest updates and it might have random/unannounced downtime. 14 |

15 | 16 | 17 |
18 | @endsection 19 | -------------------------------------------------------------------------------- /resources/views/settings.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.default') 2 | 3 | @section('content') 4 |
5 | 6 | Settings 7 | 8 |

Once logged in you configure some settings that will persist to your user account.

9 | 10 | 11 | 12 |
13 | @endsection 14 | -------------------------------------------------------------------------------- /resources/views/stream.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.stream') 2 | 3 | @section('content') 4 |
5 |
7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 | 15 | 18 | 19 |
20 | 28 |
29 | 30 |
32 | 33 | 36 |
37 | 48 |
49 | @endsection 50 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | name('login'); 12 | Route::get('login/twitch/callback', [LoginController::class, 'handleProviderCallback']); 13 | 14 | Route::middleware(['auth'])->group(function () { 15 | Route::get('logout/twitch', [LoginController::class, 'handleLogout'])->name('logout'); 16 | Route::get('/settings', SettingsController::class)->name('settings'); 17 | }); 18 | 19 | Route::get('/', HomeController::class)->name('home'); 20 | Route::get('/about', AboutController::class)->name('about'); 21 | Route::get('/preview', PreviewController::class)->name('preview'); 22 | Route::get('/{stream}', StreamController::class)->name('stream'); 23 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | const colors = require('tailwindcss/colors') 2 | 3 | module.exports = { 4 | purge: ['resources/views/**/*.blade.php'], 5 | darkMode: 'media', // or 'media' or 'class' 6 | theme: { 7 | colors: { 8 | 9 | black: '#242D2E', 10 | white: '#FFFFFF', 11 | transparent: 'transparent', 12 | 13 | red: { 14 | '500': '#E53E3E' 15 | }, 16 | 17 | gray: { 18 | '100': '#DFE7E8', 19 | '500': '#839C9E', 20 | '900': '#1A1E1F' 21 | }, 22 | 23 | teal: { 24 | '100': "#E6FFFA", 25 | '200': '#B2F5EA', 26 | '500': '#38B2AC', 27 | '900': '#234E52' 28 | } 29 | }, 30 | extend: { 31 | fontFamily: { 32 | sans: [ 33 | 'Poppins', 34 | 'system-ui', 35 | '-apple-system', 36 | 'BlinkMacSystemFont', 37 | '"Segoe UI"', 38 | 'Roboto', 39 | 'sans-serif', 40 | '"Apple Color Emoji"', 41 | '"Segoe UI Emoji"', 42 | '"Segoe UI Symbol"', 43 | '"Noto Color Emoji"' 44 | ], 45 | }, 46 | spacing: { 47 | '2px': '2px', 48 | }, 49 | cursor: { 50 | 'col-resize': 'col-resize' 51 | }, 52 | }, 53 | }, 54 | variants: { 55 | extend: { 56 | backgroundColor: ['responsive', 'hover', 'focus', 'group-hover'], 57 | ringWidth: ['hover'], 58 | textColor: ['responsive', 'hover', 'focus', 'group-hover'], 59 | width: ['responsive', 'group-hover'], 60 | }, 61 | }, 62 | plugins: [], 63 | } 64 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const autoprefixer = require('autoprefixer'); 2 | const mix = require('laravel-mix'); 3 | const tailwindcss = require('tailwindcss') 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Mix Asset Management 8 | |-------------------------------------------------------------------------- 9 | | 10 | | Mix provides a clean, fluent API for defining some Webpack build steps 11 | | for your Laravel applications. By default, we are compiling the CSS 12 | | file for the application as well as bundling up all the JS files. 13 | | 14 | */ 15 | 16 | mix.js('resources/js/app.js', 'public/js') 17 | .postCss('resources/css/app.css', 'public/css', [ 18 | tailwindcss('./tailwind.config.js') 19 | ]) 20 | .version(); 21 | --------------------------------------------------------------------------------