🎉 Initial commit: AudiOhm - Alternative à Spotify avec streaming YouTube

Features:
- Frontend Flutter avec thème néon cyberpunk
- Backend FastAPI avec streaming YouTube
- Base de données PostgreSQL + Redis
- Authentification JWT complète
- Recherche multi-source (DB + YouTube)
- Playlists CRUD avec drag & drop
- Queue management
- Settings avec audio quality
- Interface adaptative (Desktop + Mobile)

Tech Stack:
- Frontend: Flutter 3.2+, Riverpod
- Backend: Python 3.11+, FastAPI
- Database: PostgreSQL 15+
- Cache: Redis 7+
- Streaming: yt-dlp + FFmpeg

🚀 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
feldenr
2026-01-18 17:08:59 +01:00
commit 9c504d2c3d
128 changed files with 22638 additions and 0 deletions
@@ -0,0 +1,292 @@
/// Playlist Track Tile - Displays a track in a playlist with drag-to-reorder support
library;
import 'package:flutter/material.dart';
import '../../../../domain/entities/track.dart';
import '../../../../core/theme/colors.dart';
import '../common/cached_network_image_with_fallback.dart';
/// Playlist track tile
class PlaylistTrackTile extends StatelessWidget {
final Track track;
final int position;
final bool isOwner;
final bool isDragging;
final VoidCallback? onTap;
final VoidCallback? onRemove;
final VoidCallback? onAddToQueue;
final VoidCallback? onDragStart;
const PlaylistTrackTile({
required this.track,
required this.position,
this.isOwner = false,
this.isDragging = false,
this.onTap,
this.onRemove,
this.onAddToQueue,
this.onDragStart,
super.key,
});
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),
decoration: BoxDecoration(
color: isDragging
? AppColors.surfaceElevated.withOpacity(0.5)
: AppColors.surface,
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: isDragging
? AppColors.cyan.withOpacity(0.5)
: Colors.transparent,
width: 2,
),
),
child: Material(
color: Colors.transparent,
child: InkWell(
onTap: onTap,
borderRadius: BorderRadius.circular(8),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
child: Row(
children: [
// Drag handle (for owners)
if (isOwner)
_buildDragHandle()
else
_buildPositionNumber(),
const SizedBox(width: 12),
// Album art
_buildAlbumArt(),
const SizedBox(width: 12),
// Track info
Expanded(
child: _buildTrackInfo(),
),
// Duration
_buildDuration(),
const SizedBox(width: 8),
// Menu button
_buildMenuButton(context),
// Remove button (for owners)
if (isOwner) ...[
const SizedBox(width: 8),
_buildRemoveButton(),
],
],
),
),
),
),
);
}
Widget _buildDragHandle() {
return GestureDetector(
onPanStart: (_) => onDragStart?.call(),
child: Container(
width: 24,
height: 24,
alignment: Alignment.center,
child: Icon(
Icons.drag_handle,
color: AppColors.onSurfaceVariant,
size: 20,
),
),
);
}
Widget _buildPositionNumber() {
return SizedBox(
width: 24,
child: Text(
'${position + 1}',
style: TextStyle(
color: AppColors.onSurfaceVariant,
fontSize: 14,
fontWeight: FontWeight.w500,
),
textAlign: TextAlign.center,
),
);
}
Widget _buildAlbumArt() {
return ClipRRect(
borderRadius: BorderRadius.circular(6),
child: SizedBox(
width: 48,
height: 48,
child: CachedNetworkImageWithFallback(
imageUrl: track.imageUrl,
fallbackIcon: Icons.music_note,
progressColor: AppColors.cyan,
fit: BoxFit.cover,
),
),
);
}
Widget _buildTrackInfo() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(
track.title,
style: const TextStyle(
color: AppColors.onBackground,
fontSize: 15,
fontWeight: FontWeight.w600,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
const SizedBox(height: 2),
Text(
track.artist?.name ?? 'Unknown Artist',
style: const TextStyle(
color: AppColors.onSurfaceVariant,
fontSize: 13,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
);
}
Widget _buildDuration() {
return Text(
track.formattedDuration,
style: const TextStyle(
color: AppColors.onSurfaceVariant,
fontSize: 13,
fontWeight: FontWeight.w500,
),
);
}
Widget _buildMenuButton(BuildContext context) {
return PopupMenuButton<String>(
icon: Icon(
Icons.more_vert,
color: AppColors.onSurfaceVariant,
),
color: AppColors.surfaceElevated,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
side: BorderSide(
color: AppColors.cyan.withOpacity(0.3),
),
),
onSelected: (value) {
switch (value) {
case 'queue':
onAddToQueue?.call();
break;
case 'remove':
onRemove?.call();
break;
}
},
itemBuilder: (context) => [
PopupMenuItem(
value: 'queue',
child: Row(
children: [
Icon(Icons.queue_music, color: AppColors.cyan, size: 20),
const SizedBox(width: 12),
const Text(
'Add to queue',
style: TextStyle(color: AppColors.onBackground),
),
],
),
),
if (isOwner)
PopupMenuItem(
value: 'remove',
child: Row(
children: [
Icon(Icons.remove_circle_outline, color: AppColors.rose, size: 20),
const SizedBox(width: 12),
const Text(
'Remove from playlist',
style: TextStyle(color: AppColors.onBackground),
),
],
),
),
],
);
}
Widget _buildRemoveButton() {
return IconButton(
icon: Icon(
Icons.remove_circle_outline,
color: AppColors.rose,
size: 20,
),
onPressed: onRemove,
tooltip: 'Remove from playlist',
padding: EdgeInsets.zero,
constraints: const BoxConstraints(
minWidth: 32,
minHeight: 32,
),
);
}
}
/// Reorderable playlist track tile
class ReorderablePlaylistTrackTile extends StatelessWidget {
final Track track;
final int position;
final bool isOwner;
final VoidCallback? onTap;
final VoidCallback? onRemove;
final VoidCallback? onAddToQueue;
const ReorderablePlaylistTrackTile({
required this.track,
required this.position,
this.isOwner = false,
this.onTap,
this.onRemove,
this.onAddToQueue,
super.key,
});
@override
Widget build(BuildContext context) {
return ReorderableDragStartListener(
key: ValueKey(track.id),
index: position,
enabled: isOwner,
child: PlaylistTrackTile(
track: track,
position: position,
isOwner: isOwner,
onTap: onTap,
onRemove: onRemove,
onAddToQueue: onAddToQueue,
),
);
}
}