Commit graph

8 commits

Author SHA1 Message Date
Lasse Rune Hansen
aa3db295ce fix(backend): Fix Mistral story generation with proper chat completion format
- Update MistralChatRequest to remove unused properties (User, Stop, FrequencyPenalty, PresencePenalty) causing 422 errors
- Add explicit JsonPropertyName attributes to ensure correct JSON serialization
- Update MistralService to send minimal requests matching Mistral API expectations
- Pass SegmentCount and CustomPrompt through StoryGenerationService to build proper prompts
- Add request logging in MistralConnector to debug API calls
- Update default model to mistral-small-latest
- Enhance error handling to log raw JSON responses

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-18 15:21:04 +02:00
Lasse Rune Hansen
987c005305 fix(backend/docker): add Mistral API key from appsettings.Development.json
Updated docker-compose.yml to use hardcoded Mistral API key from development
configuration instead of relying on environment variable.

This fixes the 500 error (which was masking a 401 from Mistral due to missing API key).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-17 17:52:06 +02:00
Lasse Rune Hansen
04ad7ef008 feat(backend/domain): add quiz question feature with Docker migration support
- Add QuizQuestion and QuizOption domain entities with QuestionType enum
- Add IQuizQuestionRepository and IQuizOptionRepository interfaces
- Add QuizQuestionRepository and QuizOptionRepository EF Core implementations
- Add QuizQuestionService with CRUD, quiz submission, and statistics
- Add QuizQuestionsController with comprehensive REST API endpoints
- Add QuizQuestionDto and related DTOs for API communication
- Add EF Core migration (20260612050652_AddQuizQuestionTables) for QuizQuestion and QuizOption
- Add seed data with sample quiz questions for Greetings, Numbers, Grammar lessons
- Update AppDbContext with DbSets and entity configurations
- Update Program.cs with migration retry logic for Docker
- Update docker-compose.yml with SeedDatabase configuration
- Add unit tests for QuizQuestionService

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-12 16:49:27 +02:00
Lasse Rune Hansen
614682b422 chore(ci): add Woodpecker secrets for Mistral API and JWT configuration
- Update .woodpecker.yml to inject Mistral and JWT secrets as environment variables
- Update docker-compose.yml to pass secrets to backend container
- Secrets are loaded from Woodpecker and passed via environment variables:
  - MISTRAL_APIKEY, MISTRAL_BASEURL, MISTRAL_DEFAULTMODEL, etc.
  - JWT_KEY, JWT_ISSUER, JWT_AUDIENCE, JWT_EXPIREHOURS
- Production deployment will use Woodpecker secrets instead of appsettings files

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-10 17:24:03 +02:00
Lasse Rune Hansen
8a2101120f fix: push to run pipeline 2026-06-07 13:07:54 +02:00
Lasse Rune Hansen
9f45c6de9c fix(infra): remove problematic health checks for now
- Remove HEALTHCHECK from backend Dockerfile
- Remove health checks from docker-compose.yml
- Change frontend depends_on to service_started
- Health checks can be added back once image tools are known

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-05 13:03:10 +02:00
Lasse Rune Hansen
8eeef011ce fix(infra): remove obsolete version field from docker-compose.yml
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-05 11:53:45 +02:00
Lasse Rune Hansen
79a59bccc4 feat(backend/infra): add Docker configuration for Phase 3
- Create Dockerfile for backend (.NET 9.0 multi-stage build)
- Create Dockerfile for frontend (Node + Nginx multi-stage build)
- Create nginx.conf for frontend with API proxy
- Create docker-compose.yml with db, backend, frontend services
- Add .dockerignore files for backend, frontend, and root
- Configure health checks for all services
- Configure PostgreSQL volume for persistent data

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-05 11:46:27 +02:00