How miyxotkem/se361_smartedumicroservices works
SmartEdu is a .NET 9 e-learning platform: learners and staff use a WPF client to reach independently deployed services through a YARP gateway. The main commerce workflow starts with course registration, proceeds through payment and the Course service’s enrollment saga, and reports enrollment status in real time. Separate branches support identity, course learning and assignments, exams, comments, notifications, and administration. Shared CQRS behaviors and messaging support service implementation. The README documents integrations and capabilities; sampled source confirms selected wiring, but not every endpoint or event route.
Main entry points: Program.cs YARP gateway · Course.API Course service · Exam Exam service · PaymentController.cs Payment service
Components 25
Desktop client
- WPF application
Views - API service client
Services/ApiService.cs
Gateway
- YARP gateway
ApiGateways/YarpApiGateway/Program.cs
Learning services
- Identity service
Services/Identity/Identity.API - Course service
Services/Course/Course.API - Exam service
Services/Exam - Comment service
Services/Comment/Comment.API - Notification service
Services/Notification/Notification.API - Admin service
Services/Admin/Admin.API - Exam repository
Services/Exam/Exam.Infrastructure/Data/ExamRepository.cs - Course gRPC
Services/Course/Course.API/Services/CourseGrpcService.cs - Identity gRPC
Services/Identity/Identity.API/Services/UserGrpcService.cs
Enrollment commerce
- Payment service
Services/Payment/Payment.API/Controllers/PaymentController.cs - Enrollment saga
Services/Course/Course.API/Features/Registrations/Sagas/EnrollmentStateMachine.cs - Enrollment hub
Services/Course/Course.API/Hubs/EnrollmentHub.cs - Payment adapters
Services/Payment/Payment.API/Services
Shared platform
- Messaging contracts
BuildingBlocks/BuildingBlocks.Messaging - RabbitMQ
- CQRS behaviors
BuildingBlocks/BuildingBlocks/Behaviors - Firestore stores
- Payment database
Services/Payment/Payment.API/Data/PaymentDbContext.cs - Redis state/cache
- Observability
BuildingBlocks/BuildingBlocks/Diagnostics/OpenTelemetryExtensions.cs
Other components
- Learner or staff
- Payment providers
Connections 30
- Learner or staff → WPF application: uses
- WPF application → API service client: calls
- API service client → YARP gateway: sends requests
- YARP gateway → Identity service: routes to
- YARP gateway → Course service: routes to
- YARP gateway → Exam service: routes to
- YARP gateway → Payment service: routes to
- YARP gateway → Comment service: routes to
- YARP gateway → Notification service: routes to
- YARP gateway → Admin service: routes to
- Course service → Enrollment saga: orchestrates
Services/Course/Course.API/Program.cs - Enrollment saga → RabbitMQ: coordinates events
- Payment service → Payment database: saves transactions
Services/Payment/Payment.API/Controllers/PaymentController.cs - Payment service → Messaging contracts: publishes payment events
Services/Payment/Payment.API/Controllers/PaymentController.cs - Payment service → Payment adapters: uses gateways
Services/Payment/Payment.API/Controllers/PaymentController.cs - Payment adapters → Payment providers: connects to
- Enrollment saga → Redis state/cache: stores saga state
- Course service → Enrollment hub: serves live status
Services/Course/Course.API/Program.cs - WPF application → Enrollment hub: receives updates
- Notification service → RabbitMQ: consumes events
- Course service → RabbitMQ: uses messaging
Services/Course/Course.API/Program.cs - Exam service → Exam repository: uses repository
Services/Exam/Exam.API/Program.cs - Exam service → Course gRPC: calls gRPC
Services/Exam/Exam.API/Program.cs - Exam service → Identity gRPC: calls gRPC
Services/Exam/Exam.API/Program.cs - Course service → Firestore stores: uses store
- Exam repository → Firestore stores: uses store
- Identity service → CQRS behaviors: uses pipelines
Services/Identity/Identity.API/Program.cs - Exam service → CQRS behaviors: uses pipelines
Services/Exam/Exam.API/Program.cs - Messaging contracts → RabbitMQ: configures transport
BuildingBlocks/BuildingBlocks.Messaging/MassTransit/Extensions.cs - Course service → Observability: configures telemetry
Services/Course/Course.API/Program.cs