Code Monkey home page Code Monkey logo

larastreamers's Introduction

larastreamers_social_small

Larastreamers

This is the repository of https://larastreamers.com.

It shows you who is live coding next in the Laravel world.

Installation Steps

prerequisite: PHP > 8.2

  • clone repository
  • composer install

Local installation

  • Create DB larastreamers
  • composer install
  • composer setup (copies env file, generates key, and migrates DB)

Laravel Sail

  • copy .env.example to .env
  • run ./vendor/bin/sail up -d
  • run ./vendor/bin/sail composer setup (generates key, and migrates DB)

Setup

In order to import videos from YouTube you need:

  • Fill YOUTUBE_API_KEY in your .env file
  • Visit / and login with a user from UserTableSeeder or create your own one
  • Import a stream by providing the video id
  • The video needs to be a scheduled live stream in the future

Roadmap

Currently, there are no big updates planned.

Contribute

We welcome everyone to contribute to this project. Just make sure to suggest bigger features first in the issues, before you spend a lot of time. Please also make sure to write tests for what you implement. I only merge PRs with tests :-)

larastreamers's People

Contributors

abenerd avatar alexmanase avatar byt3sage avatar christophrumpel avatar danielhe4rt avatar dependabot[bot] avatar felixdorn avatar freekmurze avatar gummibeer avatar ioanschmitt avatar jonpurvis avatar juststeveking avatar kavanpancholi avatar krishnahimself avatar lakshan-madushanka avatar larsklopstra avatar manogi avatar mathiasonea avatar mohsenbostan avatar muhammad-sarfaraz avatar nuernbergera avatar paddockdev avatar raksbisht avatar rubenvanerk avatar samuelmwangiw avatar samuelnitsche avatar spaantje avatar tweichart avatar xewl avatar youniteus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

larastreamers's Issues

Streamer links to vague stream results

