Appearance
Backend Architecture
Projects
| Project | Responsibility |
|---|---|
MyHoreca.Pay.Domain | Entities, enums, core interfaces |
MyHoreca.Pay.Application | Use cases, DTO contracts, domain services |
MyHoreca.Pay.Persistence | EF Core DbContext, migrations, seed |
MyHoreca.Pay.Infrastructure | Auth, audit, dashboard reads, Syrve app services |
MyHoreca.Pay.BankStatements | Adapters, import pipeline |
IikoConnector | Syrve/iiko transport module |
MyHoreca.Pay.Api | REST API |
MyHoreca.Pay.Gateway | YARP reverse proxy |
Key interfaces
IBankAdapter,IBankStatementFormatDetector,IBankStatementImportServiceISyrveConnectionAppService,ISyrveReferenceAppService,ISyrveDebtAppService,ISyrvePaymentPostingAppServiceIAuthService,IAuditService,IPaymentAllocationService
Persistence rules
- Money:
decimal(18,2) - Business dates:
DateOnly - System timestamps: UTC
DateTime - Entity IDs: UUID v7 (
Guidin C#,uuidin PostgreSQL) viaIUuidGenerator— see identity and IDs
Identifier conventions
- Register
IUuidGenerator→UuidV7Generatoras singleton inAddInfrastructure. - Inject
IUuidGeneratorinto 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
uuidcolumns; IDs are set in application code beforeSaveChanges.