Skip to content

Backend Architecture ​

Projects ​

ProjectResponsibility
MyHoreca.Pay.DomainEntities, enums, core interfaces
MyHoreca.Pay.ApplicationUse cases, DTO contracts, domain services
MyHoreca.Pay.PersistenceEF Core DbContext, migrations, seed
MyHoreca.Pay.InfrastructureAuth, audit, dashboard reads, Syrve app services
MyHoreca.Pay.BankStatementsAdapters, import pipeline
IikoConnectorSyrve/iiko transport module
MyHoreca.Pay.ApiREST API
MyHoreca.Pay.GatewayYARP reverse proxy

Key interfaces ​

  • IBankAdapter, IBankStatementFormatDetector, IBankStatementImportService
  • ISyrveConnectionAppService, ISyrveReferenceAppService, ISyrveDebtAppService, ISyrvePaymentPostingAppService
  • IAuthService, IAuditService, IPaymentAllocationService

Persistence rules ​

  • Money: decimal(18,2)
  • Business dates: DateOnly
  • System timestamps: UTC DateTime
  • Entity IDs: UUID v7 (Guid in C#, uuid in PostgreSQL) via IUuidGenerator — see identity and IDs

Identifier conventions ​

  • Register IUuidGenerator → UuidV7Generator as singleton in AddInfrastructure.
  • Inject IUuidGenerator into services that create domain entities (import, auth, audit, allocation, seeding).
  • Do not call Guid.NewGuid() for persistent entity IDs; architecture tests enforce this.
  • EF migrations use uuid columns; IDs are set in application code before SaveChanges.