refactor: standardize project names to Musify.* and flatten layout

- Flatten nested per-repo folders into flat Musify.* projects at root
- Rename assemblies/csproj: Domain->Musify.Domain, Application->Musify.Application,
  Infrastructure->Musify.Infrastructure, WebApi->Musify.Api, Worker->Musify.Worker,
  StreamingGateway->Musify.StreamingGateway
- Rename WebApi.* namespaces to Musify.Api.*
- Update all ProjectReference paths and the solution file
- Consolidate stray per-repo dotfiles; add root .gitattributes
- Move flutter client out to _archive

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-05 03:32:48 +02:00
co-authored by Claude Opus 4.8
parent 8ab4d27287
commit f6d668d201
259 changed files with 82 additions and 1711 deletions
@@ -0,0 +1,36 @@
using Ardalis.Result;
using IResult = Microsoft.AspNetCore.Http.IResult;
namespace Musify.Api.Extensions;
public static class ResultHttpExtensions
{
public static IResult ToHttpResult(this Result result) =>
result.Status switch
{
ResultStatus.Ok or ResultStatus.NoContent => Results.NoContent(),
ResultStatus.NotFound => Results.NotFound(result.Errors.FirstOrDefault()),
ResultStatus.Invalid => Results.ValidationProblem(ToValidationDictionary(result.ValidationErrors)),
ResultStatus.Unauthorized => Results.Unauthorized(),
ResultStatus.Forbidden => Results.StatusCode(StatusCodes.Status403Forbidden),
ResultStatus.Conflict => Results.Conflict(result.Errors.FirstOrDefault()),
_ => Results.Problem(string.Join(", ", result.Errors))
};
public static IResult ToHttpResult<T>(this Result<T> result) =>
result.Status switch
{
ResultStatus.Ok => Results.Ok(result.Value),
ResultStatus.NotFound => Results.NotFound(result.Errors.FirstOrDefault()),
ResultStatus.Invalid => Results.ValidationProblem(ToValidationDictionary(result.ValidationErrors)),
ResultStatus.Unauthorized => Results.Unauthorized(),
ResultStatus.Forbidden => Results.StatusCode(StatusCodes.Status403Forbidden),
ResultStatus.Conflict => Results.Conflict(result.Errors.FirstOrDefault()),
_ => Results.Problem(string.Join(", ", result.Errors))
};
private static Dictionary<string, string[]> ToValidationDictionary(IEnumerable<ValidationError> errors) =>
errors
.GroupBy(e => string.IsNullOrEmpty(e.Identifier) ? "general" : e.Identifier)
.ToDictionary(g => g.Key, g => g.Select(e => e.ErrorMessage).ToArray());
}