On the new streamers page (https://larastreamers.com/streamers), you have a link to show all the streams by a specific streamer. We currently use the search on the archive page for that in combination with the channel name.

This does now work quite well, because for the channel "Laravel" you will find other streams as well.
We should adapt the search to be able to search for stream only from one streamer. I guess it is enough if we make this work from the URL. (so we don't have to select something in the frontend)

Feature: check if the live is currently online on Twitch.

I'm checking on the Twitch API looking for the Schedule API, but apparently it still in beta.

I was wondering if has any possibility to integrate the Twitch Streamers as a Live On/Off flag only. And making the schedule based on some scrapping command for now.

(Idea/discussion) Dockerfiles

Hey everyone,

I wanted to do some development on the project, but I don't have php80 locally installed. This led me to the idea to PR the docker-compose with all required tools to work on the project.

What are your thoughts on this?

Thanks.

Implementation of the RSS feed

I just took a look at the rss feed and noticed that this does not really make sense for this kind of application.

Rss feeds are generally used for items published in the past. The streams are upcoming items.

The current implementation uses the updated_at field of each stream as the publish date which displays upcoming streams as published at a date in the past.

If we use the real scheduled_start_time, most rss readers will use the current time or only display the items once the scheduled_start_time is in the past.

This is how the current stream is displayed in Reeder 5.
IMG_0033

Using UTC instead of Europe/Vienna as the default time zone

Hello, I checked the source code and found that when new streams are added, it changes the schedule time zone to Europe/Vienna.

I believe UTC should be the default time zone, and you can convert that UTC into the users' time zone in the Home page.

I can update the code and submit a pull request if you agree.

Add Twitter handle(s) of streamer(s) and optional description

I think it will be nice when importing stream you ask them to provide the Twitter handle(s) of the streamer(s) and an optional description. This will be useful when tweeting out about the stream on Twitter and people will know beforehand whose stream it is

eg:
image

or
image

Error when you try to submit Twitch url

Today Flare showed this Error: Undefined array key 0 (app/Http/Livewire/SubmitYouTubeLiveStream.php 55)

This probably happened because of the wrong input for the submission field for the YouTube URL/ID.
We need to handle those:

  • Catch if there is no value given on app/Http/Livewire/SubmitYouTubeLiveStream.php 55?
  • Rund validation before that call?

Rename status "none" to "past" (DB)

Currently, past/finished streams have the status of none.
This status should be changed to finished.

  • make sure if a stream is finished, it will be set to finished (StreamData STATUS_FINISHED is already given, the value needs to change)
  • all past streams in the DB need to be changed to finished.

Add link to weekly-summary tweets

It would be nice if the weekly summary tweets link to a site where you can check those streams. Maybe a filter in the URL can do that to show those on the archive page so we don't need a new page.

Auto Import?

Hi,

Disclaimer I'm lazy so here is an idea.

Instead of adding stream manually, wouldn't it be possible to fetch them over the YouTube, Twitch what ever API and how them added automatically to the calendar.

Could be a cron command that run every hour. And search for #larastreamers tag?

If scheduled stream is "abandoned" it stays on the homepage but should be archived or removed.

@christophrumpel You had a stream scheduled for yesterday, but never went live. So i stayed on the homepage. This could possibly happen to anyone. So i think this might be something to think about.

We could check this in the CheckIfUpcomingStreamsAreLiveCommand; maybe limit this to 3 hours in the past to limit the amount of request to youtube every 5 minutes? (I don't know if you worry about the api requests?)

Maybe we should also archive the streams after some time? (3 hours or a day or something)

What do you think?

Twitch integration via EventSub

Streaming on Twitch is totally different concept than streaming via YouTube.

On YouTube you can schedule a single stream with a starting time.
Twitch instead only allows you to add a weekly schedule due to its nature, it's like a TV show.

The only beneficial way to integrate Twitch for me would be via EventSub.

Workflow:

  • Register a twitch streamer
  • "Subscribe" channel via API (registers a webhook that gets pinged if the channel is live)
  • Decide if we show the stream or not (some tag must be present or something else)

I have already a working API - will create a draft PR

Add alert / reminder to calendar.ics subscription

As a person who doesn't look at his calendar much and new streams popping in, as and when, it would be really great to be able to set reminders for the streams calendar.ics webcal subscription.

The icalendar-generator package being used has full support for this, in the form of an Alert component.

Not sure how this could be added to the UI, but maybe the URL itself (as a start) could support something like:
webcal://larastreamers.com/calendar.ics?alert=2H,30M (2 reminders, 2 hours before and 30 minutes before)

Any thoughts? Would anybody else appreciate something like this too?

Stream gets approved after it was live

Sometimes I get a submission right before the stream goes live which does not give me the time to approve it before it is live.

The issue now is that the stream is in the DB with upcoming status. The moment I approve it, the upcoming stream would end up on the home page.

Todo: Update stream when it gets approved so we have the correct status' . (ApproveStreamAction`)

Feature: Add Newsletter List

The idea is to make a footer with the newsletter field and button.

The table will be pretty simple:

Table: newsletter

id: uuid
email: string
deleted_at: datetime

Routes:

POST - /newsletter
DELETE - /newsletter/{id}

Hope to finish today!

Ended streams don't get updated if they are private

I noticed that the live stream of Freek is still displayed as "live" a few hours after the stream has ended. I think this may has something to do with the fact that the vod is private so the current state of the live stream cannot be fetched.

image

Improve live stream status checking

Hi.
Recently, a new feature was added for checking live stream's status, but I think it is expensive. There is a more efficient way to implement this feature.

Rather than querying all data in the database, query for the saved streams with STATUS_UPCOMING flag which scheduled for the current time or the time that has already passed. Then, if any data was available, send the request to the YouTube API.

In addition, the cron job frequency will need to be altered to every 10 seconds or any other time that is less than 2 minute.

Upcoming Live Stream Tweet sent wrongly

We already 2-3 occasions where the upcoming tweet was sent while a stream was already live.

I'm not sure, but I think that was the case when I accepted a stream, that was already live.

Still, if the stream was already live, not tweet should have been send, so we need to check what caused this issue.

Add timezone to calendar.ics

As I see it, there is no timezone defined when downloading the calendar.ics file, because it implies UTC.

The problem with this, is that when I subscribe to the calendar in my calendar app, it uses my local timezone but takes the time from the ICS file literally, thus having the wrong time.

(Wanted to follow the stream today and was 2 hours late ๐Ÿ˜…)

Or am I missing something obvious here?

Social cards

Create a social card for direct links to a stream listed on the site, like:

image

Instead of the add calendar text that obviously can't be clicked on Twitter, maybe have 2 or 3 time zones listed instead.

thanks to @devgummibeer for the image stolen borrowed from Twitter

Clean up DB

We now have a channel connected to every stream. This means we don't need the channel title anymore on the streams table. Also, the slug field on the channel table is a bit misleading since it actually is the customUrl of YouTube channels, which not all channels have.

  • Remove channel_title from streams table
  • Check if channel_title is used from the stream model (change it)
  • Rename slug to youtube_custom_url

Update given channels

We now store the channels of all submitted streams and show info like the description on the streamers page.
This info can change and so we have to regularly update them.

  • Add new command to update all given streams (weekly)
  • we can only get a max of 50 results by YouTube per call, so we might have to use multiple calls
  • test for that command

Card spacing issue

I looked at the website and found that cards were not properly spaced out vertically.
Here's what they look like:

image

I can resolve this issue if you prefer.

Decide on whether to use yarn or npm

Both a package-lock.json and a yarn.lock file exist, as of now the yarn.lock file is the one that holds the current valid state of the node dependencies, the package-lock.json is outdated. I propose deleting either one of those file as not to cause confusion which package manager to use.

Feature Request: Ability to Filter by Language

Would be awesome if there was a way to set a language preference to only show streams in a certain language. This way I can easily see which streams I can understand.

Bonuses would be the ability to save that language preference for future reloads and the ability to only add streams in certain languages to my calendar.

Allow streams of non-english speaking streamers

There is definitely a place for non-english streams even though i believe most of the streams will be in english. For example, @caneco on Twitter streamed in Portuguese a while ago, see this tweet for reference.

Now, assuming we agree that this feature has it's place in the app, here are some possible implementations.

First, add a Language select next to the Livestream ID input which would default to English as Youtube does not expose the Livestream language directly.

A lang column should be added to the Stream which would default to en.

Design

Of course, these two are very ugly but let's focus on how it works rather than how it looks.

Tabs on top of the title tomorrow

Even though it is fairly unlikely to happen, one big con is that if there is a lot of scheduled livestreams with a lot of different languages, it will be very cluncky and not usable at all.

Another design idea similar to what the first implementation of the timezone select was :

A select to choose the language at the right side of the title tomorrow
Here the default selected language could be the one provided in the Accept-Language header.

Livewire could be used to implement this fairly easily for both propositions.

Feature Suggestion: Allow people to "attend" or "decline" stream events in their subscribed calendars

I do not know whether this is at all possible but I wanted to put the idea out there.
I am currently subscribed to the calendar that shows me all the streams but, and I hope you can forgive me for that, I am not interested in all those streams. What I am suggesting is allowing people to "attend" or "decline" these streams so that when they decline a stream it won't show up in their calendar anymore. This would also of course have to be done in such a way that one person cannot see other attendees to a stream.

Also I feel like this could be a GitHub discussion instead of an issue as this is at this point more like food for thought instead of an actual feature request.

Anyway, great work on the platform, enjoying it very much!

Youtube "short" urls of stream throw an error

When you currently try to submit a new stream through a short YT URL like https://youtu.be/KSqpABOk1cc, it throws an error:

[2021-09-14 11:54:19] production.ERROR: Undefined array key "v"...

  1. We should catch the error
  2. Making it work with that URL too would be nice

RSS feed doesn't show date/time of stream

The RSS feed is ordered by the time each item is published on the website, which I think is pretty irrelevant.

I would expect either the entry's date/time to be when the stream event is happening, or at least that the date/time/timezone of the event is included in the entry's description.

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

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

  • D3 photo D3

    Data-Driven Documents codes.