How verplanckeo/eventstore works
• An Angular-based frontend (found under the “App” folder) that offers various features (account management, tickets, users, video, etc.) using Angular routing modules, components, and services.
• A .NET backend that implements an event sourcing–driven API (mainly in the “EventStore.Api” project and its companion libraries such as EventStore.Application, EventStore.Core, and EventStore.Infrastructure) which follows a layered DDD/CQRS/Mediator pattern.
Main Components
a. Frontend Component (Angular App)
– The “App” folder houses an Angular application. Break this down into submodules such as the “features” (account, tickets, alerts, etc.), shared assets, and routing modules.
b. Backend API Component (EventStore.Api)
– This is the entry point for API calls. Controllers (e.g., TicketsController.cs, UsersController.cs) expose HTTP endpoints.
c. Application and Business Logic Layer (EventStore.Application)
– Contains the mediator commands, query handlers, and business rules. It acts as the bridge between the API and the domain.
d. Domain/Core Layer (EventStore.Core)
– Contains domain entities, aggregates, events, and state machine logic for tickets and users. This is where the event-sourcing mechanism lives.
e. Infrastructure/Persistence Layer (EventStore.Infrastructure.Persistence)
– Manages database configurations, migrations, and repository implementations (such as ReadTicketRepository.cs, UserRepository.cs) that interact with the SQL Server backend.
f. Supporting Services and Helpers
– Regards cross-cutting concerns, like Http interceptors in the Angular app and security/JWT modules in the backend.
g. Test Projects
– Various test projects (EventStore.Application.Test, EventStore.Core.Test, etc.) that ensure component integrity.
Relationships and Interactions
• The API controllers receive HTTP requests from the frontend and forward commands/queries via the Mediator pattern (see the EventStore.Application’s Mediator components).
• Application services and handlers then invoke domain logic from EventStore.Core to handle events, validations, and business rules.
• The Infrastructure layer (Persistence and HTTP utilities) works with the application and domain layers to save and retrieve data from the MS SQL Server. Represent the SQL Server as a database component that is connected to infrastructure.
• External services are minimal in this project; however, there’s a Dockerized deployment aspect (Dockerfile files) and potential integration with Azure (as noted in the README for SQL Azure resources). If needed, add these as ancillary components.
Architectural Patterns and Principles
– Emphasize the use of the Mediator pattern within the application layer to decouple controllers and business logic.
– Note that the event sourcing mechanism—which includes capturing state transitions via domain events—is central to the design.
– The Angular application follows standard SPA modular structure with feature modules, routing, and component hierarchies.
Technologies, Frameworks, and Tools
• Angular (TypeScript, Karma, Protractor, etc.) for the frontend.
• .NET (likely .NET Core/5/6) for the backend, with ASP.NET Core for the API.
• MS SQL Server as the database backend (with support for migrations and possibly Dockerized deployment).
• Docker utilization for containerized services (as seen from the Dockerfile.EventStoreApi).
• Testing frameworks for both Angular and .NET projects.
Final Detailed Picture
– The separation of the frontend (view components, modules) and the backend (API controllers, mediated business logic, domain events, and persistence repositories).
– The layered architectural approach used in the .NET backend which supports an event-sourced design.
– Dependency and communication flows:
• HTTP requests from Angular to API endpoints.
• API controllers delegating tasks to the application layer (via mediator interfaces).
• Domain commands and events handling within the core, encapsulating business rules.
• Infrastructure handling for database (MSSQL) migrations and data access.
– Ancillary details like testing frameworks and containerization support.