I'm new to DDD and I would like to clarify some concepts. I'm thinking about DDD in the client-side.
The first one is regarding transactions: My understanding is that transactions are a responsibility of the application layer, when the use case has to coordinate different entities with some level of integrity. However, what if we have an aggregate. Is that ok to have the transaction in the repository of that aggregate?
A second question regarding transactions would be: suppose the user/client doesn't have permission to access some of the collections which should be part of a transaction. Then, instead of calling a repository or coordinating the transaction in an application service, I suppose we should just call a service which would communicate to the server a request, which in turn would create the necessary transaction. Is that correct? If so, this service would be an application, domain or infrastructure service?
Btw, if it helps: I'm using Angular and Firestore/Cloud Functions. And I'm trying to do "functional" DDD (with anemic models).