Reorganize backend to mirror Musify.slnx folder structure

Moves the six backend projects on disk into Core/ and Hosts/
subfolders, matching the solution folders already defined in
Musify.slnx, so the file explorer reflects the same layout as the
solution:

  backend/Core/Musify.Domain
  backend/Core/Musify.Application
  backend/Core/Musify.Infrastructure
  backend/Hosts/Musify.Api
  backend/Hosts/Musify.Worker
  backend/Hosts/Musify.StreamingGateway

Updates every reference to the old paths: ProjectReference entries in
Musify.Api.csproj and Musify.Worker.csproj, the three Dockerfiles,
deploy/scripts/migrate.ps1|sh, deploy/zitadel/provision.ps1,
deploy/up.ps1, deploy/README.md and docs/development.md. Also fixes a
stale Dockerfile comment pointing at a compose file that no longer
exists.

Verified with `dotnet build Musify.slnx` against the new layout.
This commit is contained in:
2026-09-09 14:27:50 +02:00
parent d867a60126
commit 89569736b7
369 changed files with 41 additions and 41 deletions
@@ -0,0 +1,41 @@
using System.ComponentModel.DataAnnotations;
namespace Musify.Infrastructure.Configuration
{
public class AudioConfiguration
{
public const string SectionName = "AudioTranscoder";
[Required]
public TimeSpan TranscodingTimeout { get; set; } = TimeSpan.FromMinutes(5);
[Required]
public FfmpegConfiguration Ffmpeg { get; set; } = new FfmpegConfiguration();
}
public class FfmpegConfiguration
{
[Required]
public string ExecutableName { get; set; } = "ffmpeg";
[Required]
public string OutputFileName { get; set; } = "audio.m4a";
[Required]
public string AudioCodec { get; set; } = "aac";
[Required]
public string AudioBitrate { get; set; } = "128k";
[Range(1, 8)]
public int AudioChannels { get; set; } = 2;
[Range(8000, 192000)]
public int AudioSampleRate { get; set; } = 48000;
[Required]
public string AudioProfile { get; set; } = "aac_low";
public string AdditionalArguments { get; set; } = string.Empty;
}
}
@@ -0,0 +1,12 @@
using System.ComponentModel.DataAnnotations;
namespace Musify.Infrastructure.Configuration
{
public class DatabaseConfiguration
{
public const string SectionName = "Database";
[Required]
public required string ConnectionString { get; set; }
}
}
@@ -0,0 +1,25 @@
using System.ComponentModel.DataAnnotations;
namespace Musify.Infrastructure.Configuration
{
public class InfrastructureStorageConfiguration
{
public const string SectionName = "InfrastructureStorage";
[Url]
[Required]
public required string Address { get; set; }
[Required]
public required string AccessKey { get; set; }
[Required]
public required string SecretAccessKey { get; set; }
[Required]
public bool ForcePathStyle { get; set; }
[Required]
public bool UseHttp { get; set; }
}
}
@@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations;
namespace Musify.Infrastructure.Configuration
{
public class MassTransitConfiguration
{
public const string SectionName = "MassTransit";
[Required]
public required string Address { get; set; }
[Required]
public required string Username { get; set; }
[Required]
public required string Password { get; set; }
}
}
@@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations;
namespace Musify.Infrastructure.Configuration
{
public class OpenTelemetryConfiguration
{
public const string SectionName = "OpenTelemetry";
[Url]
[Required]
public required string OtlpEndpoint { get; set; }
}
}
@@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations;
namespace Musify.Infrastructure.Configuration
{
public class StreamTicketConfiguration
{
public const string SectionName = "StreamTicket";
[Required]
public required string PrivateKeyPath { get; set; }
[Required]
public string Audience { get; set; } = "media-gateway";
[Required]
public string Issuer { get; set; } = "musify-webapi";
[Range(60, 86400)]
public int TicketTtlSeconds { get; set; } = 3600;
}
}
@@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations;
namespace Musify.Infrastructure.Configuration
{
public class WorkerConfiguration
{
public const string SectionName = "Workers";
[Required]
public WorkerRoutes Routes { get; set; } = new WorkerRoutes();
}
public class WorkerRoutes
{
[Required]
public string TemporaryFilesDirectory { get; set; } = Path.GetTempPath();
}
}
@@ -0,0 +1,30 @@
using System.ComponentModel.DataAnnotations;
namespace Musify.Infrastructure.Configuration
{
public class YouTubeConfiguration
{
public const string SectionName = "YouTube";
[Required]
public string GeographicalLocation { get; set; } = "US";
[Range(60, 21600)]
public int StreamUrlCacheSeconds { get; set; } = 1800;
[Range(60, 3600)]
public int SearchContinuationCacheSeconds { get; set; } = 600;
[Range(0, 86400)]
public int SearchResultsCacheSeconds { get; set; } = 900;
[Range(0, 604800)]
public int SongInfoCacheSeconds { get; set; } = 86400;
[Range(32, 720)]
public int ThumbnailSize { get; set; } = 240;
[Range(120, 1080)]
public int ArtworkSize { get; set; } = 544;
}
}
@@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations;
namespace Musify.Infrastructure.Configuration
{
public class YtDlpConfiguration
{
public const string SectionName = "YtDlp";
[Required]
public string ExecutableName { get; set; } = "yt-dlp";
[Required]
public string Format { get; set; } = "bestaudio";
public string AdditionalArguments { get; set; } = string.Empty;
[Required]
public TimeSpan DownloadTimeout { get; set; } = TimeSpan.FromMinutes(5);
}
}