Initial commit: monorepo Match Live TV.

Rails API, app Flutter, infrastruttura Docker/MediaMTX, sito marketing e documentazione di deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-26 17:45:37 +02:00
commit bba6df52c0
381 changed files with 20599 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<h2>Sessioni attive</h2>
<% if @active_sessions.any? %>
<table>
<thead><tr><th>Match</th><th>Status</th><th>Iniziata</th><th></th></tr></thead>
<tbody>
<% @active_sessions.each do |s| %>
<tr>
<td><%= s.match.team.name %> vs <%= s.match.opponent_name %></td>
<td><span class="badge live"><%= s.status %></span></td>
<td><%= s.started_at %></td>
<td><%= link_to "Dettaglio", admin_session_path(s) %></td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p>Nessuna sessione attiva.</p>
<% end %>
<h2>Squadre</h2>
<ul>
<% @teams.each do |t| %>
<li><%= link_to t.name, admin_team_path(t) %> — <%= t.matches.count %> partite</li>
<% end %>
</ul>

View File

@@ -0,0 +1,14 @@
<h2>Stream Sessions</h2>
<table>
<thead><tr><th>Match</th><th>Status</th><th>Disconnects</th><th></th></tr></thead>
<tbody>
<% @sessions.each do |s| %>
<tr>
<td><%= s.match.team.name %> vs <%= s.match.opponent_name %></td>
<td><span class="badge <%= s.live? ? 'live' : 'ended' %>"><%= s.status %></span></td>
<td><%= s.disconnection_count %></td>
<td><%= link_to "Dettaglio", admin_session_path(s) %></td>
</tr>
<% end %>
</tbody>
</table>

View File

@@ -0,0 +1,21 @@
<h2>Session <%= @session.id %></h2>
<p>Status: <strong><%= @session.status %></strong></p>
<p>Match: <%= @session.match.team.name %> vs <%= @session.match.opponent_name %></p>
<% if @session.youtube_broadcast_id %>
<p>YouTube: <a href="https://studio.youtube.com/video/<%= @session.youtube_broadcast_id %>/livestreaming" target="_blank">Broadcast</a></p>
<% end %>
<p>RTMP ingest: <code><%= @session.rtmp_ingest_url %></code></p>
<h3>Eventi</h3>
<table>
<thead><tr><th>Tipo</th><th>Quando</th><th>Meta</th></tr></thead>
<tbody>
<% @events.each do |e| %>
<tr>
<td><%= e.event_type %></td>
<td><%= e.occurred_at %></td>
<td><%= e.metadata.to_json %></td>
</tr>
<% end %>
</tbody>
</table>

View File

@@ -0,0 +1,13 @@
<h2>Teams</h2>
<table>
<thead><tr><th>Nome</th><th>Sport</th><th>YouTube</th></tr></thead>
<tbody>
<% @teams.each do |t| %>
<tr>
<td><%= link_to t.name, admin_team_path(t) %></td>
<td><%= t.sport %></td>
<td><%= t.youtube_credential.present? ? "✓" : "—" %></td>
</tr>
<% end %>
</tbody>
</table>

View File

@@ -0,0 +1,10 @@
<h2><%= @team.name %></h2>
<p>Sport: <%= @team.sport %></p>
<p>YouTube: <%= @team.youtube_credential ? "Connesso" : link_to("Connetti", "/api/v1/teams/#{@team.id}/youtube/authorize") %></p>
<h3>Partite</h3>
<ul>
<% @matches.each do |m| %>
<li><%= m.opponent_name %> — <%= m.scheduled_at %></li>
<% end %>
</ul>