Commit Graph

101 Commits

Author SHA1 Message Date
Nurfog 95d5dc9e3e feat(question-bank): refactor SQL queries to use a constant for selected columns 2026-04-08 09:37:02 -04:00
Nurfog 82ac2f09fc Add docker-compose.local.yml for local development setup
- Introduced a new docker-compose.local.yml file to facilitate local development.
- Disabled nginx-proxy and acme-companion services for local use.
- Exposed database and application ports directly to the host for easier access.
- Configured PostgreSQL to be accessible on localhost:5433.
- Mapped application ports for studio and experience services.
2026-04-07 17:36:19 -04:00
Nurfog 024bd6e46d feat: enhance asset import functionality and unit tracking
- Added WHISPER_URL environment variable to docker-compose for audio transcription service.
- Updated Nginx configuration to increase timeout settings for API requests.
- Enhanced asset ingestion process to extract unit numbers from ZIP entry paths, supporting various naming conventions.
- Implemented logic to split intensive courses into two regular courses during asset import.
- Added new fields to the Asset and QuestionBank models to track unit numbers and source asset links.
- Introduced backward-compatible fallbacks for fetching study plans and courses from legacy MySQL database.
- Improved error handling and progress tracking during ZIP file uploads in the frontend.
- Created a new SQL migration to add unit_number and source_asset_id columns to the assets and question_bank tables, along with necessary indexes for performance.
2026-04-07 13:38:22 -04:00
Nurfog 7f9b9d69ae feat: Implement SAM structure mirroring in PostgreSQL for study plans and courses
- Added functionality to save study plans and courses in SAM format to PostgreSQL.
- Updated SQL queries to reflect SAM-native column names and handle conflicts appropriately.
- Introduced new fields in the Asset model for English level and SAM identifiers.
- Enhanced the TestTemplateForm component to manage linked assets and shared materials.
- Created a new AdminSharedMaterialsPage for uploading ZIP files of shared materials.
- Added migrations to create SAM mirror tables and update the assets table with new columns.
2026-04-06 17:04:36 -04:00
Nurfog 92b4e4a3ac feat(cms/studio): agregar plantillas de curso reutilizables
- backend: CRUD básico de course templates y endpoint para crear curso desde plantilla
- migration: tabla course_templates con datos JSON del curso base
- frontend: nueva pantalla /course-templates para guardar y aplicar plantillas
- navegación: acceso desde menú Cursos
2026-04-06 15:34:57 -04:00
Nurfog 516a903497 Refactor audio handling and S3 integration in LMS service
- Removed company-specific template rules from template application logic.
- Enhanced question generation queries to support both 'imported-mysql' and 'imported-material' sources.
- Introduced S3 audio storage functionality, including client setup and audio key generation.
- Updated audio response evaluation to store audio files in S3 or fallback to DB.
- Added new API routes for asset ingestion and ZIP import in CMS service.
- Implemented role-based access control for audio responses in LMS service.
- Created a smoke test script for validating audio roles and permissions.
- Updated frontend to support course selection in audio evaluations.
2026-04-06 09:11:56 -04:00
Nurfog 4afccb89ef feat: Implementar reglas de negocio específicas de la empresa para la composición de plantillas de prueba 2026-04-02 14:15:16 -03:00
Nurfog 2b01d5d3f4 feat: Mejorar la gestión de plantillas de prueba y agregar validaciones para la composición de preguntas 2026-04-02 14:08:48 -03:00
Nurfog 4470e3d20b feat: Añadir selección de cantidad de preguntas en el formulario de plantillas de prueba y mejorar la gestión de edición 2026-04-02 12:21:45 -03:00
Nurfog d0a8e13fb6 feat: Añadir soporte para múltiples tipos de preguntas en la generación de plantillas de prueba y actualizar la interfaz correspondiente 2026-04-02 11:24:33 -03:00
Nurfog 83a25b3d28 feat: Implementar búsqueda de preguntas de respaldo en caso de fallos en la búsqueda semántica 2026-04-02 10:10:58 -03:00
Nurfog 7873c0c831 feat: Mejorar la generación de preguntas con RAG y optimizar el manejo de respuestas de IA 2026-04-01 17:13:30 -03:00
Nurfog 1f01a4a36b feat: Actualizar configuraciones de API y mejorar tiempos de espera en nginx 2026-04-01 16:12:03 -03:00
Nurfog abc6d59276 Refactor code structure for improved readability and maintainability 2026-03-31 16:26:38 -03:00
Nurfog 0bea4173f5 Refactor code structure for improved readability and maintainability 2026-03-31 14:39:04 -03:00
Nurfog 8b792e1d44 feat: Añadir columna organization_id a course_instructors y actualizar migraciones para alinear con el modelo compartido 2026-03-31 13:40:37 -03:00
Nurfog e4866c6dee feat: SAM integration, deployment scripts, and audio response enhancements
- Add SAM (Sistema de Administración Académica) integration with sync endpoints
- Add deployment automation (deploy.sh, remote-setup.sh, setup-nginx-ssl.sh)
- Add nginx proxy configuration for SSL with Let's Encrypt
- Add audio response support for student lessons (migrations, handlers)
- Add audio evaluations admin page
- Update CORS to support wildcard subdomains for norteamericano.cl
- Add comprehensive deployment documentation (DESPLIEGUE.md, ManualDeConfiguracion.md)
- Update docker-compose.yml with nginx-proxy and acme-companion services
- Remove outdated documentation files

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-27 09:20:23 -03:00
Nurfog 6ef2860b26 feat: Enforce Automatic Token Limits in AI Handlers
CMS Service:
- generate_quiz: Check 2000 tokens limit
- generate_course: Check 5000 tokens limit
- generate_hotspots: Check 2000 tokens limit
- generate_role_play: Check 2500 tokens limit
- summarize_lesson: Check 1500 tokens limit

