Initial commit: Flutter app + PHP/MySQL backend on Hostinger

Replaces Firebase with a self-hosted PHP/MySQL API served from
winded.prymsolutions.com. Includes full backend (schema, auth, events,
teams, brackets, suggestions, stats, media, file upload) and updated
Flutter repositories and domain models.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-14 20:13:57 -07:00
commit b239ae3e5f
208 changed files with 19187 additions and 0 deletions
@@ -0,0 +1,150 @@
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import '../../domain/highlight.dart';
/// Card for one highlight reel. Renders:
/// * a 160px thumbnail area (placeholder until [Highlight.thumbnailUrl] is
/// populated — Phase 2 will swap to `Image.network`)
/// * the title, description (clipped to 2 lines), and published date
/// * a "Watch on YouTube" outlined button that surfaces a snackbar
/// placeholder; real launching ships with the `url_launcher` package.
class HighlightCard extends StatelessWidget {
const HighlightCard({super.key, required this.highlight});
final Highlight highlight;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final scheme = theme.colorScheme;
final formattedDate = DateFormat.yMMMMd().format(highlight.publishedAt);
return Card(
clipBehavior: Clip.antiAlias,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
_Thumbnail(thumbnailUrl: highlight.thumbnailUrl),
Padding(
padding: const EdgeInsets.fromLTRB(16, 12, 16, 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(
highlight.title,
style: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w700,
),
),
const SizedBox(height: 6),
Text(
highlight.description,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.bodyMedium?.copyWith(
color: scheme.onSurfaceVariant,
),
),
const SizedBox(height: 10),
Row(
children: <Widget>[
Icon(
Icons.calendar_today_outlined,
size: 14,
color: scheme.onSurfaceVariant,
),
const SizedBox(width: 6),
Text(
formattedDate,
style: theme.textTheme.bodySmall?.copyWith(
color: scheme.onSurfaceVariant,
),
),
],
),
const SizedBox(height: 12),
Align(
alignment: Alignment.centerLeft,
child: OutlinedButton.icon(
onPressed: () => _handleWatch(context),
icon: const Icon(Icons.play_arrow, size: 18),
label: const Text('Watch on YouTube'),
),
),
],
),
),
],
),
);
}
void _handleWatch(BuildContext context) {
ScaffoldMessenger.of(context)
..hideCurrentSnackBar()
..showSnackBar(
const SnackBar(
content: Text('Opening YouTube...'),
duration: Duration(seconds: 2),
),
);
}
}
class _Thumbnail extends StatelessWidget {
const _Thumbnail({required this.thumbnailUrl});
final String? thumbnailUrl;
@override
Widget build(BuildContext context) {
final scheme = Theme.of(context).colorScheme;
if (thumbnailUrl == null) {
return Container(
height: 160,
width: double.infinity,
color: scheme.surfaceContainerHighest,
alignment: Alignment.center,
child: Icon(
Icons.play_circle_outline,
size: 48,
color: scheme.primary,
),
);
}
return SizedBox(
height: 160,
width: double.infinity,
child: Image.network(
thumbnailUrl!,
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) => Container(
color: scheme.surfaceContainerHighest,
alignment: Alignment.center,
child: Icon(
Icons.broken_image_outlined,
size: 36,
color: scheme.onSurfaceVariant,
),
),
loadingBuilder: (context, child, progress) {
if (progress == null) return child;
return Container(
color: scheme.surfaceContainerHighest,
alignment: Alignment.center,
child: const SizedBox(
width: 24,
height: 24,
child: CircularProgressIndicator(strokeWidth: 2),
),
);
},
),
);
}
}
@@ -0,0 +1,82 @@
import 'package:flutter/material.dart';
import '../../domain/media_link.dart';
/// Brand colors for each social platform. Hardcoded on purpose — these are
/// the official platform brand colors, not theme tokens, so they remain
/// recognisable regardless of the app's color scheme.
const Map<SocialPlatform, Color> _platformAccent = <SocialPlatform, Color>{
SocialPlatform.instagram: Color(0xFFE1306C),
SocialPlatform.youtube: Color(0xFFFF0000),
SocialPlatform.twitter: Color(0xFF1DA1F2),
SocialPlatform.tiktok: Color(0xFF69C9D0),
};
const Map<SocialPlatform, IconData> _platformIcon = <SocialPlatform, IconData>{
SocialPlatform.instagram: Icons.photo_camera,
SocialPlatform.youtube: Icons.play_circle_filled,
SocialPlatform.twitter: Icons.tag,
SocialPlatform.tiktok: Icons.music_note,
};
/// Wide tappable card for a single social platform. Shows a brand-colored
/// icon leading, the platform name + handle as the title/subtitle, and a
/// trailing chevron. Tapping surfaces an "Opening …" snackbar — actual URL
/// launching will be wired up once `url_launcher` is added to pubspec.
class SocialLinkCard extends StatelessWidget {
const SocialLinkCard({super.key, required this.link});
final MediaLink link;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final scheme = theme.colorScheme;
final accent = _platformAccent[link.platform] ?? scheme.primary;
final icon = _platformIcon[link.platform] ?? Icons.public;
return Card(
clipBehavior: Clip.antiAlias,
child: ListTile(
onTap: () => _handleTap(context),
leading: Container(
width: 44,
height: 44,
alignment: Alignment.center,
decoration: BoxDecoration(
color: accent.withValues(alpha: 0.15),
shape: BoxShape.circle,
),
child: Icon(icon, color: accent, size: 24),
),
title: Text(
link.displayName,
style: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w700,
),
),
subtitle: Text(
link.handle,
style: theme.textTheme.bodyMedium?.copyWith(
color: scheme.onSurfaceVariant,
),
),
trailing: Icon(
Icons.chevron_right,
color: scheme.onSurfaceVariant,
),
),
);
}
void _handleTap(BuildContext context) {
ScaffoldMessenger.of(context)
..hideCurrentSnackBar()
..showSnackBar(
SnackBar(
content: Text('Opening ${link.displayName}...'),
duration: const Duration(seconds: 2),
),
);
}
}