- 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>
- Enhanced StoryGenerationService with CEFR-level-specific prompt templates
- Added GetStoryRequirements() method with level-specific requirements for A1-C1
- Added GetSegmentRequirements() method with level-specific requirements
- Story prompts now include detailed CEFR-level constraints:
- A1: Simple present tense, basic SVO structure, max 500 words
- A2: Present/past/future, subordinate clauses, max 1000 words
- B1: All tenses, modal verbs, complex sentences, max 2000 words
- B2: Nuanced tenses, all cases, Konjunktiv I/II, Passiv, max 3000 words
- C1: All tenses/moods, sophisticated vocabulary, literary devices
- Updated docs/features/story-integration.md for Phase 4 completion
- All 324 tests still pass
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- StoryServiceTests.cs: 536 lines, comprehensive tests for StoryService
- StoryGenerationServiceTests.cs: 469 lines, tests for AI story generation
- StoryUnlockServiceTests.cs: 292 lines, tests for story unlock logic
- StoryRepositoryTests.cs: 120 lines, tests for EF Core repository
- StoryProgressRepositoryTests.cs: 74 lines, tests for progress repository
- AppDbContext.cs: Made DbSet properties virtual for Moq compatibility
- Fixed return types in StoryRepository and StoryProgressRepository
- Updated docs/features/story-integration.md for Phase 3 completion
- All 324 unit tests pass
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Implement story integration backend services:
- Create StoryService (Application/Services/StoryService.cs) with full CRUD operations
- Create StoryGenerationService (Application/Services/StoryGenerationService.cs) for AI-powered story generation
- Uses IMistralService for text generation
- Uses ITtsService for audio generation
- Splits stories into segments per lesson
- Create StoryUnlockService (Application/Services/StoryUnlockService.cs) for progress management
- Handles lesson completion → story segment unlocking
- Create StoryController (Presentation/Controllers/StoryController.cs) with 12 endpoints:
- GET /api/story/levels - list levels with stories
- GET /api/story/levels/{levelId}/segments - get segments for level
- GET /api/story/segments/{id} - get specific segment
- POST /api/story/segments - create segment (Admin)
- PUT /api/story/segments/{id} - update segment (Admin)
- DELETE /api/story/segments/{id} - delete segment (Admin)
- POST /api/story/levels/{levelId}/generate - generate story with AI (Admin)
- POST /api/story/segments/{segmentId}/audio - generate audio (Admin)
- GET /api/story/levels/{levelId}/progress - get user progress
- POST /api/story/segments/{segmentId}/complete - mark as completed
- GET /api/story/levels/{levelId}/next - get next segment
- GET /api/story/segments/{segmentId}/unlocked - check if unlocked
- GET /api/story/segments/{segmentId}/audio - get audio URL
- GET /api/story/levels/{levelId}/lessons-with-stories - get lessons with story status
- Register all services in Program.cs DI container
- Update feature document to reflect Phase 2 completion
Next: Phase 3 - AI Integration (unit tests for services)
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Mark all acceptance criteria as complete
- Mark all functional requirements as implemented
- Update task checklist for all backend services
- Update progress history with Phase 5 completion
- Update Definition of Done section to reflect current state
- Note: Runtime-dependent items (model downloads, actual AI service testing) remain incomplete
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>
- Integrated Quiz completion with ProgressService: when a quiz is passed (>=80%), the associated lesson is automatically marked as completed
- Created LessonUnlockService for centralized lesson unlocking business logic
- Created LevelCompletionCalculator for calculating level completion metrics
- Registered new services in Program.cs DI container
- Updated QuizQuestionService to include ProgressService dependency
- Updated documentation (ROADMAP.md, lesson-management.md) to reflect completion
- Fixed QuizQuestionServiceTests to work with updated dependencies
All tests pass (296 total: 148 unit + 148 integration).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Add Production (Woodpecker CI/CD) section with secrets configuration
- List all required Woodpecker secrets for Mistral API
- Reference .woodpecker.yml and docker-compose.yml files
- Clarify development vs production configuration
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Mark unit tests for MistralConnector as complete
- Update progress history with Phase 0 completion and unit tests addition
- Note: 20 unit tests added, all 157 tests passing
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Add Configuration Setup section with appsettings.Development.json example
- Clarify where to add API key (local dev config, not version control)
- Add security note about not committing API keys
- Update Phase 0 deliverables with clarity
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>
- Add Phase 0: Mistral API Connector (2-3 hours) as first step
- Update status to In Progress
- Add MistralConnector to architecture diagram and components
- Add connector-specific tasks to implementation plan
- Add Mistral connector configuration examples
- Add progress history entry
- Update estimate from 10-16h to 12-18h
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Marked 'Write unit tests for services' as complete
- Added note about 30 new unit tests
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Marked Phase 2: Backend Services as COMPLETED
- Updated all Phase 2 tasks as completed
- Updated Backend task list with new service files
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Create feature branch: feature/lesson-management
- Update lesson-management.md status from Planned to In Progress
- Update ROADMAP.md: Feature 2.1 (Lesson Management) now In Progress
- Update Phase 1 status to Complete, Phase 2 to In Progress
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Remove GitHub Actions workflow (.github/workflows/dotnet-ci.yml)
- Create Woodpecker CI pipeline (.woodpecker.yml)
- Configure pipeline with 3 stages:
- build-and-test: runs on all branches, builds and runs unit/integration tests
- docker-build: builds and pushes Docker image to git.lrhdev.dk on main
- deploy: placeholder for deployment to deutsch.lrhdev.dk
- Update infrastructure-setup.md to document Woodpecker configuration
- Feature 1.1 (Infrastructure Setup) CI/CD tasks now complete for self-hosted setup
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Create .github/workflows/dotnet-ci.yml with:
- Build and test job (runs on all pushes to main/feature branches)
- Docker build job (builds and pushes to Docker Hub on main)
- Deploy job (placeholder for production deployment)
- Configure workflow to run .NET 9.0 build, unit tests, and integration tests
- Update infrastructure-setup.md to mark CI/CD tasks as complete
- Feature 1.1 (Infrastructure Setup) now 100% complete
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>
- Update status from Planned to In Progress
- Ready to implement JWT-based authentication
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- All Docker tasks completed
- All containers running successfully
- Update milestones and progress history
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Mark acceptance criteria as complete
- Update Implementation Plan Phase 1 and 2 tasks
- Update Milestones for Backend Project and Database
- Update all Backend and Database tasks as complete
- Add progress history entries
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>