LMS Service:
- chat_with_tutor: Check 1000 tokens limit
- evaluate_audio_response: Check 1500 tokens limit

Behavior:
- Returns HTTP 429 Too Many Requests when limit exceeded
- Error message indicates monthly limit exceeded
- Users must contact admin for limit increase
- Works with automatic alert system (Phase 3)

Total Functions Protected: 7

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-23 17:18:04 -03:00
Nurfog 3edc90b362 feat: Token Limit Alerts System (Phase 3)
Database:
- Create token_limit_alerts table to track alert history
- Add send_token_limit_notification() function
- Add check_token_limit_trigger() function
- Create AFTER INSERT trigger on ai_usage_logs

Features:
- Automatic notifications at 80%, 90%, and 100% thresholds
- One alert per threshold per month (no spam)
- Notification stored in notifications table
- Alert details logged in token_limit_alerts table

Notification Messages:
- 80%: Warning to monitor usage
- 90%: Strong warning to reduce IA usage
- 100%: Limit exceeded notification

Next: Add enforce automatic checks in AI handlers

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-23 17:08:01 -03:00
Nurfog 9e57756528 feat: Monthly token limits per user
Database:
- Add monthly_token_limit and token_limit_reset_day to users table
- Create ai_usage_monthly view for current month usage
- Add check_token_limit() function to verify available tokens
- Add get_user_usage_stats() function for historical usage

API Endpoints:
- PUT /admin/users/{user_id}/token-limit - Set monthly limit
- GET /admin/users/{user_id}/token-usage - Get user's current usage
- GET /admin/users/{user_id}/token-limit/check - Check if user has tokens

Features:
- Default limit: 100,000 tokens/month
- Reset day: 1st of month (configurable 1-28)
- Limit of 0 = unlimited tokens
- Enforce limits at API level (check before AI requests)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-23 16:10:27 -03:00
Nurfog d5679c05e8 fix: CORS headers for video/audio assets streaming
- Added HEAD method to CORS allowed methods
- Added Range header support for video streaming
- Exposed Content-Range and Accept-Ranges headers
- Required for proper video playback from Experience (port 3003) to CMS (port 3001)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-23 13:07:37 -03:00
Nurfog 2ff06ee7ae feat: i18n full support, responsive UI, multi-model AI config, and bug fixes
Major Features:
- Internationalization (i18n) with auto-detection for ES/EN/PT
- Mobile-first responsive design for Studio and Experience
- Multi-model AI configuration (llama3.2:3b, qwen3.5:9b, gpt-oss:latest)
- Course language configuration (auto-detect or fixed per course)

Backend Changes:
- shared/common: ModelType enum for intelligent model selection
- LMS: log_ai_usage function migration (fix chat tutor 500 error)
- LMS/CMS: course language config fields (language_setting, fixed_language)
- LMS: /courses/{id}/language-config endpoint for language detection

Frontend Changes:
- Experience: Enhanced i18n with browser language detection
- Experience: Audio recording with HTTPS check and error handling
- Studio: Memory game with unique pair IDs and debug logging
- Studio: Expanded translations (250+ keys for ES, EN, PT)
- Both: Language selector in headers (mobile responsive)

