tudo sobre a memoria da ia, formatação, memória e conhecimento de pdfs, junto da inserção de pdfs

This commit is contained in:
2026-05-14 00:13:29 +01:00
parent ad400a9c37
commit 55ec2521cf
14 changed files with 1483 additions and 97 deletions

View File

@@ -96,7 +96,22 @@ This document tracks the overall progress of the AI Study Assistant project deve
### **🔧 Development Setup (100%)**
### **<EFBFBD> Content Management System (75%)**
- [x] Teacher materials upload page
- Tela dedicada: `lib/features/materials/presentation/pages/teacher_materials_page.dart`
- Acesso via card "Upload Conteúdo" no dashboard
- Listagem em tempo real via StreamBuilder
- Upload de PDFs, imagens da galeria e fotos da câmara
- Firebase Storage integration
- Firestore collection `materials` com metadados
- [ ] Content processing for AI (RAG pipeline)
- [ ] Content approval workflow
- [ ] Content categorization
### **<2A>🔧 Development Setup (100%)**
- [x] Flutter SDK configuration
@@ -404,6 +419,24 @@ This document tracks the overall progress of the AI Study Assistant project deve
### **Last 24 Hours:**
-**Teacher Materials Upload Page** - Nova tela dedicada para professores enviarem materiais para a IA
- Ficheiro: `lib/features/materials/presentation/pages/teacher_materials_page.dart`
- **FASE 1**: Criar tela com AppBar "Materiais da Turma" e design consistente
- **FASE 2**: Ligar card "Upload Conteúdo" do dashboard a esta tela via `Navigator.push`
- **FASE 3**: Listar materiais do Firestore com `StreamBuilder` filtrado por `teacherId`
- Campos: `teacherId`, `fileName`, `fileUrl`, `type`, `createdAt`
- Ordenação: `createdAt` descendente
- Cards com ícone do tipo (PDF vermelho, Imagem azul) e data formatada
- **FASE 4**: FloatingActionButton com bottom sheet para adicionar ficheiros
- Opções: PDF (file_selector), Imagem da Galeria (image_picker), Foto da Câmara (image_picker)
- **FASE 5**: Upload para Firebase
- Firebase Storage: `materials/{teacherId}/{timestamp}_{filename}`
- Firestore document na coleção `materials`
- Snackbars de feedback (sucesso verde, erro vermelho)
- Loading indicator no FAB durante upload
- **Dependências adicionadas**: `file_selector: ^1.0.3` ao pubspec.yaml
- A lista atualiza automaticamente via StreamBuilder após upload
-**ETAPA 5: Student Classes List** - Students can now view their enrolled classes on the home page
- New `StudentClassesListWidget` component at `lib/features/dashboard/presentation/widgets/student_classes_list_widget.dart`
- Query: `.collection('enrollments').where('studentId', isEqualTo: currentUser.uid).orderBy('joinedAt', descending: true)`