27 lines
1.2 KiB
Markdown
27 lines
1.2 KiB
Markdown
# api-tracker-application
|
|
|
|
Casos de uso del tracker (CQRS).
|
|
|
|
- **Import**: `@task-stream/api/tracker/application`
|
|
- **Capa**: `application` · **Tags**: `scope:api-tracker`, `type:application`
|
|
|
|
## Contenido
|
|
|
|
- Services: `ProjectsService`, `IssuesService`, `CommentsService`, `ReleasesService`, `ChangesService` (subscriptions).
|
|
- `commands/`: un fichero por command y otro por handler; cargan con `WriteAccess` (rehydrator) y guardan con `commitAndWait()`.
|
|
- `queries/`: un fichero por query y otro por handler; leen de los puertos `Find*Repository` y comprueban la membresía (`ReadAccess`).
|
|
- `event-handlers/`: proyecciones (`@EventsHandler`) hacia el read model, notificaciones en tiempo real y feed de actividad.
|
|
- `ports/`: lookups de escritura, `Find*`, `UpsertMaterialized*`, `ReleaseIssuesRepository`, `ChangeFeed`, `UserDirectory`.
|
|
- `TrackerApplicationModule.withInfrastructure(...)`.
|
|
|
|
Cómo añadir un caso de uso: [Desarrollo](../../../../docs/06-desarrollo.md#64-cómo-añadir-una-funcionalidad).
|
|
|
|
## Comandos
|
|
|
|
```sh
|
|
npx nx lint api-tracker-application
|
|
npx nx test api-tracker-application # Jest
|
|
```
|
|
|
|
Reglas de dependencia entre capas: [Arquitectura](../../../../docs/02-arquitectura.md#21-capas-hexagonales).
|