Documentation:
- AI_MODELS_CONFIG.md: Multi-model configuration guide
- RESPONSIVIDAD_GUIA.md: Mobile-first design patterns
- I18N_RESPONSIVIDAD_IMPLEMENTACION.md: Implementation details
- DEBUG_AUDIO_RECORDING.md: Audio troubleshooting guide
- DEBUG_MEMORY_GAME.md: Memory game debugging steps

Bug Fixes:
- Fix chat tutor 500 error (missing log_ai_usage function)
- Fix audio recording (HTTPS check, browser compatibility)
- Fix memory game pair IDs (unique ID generation)
- Fix HotspotBlock TypeScript errors

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-23 12:24:22 -03:00
Nurfog 0598fc4865 feat: Fix tokens Revenue stream 2026-03-19 14:54:31 -03:00
Nurfog 686eb377f0 feat: activate AI usage 2026-03-19 11:21:59 -03:00
Nurfog a220e9742f feat:fix data importation 2026-03-19 09:33:33 -03:00
Nurfog 42e0934a0e feat: fix importation from remote DB 2026-03-18 17:59:54 -03:00
Nurfog 64d3d5be91 feat: implementing embedding AI 2026-03-18 17:15:39 -03:00
Nurfog e8cdf61468 feath: save questions generated with AI 2026-03-17 17:59:55 -03:00
Nurfog 55f9a3196e feat: fix AI for generation questions with RAG 2026-03-17 17:44:42 -03:00
Nurfog 31939e31ad feat: fix frontend and activate imports 2026-03-17 13:53:12 -03:00
Nurfog be699ad6ab feat: token count implement 2026-03-17 12:07:56 -03:00
Nurfog 41279585f6 feat: creacion de plantillas para pruebas, prototipo 2026-03-16 12:28:29 -03:00
Nurfog 3167723a89 feat: Update default admin credentials and organization branding, refactor admin creation in install script to direct database insertion, disable rate limiting, and update documentation. 2026-03-13 13:24:06 -03:00
Nurfog c49a49dc19 feat: Add comprehensive project context documentation and refactor CMS service to include HTTP tracing and streamline CORS configuration. 2026-03-13 12:43:32 -03:00
Nurfog 15ecc4e3b2 feat: Update database port to 5433, refine database creation and migration scripts, and add explicit CORS OPTIONS handling to CMS service routes. 2026-03-13 10:46:54 -03:00
Nurfog f9f1238310 feat: Implement health checks, rate limiting, and security headers for services, update Node.js versions, and add Prettier configuration for frontend. 2026-03-12 17:09:05 -03:00
Nurfog 2fe6dcea59 feat: Implement default branding synchronization and improve API header handling. 2026-03-09 17:55:10 -03:00
Nurfog bde5be22e7 feat: Introduce AI code hinting, enforce single-tenant organization model, and add a Code Lab block component. 2026-03-09 17:24:15 -03:00
Nurfog b9c17ce67b feat: Add Mermaid diagram block with AI generation capabilities to lessons. 2026-03-09 14:45:52 -03:00
Nurfog bc5b240984 feat: Implement AI-generated Role Playing and Hotspot interactive content blocks with UI and service integration. 2026-03-09 13:46:47 -03:00
Nurfog c292efdc28 refactor: remove obsolete AI image and video generation traces from courses and lessons. 2026-03-09 10:52:57 -03:00
Nurfog ebd20b5b54 feat: Add AI-powered memory match game generation and remove AI image generation from the lesson editor. 2026-03-09 10:43:59 -03:00
Nurfog 7406de9a1b Remove AI image generation functionality from CMS and expand Docker ignore rules. 2026-03-09 10:06:26 -03:00
Nurfog 997af5d473 feat: introduce global AI task dashboard, enhance user profiles with new fields, and update database models with default implementations. 2026-03-06 12:37:39 -03:00
Nurfog c034f7223d feat: Unify background task representation and display by introducing generic status, progress, and task type fields across frontend and backend. 2026-03-05 16:58:23 -03:00
Nurfog 935e6b9675 feat: Add generation status to courses, implement cancellation, and enhance AI bridge call with retry logic. 2026-03-04 16:55:31 -03:00
Nurfog 01c54429a0 feat: Introduce course marketing features with dedicated metadata, image generation, and UI in both studio and experience apps. 2026-03-04 15:41:34 -03:00
Nurfog 4458decd22 actualizaciones 2026-03-03 17:44:24 -03:00
Nurfog 420003f2d5 feat: Allow super-admins to retrieve courses across organizations and update navigation link styles to text-sm and text-slate-600. 2026-03-02 11:59:38 -03:00
Nurfog 81e1830563 feat: Implement dark mode styling across UI components and update README with roadmap and system requirements. 2026-03-02 11:29:55 -03:00