- 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.
- 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
- corrige host remoto de deploy y automatiza buildx en servidor
- agrega configuracion S3 (bucket openccb-802726101181-us-east-2-an)
- actualiza Dockerfile de studio a rust:1-bookworm para evitar error GLIBC
- activa cache mounts de buildkit para cargo/npm en studio
- 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.
- Add verification of IA connectivity after deployment
- Show helpful troubleshooting message if Ollama is not accessible
- Document required UniFi USG Pro 4 configuration
- Add GIT_REPO variable for future use
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add map to detect POST requests to /auth/login
- Redirect POST /auth/login to CMS service (port 3001)
- Keep GET /auth/login on frontend (port 3000)
AI Status:
- Ollama server (t-800.norteamericano.cl:11434) not accessible from AWS EC2
- Connection timeout - need to open port 11434 or use public IP
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Remove complex location blocks from nginx
- Let Next.js rewrites handle API routing to CMS
- Keep only basic proxy configuration
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add location blocks for API endpoints to redirect to CMS (port 3001)
- Keep frontend pages on Next.js (port 3000)
- Handle /auth/login specially: GET->frontend, POST->CMS API
- Add maps for detecting API routes
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add studio-api-location.conf to redirect API routes to CMS service (port 3001)
- Routes /auth, /courses, /lessons, etc. now go to CMS instead of frontend
- Mount location config in nginx-proxy vhost.d directory
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add NEXT_PUBLIC_CMS_API_URL and NEXT_PUBLIC_LMS_API_URL to .env
- URLs use domains without ports (nginx proxy handles routing)
- Add validation to detect URLs with ports that cause CORS errors
- Show warnings if URLs have incorrect port configuration
- Verify environment variables in both .env and containers
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add option to keep or reset database (preserves data by default)
- Add option to preserve existing SSL certificates
- Show warnings before database reset with confirmation
- Skip certificate regeneration when preserve SSL is selected
- Update deployment summary with new options
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add all variables from current .env file
- Include comprehensive comments and descriptions
- Add sample values for development/production
- Organize by category for clarity
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Move NEXT_PUBLIC_CMS_API_URL and NEXT_PUBLIC_LMS_API_URL to .env
- Update docker-compose.yml to use ${VAR} syntax instead of hardcoded URLs
- Add default HTTPS URLs in .env.example for production
- Keeps install.sh with localhost defaults for development
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Change NEXT_PUBLIC_CMS_API_URL from http to https
- Change NEXT_PUBLIC_LMS_API_URL from http to https
- Fix Mixed Content error when serving over HTTPS
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
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>
Token Usage Dashboard (/admin/token-usage):
- Add Monthly Limit column with edit functionality
- Add % Used column with progress bars
- Color-coded alerts (green/yellow/orange/red)
- Real-time limit updates via API
- Alert banners for users >80% and >100%
User Management (/admin/users):
- Add Token Limit column
- Show percentage used with progress indicator
- Color-coded badges for usage levels
Admin Dashboard (/admin):
- Add AI Token Usage card
- Display total tokens, requests, and cost
- Link to detailed token usage page
All changes are fully responsive and dark-mode compatible.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>