Files
task-stream/libs/api/tracker/domain
Josep Piguillem c91df110f8 feat: steadier live updates and notices for public proposals
- The web pings the live connection, reconnects when it goes quiet and
  reloads what each screen shows after reconnecting.
- Dropping a card on a column it cannot go to puts it back.
- Owners and admins get a notice when a proposal arrives.
- The proposal limit lives in Redis, so it holds across instances.
- REST tells whether I voted; pasted images leave the attachment list.
- Deleting a project removes its Git integration; no lint warnings left.
- Reactions and the blocked badge are components of their own.
- Docs: what is done and what is left (chapter 10), Word and PDF.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 19:57:21 +02:00
..
2026-10-03 13:40:26 +02:00
2026-10-03 13:40:26 +02:00
2026-10-03 13:40:26 +02:00
2026-10-03 13:40:26 +02:00
2026-10-03 13:40:26 +02:00

api-tracker-domain

El modelo del producto: proyectos, tickets, comentarios y releases.

  • Import: @task-stream/api/tracker/domain
  • Capa: domain · Tags: scope:api-tracker, type:domain

Contenido

  • Agregados event-sourced: Project, Issue, Comment, Release. Validan en sus métodos y cambian de estado en on<Evento>.
  • events/: un fichero por evento (IssueCreatedEvent, IssueStatusChangedEvent…), todos con @AutowiredEvent.
  • Proyectos públicos (Project.isPublic) y borrado: Project.delete (propietario, confirmando la clave), Issue.delete, Release.delete (los usa la cascada); SYSTEM_ACTOR_ID para cambios que no hace una persona.
  • factories/: ProjectFactory, IssueFactory, CommentFactory, ReleaseFactory (@Injectable()).
  • project/project-settings.ts: configuración por proyecto (estados con categoría, transiciones, tipos, áreas), sus valores por defecto, ProjectWorkflow (lo que consultan tickets y queries) y validateProjectSettings (archivar, nunca borrar).
  • read-models/: forma de las vistas de lectura (ProjectReadModel, IssueReadModel…), incluida la línea temporal de los tickets y las estadísticas (analytics.read-model.ts).

Reglas y workflow: API.

Comandos

npx nx lint api-tracker-domain
npx nx test api-tracker-domain    # Jest

Reglas de dependencia entre capas: Arquitectura.