- Fix case-insensitive email lookups in AuthService (RegisterAsync, LoginAsync, CreateAdminUserAsync)
- Fix User.Create factory method to explicitly set Role property (C# object initializer behavior)
- Assign Admin role to seeded admin user in SeedDataExtension
- Add [AllowAnonymous] to Register and Login endpoints in AuthController (defensive programming)
- Increase JWT ClockSkew to 5 minutes for clock difference tolerance
These fixes resolve issues where:
- Login fails with 401 due to case-sensitive email comparison
- User role is null instead of 'User' or 'Admin'
- JWT token validation too strict on clock synchronization
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Add Role property to User entity with migration
- Create BootstrapController for first admin user creation
- Remove [AllowAnonymous] from all learning content controllers
- Create AdminController with admin-only endpoints
- Create AdminService for user management
- Create UserReportService for progress reports
- Add UserRepository implementation
- Update AuthService with role support
feat(frontend): Implement authentication system
- Add AuthStore with React context for auth state management
- Create Login, Register, Landing, and Home pages
- Add ProtectedRoute and AdminRoute components
- Create Auth API types and client
- Configure Vite with @/ path alias
- Add comprehensive CSS styles for auth and landing pages
BREAKING CHANGE: All learning content now requires authentication.
Users must register and sign in before accessing lessons, quizzes, and stories.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- MistralConnector, TtsService, VoskService: Skip validation when required config values are empty
- ValidateAiConfigurations: Only validate if config values are set
- Prevents startup crashes in Docker when AI service environment variables are not provided
- Allows backend to start without Mistral/Coqui/Vosk configurations
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Created AppDbContextFactory for EF Core design-time DbContext creation
- Added DOTNET_RUNNING_IN_EF environment variable checks to skip validation during migrations
- Modified MistralConnector, TtsService, VoskService to skip validation in EF design-time
- Updated Program.cs ValidateAiConfigurations to skip during migrations
- Applied migration 20260613125706_AddStorySegmentAndStoryProgressTables to database
- Updated feature documentation for Phase 5 completion
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Phase 3 Tasks Completed:
- Added model directory validation to VoskService constructor
- Added configuration validation to TtsService constructor
- Added comprehensive setup instructions to VoskConfig and CoquiConfig
- Added AI Model Setup Guide to docs/features/ai-services.md with:
- Vosk model download and setup instructions
- Coqui TTS model download and setup instructions
- Mistral API configuration guide
- Verification commands
- Troubleshooting table
- Updated appsettings.json and appsettings.Development.json with comments
All configuration is now validated on service startup with helpful error messages
that guide users to download and configure the required models.
Build: Success
Tests: 296 passing (148 unit + 148 integration)
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Add Domain/Interfaces/IMistralConnector.cs with AiServiceException and AiErrorCode enum
- Add Infrastructure/Configuration/MistralConfig.cs with validation
- Add Infrastructure/Services/MistralConnector.cs with HTTP client implementation
- Add Infrastructure/Services/MistralRateLimiter.cs for rate limiting
- Add Infrastructure/Services/MistralCircuitBreaker.cs for circuit breaker pattern
- Add Application/Models/MistralRequest.cs with request models
- Add Application/Models/MistralResponse.cs with response models
- Update Program.cs to register IMistralConnector with MemoryCache, HttpClient, and config
- Update GermanApp.csproj with existing dependencies
- Update docs/features/ai-services.md with Phase 0 completion
Phase 0 of AI Services feature is complete. Mistral API Connector is ready for use by MistralService.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Fix MSTest compatibility with .NET 9.0 by upgrading to MSTest.TestFramework 4.2.3
- Move Tests directory to solution level (Tests/) to prevent test files from being compiled with GermanApp
- Update test project references to point to GermanApp/GermanApp.csproj
- Add InternalsVisibleTo attributes for test assemblies
- Make RefreshToken properties internal for testability
- Fix User.ChangeEmail null handling
- Add 46 comprehensive unit tests for User and RefreshToken domain entities
- All tests passing successfully
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>