93ee8be0cd97e29f74739a9af537136b987c4518
Adds the PlayList picture-processing lifecycle saga (correlated by PlayListId)
mirroring the track one, and generalizes the failure plumbing:
- Rename the track fault translator to ProcessingSlipFaultConsumer and use a
generic Workflow.SubjectId variable + ProcessKind; it now emits typed
Track{Picture,Audio}/PlayListPicture ProcessingFailed events for all slips
- PlayListProcessingStateMachine (+ EF-persisted PlayListProcessingState,
migration): starts on CreatePlayListResourcesEvent, finalizes on
PlayListPictureProcessed, and on failure marks the playlist Failed and
removes the orphaned final picture (PlayListProcessingFailedConsumer +
MarkPlayListAsFailedActivity)
- UpdatePlayListPictureActivity publishes PlayListPictureProcessed on success
- Picture slip carries SubjectId + PlayListPicture kind + fault subscription
Verified end-to-end in Docker (RabbitMQ + migrated Postgres): both saga
endpoints, the fault translator and cleanup consumers configure, and an
addressing cross-check confirms all 21 activity execute queues the builders
address exist (caught + fixed a kebab mismatch on mark-play-list-as-failed).
Build: 0 warnings, 0 errors.
Musify — Documentación
Musify es un backend de streaming de música: subir pistas, procesarlas (transcodificar el audio a .m4a y generar miniaturas), organizarlas en playlists y reproducirlas en streaming sin que los bytes pasen por la API.
Esta carpeta explica qué hace cada pieza, su propósito y por qué está diseñada así.
Índice
- architecture.md — Visión global: componentes, cómo encajan y los flujos principales.
- projects.md — Qué es y para qué sirve cada proyecto/solución.
- authentication.md — Zitadel (OIDC), validación de JWT, provisioning/sync de usuarios.
- storage.md — SeaweedFS (S3), estructura de claves, URLs prefirmadas, qué es público y qué privado.
- streaming.md — Streaming del audio (
.m4apor HTTP range) con stream-ticket (RS256) y el reverse proxy (StreamingGateway). - media-processing.md — El worker y los workflows de MassTransit (transcode de audio, miniaturas).
- development.md — Cómo levantar todo en local: contenedores, puertos y comandos.
Mapa de componentes (alto nivel)
┌─────────────────────────────────────────────┐
Cliente ───► │ WebApi (:5111) API REST + emite tickets │
└─────────────────────────────────────────────┘
│ EF Core │ presigned (subidas) │ MassTransit (eventos)
▼ ▼ ▼
PostgreSQL SeaweedFS S3 (:8333) RabbitMQ ──► Worker (procesa)
(metadatos) (objetos) audio→.m4a, imágenes
▲
Cliente ───► StreamingGateway (:8081) ┘ sirve audio .m4a (valida ticket, proxy al filer)
Login: Cliente ◄──► Zitadel (:8080, OIDC) → WebApi valida el JWT
Stack
- .NET 10, C#. Minimal APIs (WebApi), Worker Service (Worker), ASP.NET + YARP (StreamingGateway).
- CQRS con [Mediator] (source-generator) y resultados con Ardalis.Result.
- EF Core 10 + PostgreSQL (metadatos).
- MassTransit 8 + RabbitMQ (procesado asíncrono con routing slips/sagas).
- SeaweedFS (almacenamiento de objetos compatible con S3, vía AWSSDK.S3).
- ffmpeg (transcode de audio a AAC/
.m4a), SixLabors.ImageSharp (miniaturas). - Zitadel (OIDC/OAuth2) para identidad.
Repositorios git
Cada proyecto de nivel superior es su propio repo git: MusifyBackend, Musify.WebApi, Musify.StreamingGateway, Musify.Worker. La raíz del workspace (docs/, deploy/, player.html) no está versionada.
Languages
C#
73.1%
Svelte
12.1%
TypeScript
9%
Kotlin
4.1%
CSS
1.1%
Other
0.6%