docs: Correcciones P1 completas - Communication, Mecanicas, Backend inventory
## Documentacion nueva: - SCHEMA-COMMUNICATION.md: Tabla messages, indices, RLS, funciones - MECANICAS-EDUCATIVAS.md: 30 mecanicas documentadas por modulo - 3 mecanicas extra identificadas (Emparejamiento, MapaConceptual, LecturaInferencial) - 4 mecanicas removidas documentadas (M4) ## Actualizaciones: - BACKEND_INVENTORY.yml v3.0.0: Metricas corregidas - modules: 16, services: 103, controllers: 76 - Admin module: 22 controllers, 22 services Progreso auditoria: P0 100%, P1 100% Pendiente: P2 (6 tareas) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
11f43c0be9
commit
f248f65071
286
projects/gamilit/docs/database/SCHEMA-COMMUNICATION.md
Normal file
286
projects/gamilit/docs/database/SCHEMA-COMMUNICATION.md
Normal file
@ -0,0 +1,286 @@
|
|||||||
|
# SCHEMA COMMUNICATION
|
||||||
|
|
||||||
|
**Proyecto:** GAMILIT - Plataforma Educativa Gamificada
|
||||||
|
**Schema:** communication
|
||||||
|
**Version:** 1.0
|
||||||
|
**Fecha:** 2025-12-23
|
||||||
|
**Prioridad:** P1 (Critico para comunicacion)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## RESUMEN
|
||||||
|
|
||||||
|
| Metrica | Valor |
|
||||||
|
|---------|-------|
|
||||||
|
| **Tablas** | 1 |
|
||||||
|
| **Vistas** | 1 |
|
||||||
|
| **Funciones** | 2 |
|
||||||
|
| **Triggers** | 1 |
|
||||||
|
| **Indices** | 11 |
|
||||||
|
| **Politicas RLS** | 6 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## PROPOSITO
|
||||||
|
|
||||||
|
Sistema completo de mensajeria y comunicacion entre docentes y estudiantes:
|
||||||
|
- Mensajeria directa (1-a-1)
|
||||||
|
- Anuncios en aulas (docente a todos)
|
||||||
|
- Chat grupal en aulas
|
||||||
|
- Feedback privado en asignaciones
|
||||||
|
- Comentarios en ejercicios
|
||||||
|
- Reacciones y adjuntos
|
||||||
|
- Moderacion y soft-delete
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. TABLA: messages
|
||||||
|
|
||||||
|
**Proposito:** Almacena todos los mensajes, anuncios y comunicaciones
|
||||||
|
|
||||||
|
### Columnas Principales
|
||||||
|
|
||||||
|
| Columna | Tipo | Descripcion |
|
||||||
|
|---------|------|-------------|
|
||||||
|
| id | UUID | PK (auto-generada) |
|
||||||
|
| sender_id | UUID | FK a profiles - Remitente |
|
||||||
|
| recipient_id | UUID | FK a profiles - Destinatario (opcional) |
|
||||||
|
| classroom_id | UUID | FK a classrooms - Aula (opcional) |
|
||||||
|
| thread_id | UUID | FK self - Para conversaciones enhebradas |
|
||||||
|
| parent_message_id | UUID | FK self - Para replies anidadas |
|
||||||
|
| subject | VARCHAR(255) | Asunto (mensajes directos) |
|
||||||
|
| content | TEXT | Contenido del mensaje (requerido) |
|
||||||
|
| message_type | VARCHAR(50) | Tipo de mensaje |
|
||||||
|
| attachments | JSONB | Array de adjuntos |
|
||||||
|
| is_read | BOOLEAN | Si ha sido leido |
|
||||||
|
| read_at | TIMESTAMPTZ | Cuando fue leido |
|
||||||
|
| is_deleted | BOOLEAN | Soft-delete flag |
|
||||||
|
| priority | VARCHAR(20) | low, normal, high, urgent |
|
||||||
|
| is_pinned | BOOLEAN | Si esta fijado |
|
||||||
|
| reactions | JSONB | Reacciones emoji |
|
||||||
|
| is_flagged | BOOLEAN | Si fue reportado |
|
||||||
|
| moderation_status | VARCHAR(50) | Estado de moderacion |
|
||||||
|
| metadata | JSONB | Contexto adicional |
|
||||||
|
|
||||||
|
### Tipos de Mensaje (message_type)
|
||||||
|
|
||||||
|
| Tipo | Descripcion |
|
||||||
|
|------|-------------|
|
||||||
|
| direct | Mensaje privado 1-a-1 |
|
||||||
|
| classroom_announcement | Anuncio del docente al aula |
|
||||||
|
| classroom_chat | Chat grupal del aula |
|
||||||
|
| private_feedback | Feedback privado en tarea |
|
||||||
|
| assignment_comment | Comentario en asignacion |
|
||||||
|
| system | Mensaje del sistema |
|
||||||
|
|
||||||
|
### Formato de Attachments (JSONB)
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"type": "file|image|video",
|
||||||
|
"url": "https://...",
|
||||||
|
"name": "documento.pdf",
|
||||||
|
"size": 1024
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Formato de Reactions (JSONB)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"thumbs_up": ["uuid-1", "uuid-2"],
|
||||||
|
"heart": ["uuid-3"],
|
||||||
|
"star": ["uuid-4", "uuid-5"]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. INDICES
|
||||||
|
|
||||||
|
| Indice | Columnas | Proposito |
|
||||||
|
|--------|----------|-----------|
|
||||||
|
| idx_messages_sender | sender_id, created_at DESC | Mensajes enviados |
|
||||||
|
| idx_messages_recipient | recipient_id, created_at DESC | Bandeja de entrada |
|
||||||
|
| idx_messages_classroom | classroom_id, created_at DESC | Mensajes de aula |
|
||||||
|
| idx_messages_unread | recipient_id, created_at DESC | No leidos |
|
||||||
|
| idx_messages_thread | thread_id, created_at ASC | Conversaciones |
|
||||||
|
| idx_messages_parent | parent_message_id, created_at ASC | Replies |
|
||||||
|
| idx_messages_flagged | flagged_at DESC | Moderacion |
|
||||||
|
| idx_messages_requiring_response | recipient_id, response_deadline | Con deadline |
|
||||||
|
| idx_messages_classroom_type | classroom_id, message_type, created_at DESC | Filtrado |
|
||||||
|
| idx_messages_attachments | attachments (GIN) | Busqueda JSON |
|
||||||
|
| idx_messages_metadata | metadata (GIN) | Busqueda JSON |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. TRIGGER
|
||||||
|
|
||||||
|
### trigger_update_messages_timestamp
|
||||||
|
|
||||||
|
**Evento:** BEFORE UPDATE
|
||||||
|
**Funcion:** communication.update_messages_timestamp()
|
||||||
|
|
||||||
|
**Comportamiento:**
|
||||||
|
- Actualiza `updated_at` en cada modificacion
|
||||||
|
- Auto-calcula `edited_at` cuando cambia contenido
|
||||||
|
- Incrementa `edit_count` con cada edicion
|
||||||
|
- Auto-calcula `read_at` cuando `is_read = TRUE`
|
||||||
|
- Auto-calcula `deleted_at` cuando `is_deleted = TRUE`
|
||||||
|
- Auto-calcula `flagged_at` cuando `is_flagged = TRUE`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. FUNCIONES
|
||||||
|
|
||||||
|
### get_unread_count()
|
||||||
|
|
||||||
|
```sql
|
||||||
|
FUNCTION get_unread_count(
|
||||||
|
p_user_id UUID,
|
||||||
|
p_classroom_id UUID DEFAULT NULL
|
||||||
|
) RETURNS INTEGER
|
||||||
|
```
|
||||||
|
|
||||||
|
**Proposito:** Obtener contador de mensajes no leidos
|
||||||
|
|
||||||
|
**Ejemplo:**
|
||||||
|
```sql
|
||||||
|
SELECT communication.get_unread_count('user-uuid', 'classroom-uuid');
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### mark_conversation_read()
|
||||||
|
|
||||||
|
```sql
|
||||||
|
FUNCTION mark_conversation_read(
|
||||||
|
p_user_id UUID,
|
||||||
|
p_thread_id UUID
|
||||||
|
) RETURNS INTEGER
|
||||||
|
```
|
||||||
|
|
||||||
|
**Proposito:** Marcar todos los mensajes de un hilo como leidos
|
||||||
|
|
||||||
|
**Ejemplo:**
|
||||||
|
```sql
|
||||||
|
SELECT communication.mark_conversation_read('user-uuid', 'thread-uuid');
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. VISTA: recent_classroom_messages
|
||||||
|
|
||||||
|
**Proposito:** Mensajes recientes de aula con info del remitente (widget de chat)
|
||||||
|
|
||||||
|
| Columna | Descripcion |
|
||||||
|
|---------|-------------|
|
||||||
|
| id | UUID del mensaje |
|
||||||
|
| classroom_id | UUID del aula |
|
||||||
|
| sender_id | UUID del remitente |
|
||||||
|
| sender_name | Nombre del remitente |
|
||||||
|
| sender_avatar | URL del avatar |
|
||||||
|
| content | Contenido |
|
||||||
|
| message_type | Tipo |
|
||||||
|
| attachments | Adjuntos |
|
||||||
|
| reactions | Reacciones |
|
||||||
|
| is_pinned | Si esta fijado |
|
||||||
|
| created_at | Fecha creacion |
|
||||||
|
| reply_count | Cantidad de replies |
|
||||||
|
|
||||||
|
**Filtros:**
|
||||||
|
- Solo mensajes de aula
|
||||||
|
- Excluye eliminados
|
||||||
|
- Solo mensajes de nivel superior
|
||||||
|
|
||||||
|
**Ordenamiento:**
|
||||||
|
1. Fijados primero
|
||||||
|
2. Por fecha descendente
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. POLITICAS RLS (Row Level Security)
|
||||||
|
|
||||||
|
### SELECT Policies
|
||||||
|
|
||||||
|
| Politica | Descripcion | Condicion |
|
||||||
|
|----------|-------------|-----------|
|
||||||
|
| messages_select_own | Ver propios mensajes | sender_id OR recipient_id = current_user |
|
||||||
|
| messages_select_classroom | Ver mensajes de aula | Es miembro del aula |
|
||||||
|
| messages_select_admin | Admins ven todo | role IN (super_admin, admin_teacher) |
|
||||||
|
|
||||||
|
### INSERT Policy
|
||||||
|
|
||||||
|
| Politica | Descripcion | Condicion |
|
||||||
|
|----------|-------------|-----------|
|
||||||
|
| messages_insert_own | Solo enviar como uno mismo | sender_id = current_user |
|
||||||
|
|
||||||
|
### UPDATE Policy
|
||||||
|
|
||||||
|
| Politica | Descripcion | Condicion |
|
||||||
|
|----------|-------------|-----------|
|
||||||
|
| messages_update_own | Solo editar propios | sender_id = current_user |
|
||||||
|
|
||||||
|
### DELETE Policy
|
||||||
|
|
||||||
|
| Politica | Descripcion | Condicion |
|
||||||
|
|----------|-------------|-----------|
|
||||||
|
| messages_delete_own | Solo eliminar propios | sender_id = current_user |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. CASOS DE USO
|
||||||
|
|
||||||
|
1. **Mensajeria Directa:** Docente-Estudiante 1-a-1
|
||||||
|
2. **Anuncios de Aula:** Docente comunica a todos
|
||||||
|
3. **Chat Grupal:** Conversacion en aula
|
||||||
|
4. **Feedback de Asignaciones:** Comentarios privados en tareas
|
||||||
|
5. **Comentarios de Ejercicios:** Feedback especifico
|
||||||
|
6. **Conversaciones Enhebradas:** Replies y sub-threads
|
||||||
|
7. **Reacciones Emoji:** Engagement con emojis
|
||||||
|
8. **Adjuntos:** Archivos, imagenes, videos
|
||||||
|
9. **Moderacion:** Reporte y bloqueo
|
||||||
|
10. **Notificaciones:** Tracking de no leidos
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 8. RELACIONES
|
||||||
|
|
||||||
|
```
|
||||||
|
communication.messages
|
||||||
|
└──> auth_management.profiles (sender_id) N:1
|
||||||
|
└──> auth_management.profiles (recipient_id) N:1
|
||||||
|
└──> social_features.classrooms (classroom_id) N:1
|
||||||
|
└──> communication.messages (thread_id) N:1 (self)
|
||||||
|
└──> communication.messages (parent_message_id) N:1 (self)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 9. PERMISOS
|
||||||
|
|
||||||
|
```sql
|
||||||
|
GRANT USAGE ON SCHEMA communication TO gamilit_user;
|
||||||
|
GRANT SELECT, INSERT, UPDATE, DELETE ON communication.messages TO gamilit_user;
|
||||||
|
GRANT SELECT ON communication.recent_classroom_messages TO gamilit_user;
|
||||||
|
GRANT EXECUTE ON FUNCTION communication.get_unread_count TO gamilit_user;
|
||||||
|
GRANT EXECUTE ON FUNCTION communication.mark_conversation_read TO gamilit_user;
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 10. INFORMACION TECNICA
|
||||||
|
|
||||||
|
| Atributo | Valor |
|
||||||
|
|----------|-------|
|
||||||
|
| Creado | 2025-11-19 |
|
||||||
|
| User Stories | US-PM-005, US-AE-006 |
|
||||||
|
| RLS | Habilitado y forzado |
|
||||||
|
| Soft-Delete | Implementado |
|
||||||
|
| Audit Trail | Completo |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Generado por:** Requirements-Analyst
|
||||||
|
**Fecha:** 2025-12-23
|
||||||
|
**Version:** 1.0
|
||||||
259
projects/gamilit/docs/frontend/MECANICAS-EDUCATIVAS.md
Normal file
259
projects/gamilit/docs/frontend/MECANICAS-EDUCATIVAS.md
Normal file
@ -0,0 +1,259 @@
|
|||||||
|
# MECANICAS EDUCATIVAS - FRONTEND
|
||||||
|
|
||||||
|
**Proyecto:** GAMILIT - Plataforma Educativa Gamificada
|
||||||
|
**Version:** 1.0
|
||||||
|
**Fecha:** 2025-12-23
|
||||||
|
**Auditoria:** Comparacion documentacion vs implementacion
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## RESUMEN
|
||||||
|
|
||||||
|
| Modulo | Oficiales | Implementadas | Extras |
|
||||||
|
|--------|-----------|---------------|--------|
|
||||||
|
| M1 - Comprension Literal | 5 | 7 | +2 |
|
||||||
|
| M2 - Comprension Inferencial | 5 | 6 | +1 |
|
||||||
|
| M3 - Comprension Critica | 5 | 5 | 0 |
|
||||||
|
| M4 - Lectura Digital | 5 | 5 | 0 |
|
||||||
|
| M5 - Produccion Lectora | 3 | 3 | 0 |
|
||||||
|
| Auxiliares | - | 4 | - |
|
||||||
|
| **TOTAL** | **23** | **30** | **+3** |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## MODULO 1: COMPRENSION LITERAL
|
||||||
|
|
||||||
|
**Ubicacion:** `features/mechanics/module1/`
|
||||||
|
|
||||||
|
### Mecanicas Oficiales (5)
|
||||||
|
|
||||||
|
| Mecanica | Carpeta | Componente | Estado |
|
||||||
|
|----------|---------|------------|--------|
|
||||||
|
| Crucigrama | Crucigrama/ | CrucigramaExercise.tsx | ✅ Implementado |
|
||||||
|
| Linea de Tiempo | Timeline/ | TimelineExercise.tsx | ✅ Implementado |
|
||||||
|
| Completar Espacios | CompletarEspacios/ | CompletarEspaciosExercise.tsx | ✅ Implementado |
|
||||||
|
| Verdadero/Falso | VerdaderoFalso/ | VerdaderoFalsoExercise.tsx | ✅ Implementado |
|
||||||
|
| Sopa de Letras | SopaLetras/ | SopaLetrasExercise.tsx | ✅ Implementado (BONUS) |
|
||||||
|
|
||||||
|
### Mecanicas Extra (+2)
|
||||||
|
|
||||||
|
| Mecanica | Carpeta | Componente | Nota |
|
||||||
|
|----------|---------|------------|------|
|
||||||
|
| Emparejamiento | Emparejamiento/ | EmparejamientoExercise.tsx | No en doc oficial |
|
||||||
|
| Mapa Conceptual | MapaConceptual/ | MapaConceptualExercise.tsx | No en doc oficial |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## MODULO 2: COMPRENSION INFERENCIAL
|
||||||
|
|
||||||
|
**Ubicacion:** `features/mechanics/module2/`
|
||||||
|
|
||||||
|
### Mecanicas Oficiales (5)
|
||||||
|
|
||||||
|
| Mecanica | Carpeta | Componente | Estado |
|
||||||
|
|----------|---------|------------|--------|
|
||||||
|
| Detective Textual | DetectiveTextual/ | DetectiveTextualExercise.tsx | ✅ Implementado |
|
||||||
|
| Construccion Hipotesis | ConstruccionHipotesis/ | CausaEfectoExercise.tsx | ✅ Implementado |
|
||||||
|
| Prediccion Narrativa | PrediccionNarrativa/ | PrediccionNarrativaExercise.tsx | ✅ Implementado |
|
||||||
|
| Puzzle Contexto | PuzzleContexto/ | PuzzleContextoExercise.tsx | ✅ Implementado |
|
||||||
|
| Rueda Inferencias | RuedaInferencias/ | RuedaInferenciasExercise.tsx | ✅ Implementado |
|
||||||
|
|
||||||
|
### Mecanicas Extra (+1)
|
||||||
|
|
||||||
|
| Mecanica | Carpeta | Componente | Nota |
|
||||||
|
|----------|---------|------------|------|
|
||||||
|
| Lectura Inferencial | LecturaInferencial/ | LecturaInferencialExercise.tsx | No en doc oficial |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## MODULO 3: COMPRENSION CRITICA Y VALORATIVA
|
||||||
|
|
||||||
|
**Ubicacion:** `features/mechanics/module3/`
|
||||||
|
|
||||||
|
### Mecanicas Oficiales (5) - Todas Implementadas
|
||||||
|
|
||||||
|
| Mecanica | Carpeta | Componente | Estado |
|
||||||
|
|----------|---------|------------|--------|
|
||||||
|
| Tribunal Opiniones | TribunalOpiniones/ | TribunalOpinionesExercise.tsx | ✅ Implementado |
|
||||||
|
| Debate Digital | DebateDigital/ | DebateDigitalExercise.tsx | ✅ Implementado |
|
||||||
|
| Analisis Fuentes | AnalisisFuentes/ | AnalisisFuentesExercise.tsx | ✅ Implementado |
|
||||||
|
| Podcast Argumentativo | PodcastArgumentativo/ | PodcastArgumentativoExercise.tsx | ✅ Implementado |
|
||||||
|
| Matriz Perspectivas | MatrizPerspectivas/ | MatrizPerspectivasExercise.tsx | ✅ Implementado |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## MODULO 4: LECTURA DIGITAL Y MULTIMODAL
|
||||||
|
|
||||||
|
**Ubicacion:** `features/mechanics/module4/`
|
||||||
|
|
||||||
|
### Mecanicas Oficiales (5) - Todas Implementadas
|
||||||
|
|
||||||
|
| Mecanica | Carpeta | Componente | Estado |
|
||||||
|
|----------|---------|------------|--------|
|
||||||
|
| Verificador Fake News | VerificadorFakeNews/ | VerificadorFakeNewsExercise.tsx | ✅ Implementado |
|
||||||
|
| Infografia Interactiva | InfografiaInteractiva/ | InfografiaInteractivaExercise.tsx | ✅ Implementado |
|
||||||
|
| Quiz TikTok | QuizTikTok/ | QuizTikTokExercise.tsx | ✅ Implementado |
|
||||||
|
| Navegacion Hipertextual | NavegacionHipertextual/ | NavegacionHipertextualExercise.tsx | ✅ Implementado |
|
||||||
|
| Analisis Memes | AnalisisMemes/ | AnalisisMemesExercise.tsx | ✅ Implementado |
|
||||||
|
|
||||||
|
### Mecanicas Removidas (4)
|
||||||
|
|
||||||
|
Las siguientes mecanicas estaban en el enum pero fueron removidas:
|
||||||
|
- resena_critica
|
||||||
|
- chat_literario
|
||||||
|
- email_formal
|
||||||
|
- ensayo_argumentativo
|
||||||
|
|
||||||
|
> Comentario en ExercisePage.tsx:146: "exercises deleted"
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## MODULO 5: PRODUCCION Y EXPRESION LECTORA
|
||||||
|
|
||||||
|
**Ubicacion:** `features/mechanics/module5/`
|
||||||
|
|
||||||
|
### Mecanicas Oficiales (3) - Todas Implementadas
|
||||||
|
|
||||||
|
> **Nota:** El estudiante elige 1 de 3 opciones
|
||||||
|
|
||||||
|
| Mecanica | Carpeta | Componente | Opcion |
|
||||||
|
|----------|---------|------------|--------|
|
||||||
|
| Diario Multimedia | DiarioMultimedia/ | DiarioMultimediaExercise.tsx | Opcion A |
|
||||||
|
| Comic Digital | ComicDigital/ | ComicDigitalExercise.tsx | Opcion B |
|
||||||
|
| Video Carta | VideoCarta/ | VideoCartaExercise.tsx | Opcion C |
|
||||||
|
|
||||||
|
### Caracteristicas M5
|
||||||
|
|
||||||
|
- **Evaluacion:** Requiere revision manual del docente
|
||||||
|
- **Entrega:** Proyecto creativo
|
||||||
|
- **Tiempo:** Sin limite estricto
|
||||||
|
- **Rubrica:** Evaluacion cualitativa
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## MECANICAS AUXILIARES
|
||||||
|
|
||||||
|
**Ubicacion:** `features/mechanics/auxiliares/`
|
||||||
|
|
||||||
|
| Mecanica | Carpeta | Componente | Uso |
|
||||||
|
|----------|---------|------------|-----|
|
||||||
|
| Call to Action | CallToAction/ | CallToActionExercise.tsx | Ejercicios de engagement |
|
||||||
|
| Collage Prensa | CollagePrensa/ | CollagePrensaExercise.tsx | Ejercicios creativos |
|
||||||
|
| Comprension Auditiva | ComprensiónAuditiva/ | ComprensiónAuditivaExercise.tsx | Ejercicios de audio |
|
||||||
|
| Texto en Movimiento | TextoEnMovimiento/ | TextoEnMovimientoExercise.tsx | Ejercicios dinamicos |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ESTRUCTURA DE CARPETAS
|
||||||
|
|
||||||
|
```
|
||||||
|
features/mechanics/
|
||||||
|
├── module1/
|
||||||
|
│ ├── Crucigrama/
|
||||||
|
│ │ ├── CrucigramaExercise.tsx
|
||||||
|
│ │ ├── CrucigramaGrid.tsx
|
||||||
|
│ │ ├── CrucigramaClue.tsx
|
||||||
|
│ │ ├── crucigramaTypes.ts
|
||||||
|
│ │ └── crucigramaSchemas.ts
|
||||||
|
│ ├── Timeline/
|
||||||
|
│ ├── CompletarEspacios/
|
||||||
|
│ ├── VerdaderoFalso/
|
||||||
|
│ ├── SopaLetras/
|
||||||
|
│ ├── Emparejamiento/ (EXTRA)
|
||||||
|
│ └── MapaConceptual/ (EXTRA)
|
||||||
|
│
|
||||||
|
├── module2/
|
||||||
|
│ ├── DetectiveTextual/
|
||||||
|
│ ├── ConstruccionHipotesis/
|
||||||
|
│ ├── PrediccionNarrativa/
|
||||||
|
│ ├── PuzzleContexto/
|
||||||
|
│ ├── RuedaInferencias/
|
||||||
|
│ └── LecturaInferencial/ (EXTRA)
|
||||||
|
│
|
||||||
|
├── module3/
|
||||||
|
│ ├── TribunalOpiniones/
|
||||||
|
│ ├── DebateDigital/
|
||||||
|
│ ├── AnalisisFuentes/
|
||||||
|
│ ├── PodcastArgumentativo/
|
||||||
|
│ └── MatrizPerspectivas/
|
||||||
|
│
|
||||||
|
├── module4/
|
||||||
|
│ ├── VerificadorFakeNews/
|
||||||
|
│ ├── InfografiaInteractiva/
|
||||||
|
│ ├── QuizTikTok/
|
||||||
|
│ ├── NavegacionHipertextual/
|
||||||
|
│ └── AnalisisMemes/
|
||||||
|
│
|
||||||
|
├── module5/
|
||||||
|
│ ├── DiarioMultimedia/
|
||||||
|
│ ├── ComicDigital/
|
||||||
|
│ └── VideoCarta/
|
||||||
|
│
|
||||||
|
└── auxiliares/
|
||||||
|
├── CallToAction/
|
||||||
|
├── CollagePrensa/
|
||||||
|
├── ComprensiónAuditiva/
|
||||||
|
└── TextoEnMovimiento/
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## MAPEO DE TIPOS (ENUM)
|
||||||
|
|
||||||
|
**Archivo:** `shared/constants/enums.constants.ts`
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
export enum ExerciseType {
|
||||||
|
// Modulo 1
|
||||||
|
CRUCIGRAMA = 'crucigrama',
|
||||||
|
LINEA_TIEMPO = 'linea_tiempo',
|
||||||
|
COMPLETAR_ESPACIOS = 'completar_espacios',
|
||||||
|
VERDADERO_FALSO = 'verdadero_falso',
|
||||||
|
SOPA_LETRAS = 'sopa_letras',
|
||||||
|
EMPAREJAMIENTO = 'emparejamiento',
|
||||||
|
MAPA_CONCEPTUAL = 'mapa_conceptual',
|
||||||
|
|
||||||
|
// Modulo 2
|
||||||
|
DETECTIVE_TEXTUAL = 'detective_textual',
|
||||||
|
CONSTRUCCION_HIPOTESIS = 'construccion_hipotesis',
|
||||||
|
PREDICCION_NARRATIVA = 'prediccion_narrativa',
|
||||||
|
PUZZLE_CONTEXTO = 'puzzle_contexto',
|
||||||
|
RUEDA_INFERENCIAS = 'rueda_inferencias',
|
||||||
|
LECTURA_INFERENCIAL = 'lectura_inferencial',
|
||||||
|
|
||||||
|
// ... etc
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## RECOMENDACIONES
|
||||||
|
|
||||||
|
### Documentacion Pendiente
|
||||||
|
|
||||||
|
1. **Actualizar documento de diseno** con mecanicas extra:
|
||||||
|
- Emparejamiento (M1)
|
||||||
|
- Mapa Conceptual (M1)
|
||||||
|
- Lectura Inferencial (M2)
|
||||||
|
|
||||||
|
2. **Documentar decision** de remover mecanicas M4:
|
||||||
|
- resena_critica
|
||||||
|
- chat_literario
|
||||||
|
- email_formal
|
||||||
|
- ensayo_argumentativo
|
||||||
|
|
||||||
|
### Estado por Modulo
|
||||||
|
|
||||||
|
| Modulo | Doc vs Impl | Accion Requerida |
|
||||||
|
|--------|-------------|------------------|
|
||||||
|
| M1 | +2 extras | Documentar extras |
|
||||||
|
| M2 | +1 extra | Documentar extra |
|
||||||
|
| M3 | ✅ Match | Ninguna |
|
||||||
|
| M4 | 4 removidas | Documentar decision |
|
||||||
|
| M5 | ✅ Match | Ninguna |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Generado por:** Requirements-Analyst
|
||||||
|
**Fecha:** 2025-12-23
|
||||||
|
**Version:** 1.0
|
||||||
@ -12,9 +12,9 @@
|
|||||||
| Prioridad | Planeadas | Ejecutadas | Pendientes |
|
| Prioridad | Planeadas | Ejecutadas | Pendientes |
|
||||||
|-----------|-----------|------------|------------|
|
|-----------|-----------|------------|------------|
|
||||||
| P0 | 8 | 8 | 0 |
|
| P0 | 8 | 8 | 0 |
|
||||||
| P1 | 7 | 3 | 4 |
|
| P1 | 7 | 7 | 0 |
|
||||||
| P2 | 6 | 0 | 6 |
|
| P2 | 6 | 0 | 6 |
|
||||||
| **TOTAL** | **21** | **11** | **10** |
|
| **TOTAL** | **21** | **15** | **6** |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -239,6 +239,54 @@ rm -rf apps/frontend/src/apps/student/pages/admin/
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### P1-004: Documentar Schema Communication
|
||||||
|
**Estado:** ✅ COMPLETADO
|
||||||
|
**Archivo creado:** `docs/database/SCHEMA-COMMUNICATION.md`
|
||||||
|
**Hora:** 2025-12-23
|
||||||
|
|
||||||
|
**Contenido documentado:**
|
||||||
|
- 1 Tabla (messages) con 30+ columnas
|
||||||
|
- 11 Indices para performance
|
||||||
|
- 2 Funciones (get_unread_count, mark_conversation_read)
|
||||||
|
- 1 Vista (recent_classroom_messages)
|
||||||
|
- 6 Politicas RLS
|
||||||
|
- 10 Casos de uso
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### P1-005 + P1-006: Documentar Mecanicas Educativas
|
||||||
|
**Estado:** ✅ COMPLETADO
|
||||||
|
**Archivo creado:** `docs/frontend/MECANICAS-EDUCATIVAS.md`
|
||||||
|
**Hora:** 2025-12-23
|
||||||
|
|
||||||
|
**Contenido documentado:**
|
||||||
|
- 30 mecanicas totales (23 oficiales + 3 extras + 4 auxiliares)
|
||||||
|
- Mapeo por modulo (M1-M5)
|
||||||
|
- Estructura de carpetas
|
||||||
|
- Mecanicas extra identificadas:
|
||||||
|
- Emparejamiento (M1)
|
||||||
|
- Mapa Conceptual (M1)
|
||||||
|
- Lectura Inferencial (M2)
|
||||||
|
- Mecanicas removidas documentadas (4 de M4)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### P1-007: Actualizar BACKEND_INVENTORY.yml
|
||||||
|
**Estado:** ✅ COMPLETADO
|
||||||
|
**Archivo:** `orchestration/inventarios/BACKEND_INVENTORY.yml`
|
||||||
|
**Hora:** 2025-12-23
|
||||||
|
|
||||||
|
**Cambios realizados:**
|
||||||
|
- Version: 2.9.0 -> 3.0.0
|
||||||
|
- total_modules: 13 -> 16
|
||||||
|
- total_services: 88 -> 103
|
||||||
|
- total_controllers: 71 -> 76
|
||||||
|
- total_endpoints: 417 -> 300+
|
||||||
|
- Admin module: services 15->22, controllers 17->22
|
||||||
|
- Agregados links a API docs
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## ARCHIVOS CREADOS
|
## ARCHIVOS CREADOS
|
||||||
|
|
||||||
| Archivo | Lineas | Tamano |
|
| Archivo | Lineas | Tamano |
|
||||||
@ -248,6 +296,8 @@ rm -rf apps/frontend/src/apps/student/pages/admin/
|
|||||||
| `docs/frontend/student/README.md` | ~250 | 7KB |
|
| `docs/frontend/student/README.md` | ~250 | 7KB |
|
||||||
| `docs/database/TABLAS-NUEVAS-2025-12.md` | ~350 | 10KB |
|
| `docs/database/TABLAS-NUEVAS-2025-12.md` | ~350 | 10KB |
|
||||||
| `docs/database/TRIGGERS-INVENTORY.md` | ~400 | 12KB |
|
| `docs/database/TRIGGERS-INVENTORY.md` | ~400 | 12KB |
|
||||||
|
| `docs/database/SCHEMA-COMMUNICATION.md` | ~300 | 9KB |
|
||||||
|
| `docs/frontend/MECANICAS-EDUCATIVAS.md` | ~350 | 10KB |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -265,11 +315,11 @@ rm -rf apps/frontend/src/apps/student/pages/admin/
|
|||||||
| Metrica | Valor |
|
| Metrica | Valor |
|
||||||
|---------|-------|
|
|---------|-------|
|
||||||
| Correcciones P0 ejecutadas | 8/8 (100%) |
|
| Correcciones P0 ejecutadas | 8/8 (100%) |
|
||||||
| Correcciones P1 ejecutadas | 3/7 (43%) |
|
| Correcciones P1 ejecutadas | 7/7 (100%) |
|
||||||
| Archivos creados | 5 |
|
| Archivos creados | 7 |
|
||||||
| Archivos modificados | 5 |
|
| Archivos modificados | 6 |
|
||||||
| Archivos eliminados (huerfanos) | 4 |
|
| Archivos eliminados (huerfanos) | 4 |
|
||||||
| Lineas de documentacion agregadas | ~2,000 |
|
| Lineas de documentacion agregadas | ~3,000 |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -278,14 +328,17 @@ rm -rf apps/frontend/src/apps/student/pages/admin/
|
|||||||
### P0 (100% COMPLETADO)
|
### P0 (100% COMPLETADO)
|
||||||
1. ~~P0-001 a P0-008~~ ✅ COMPLETADOS
|
1. ~~P0-001 a P0-008~~ ✅ COMPLETADOS
|
||||||
|
|
||||||
### P1 (43% COMPLETADO)
|
### P1 (100% COMPLETADO)
|
||||||
1. ~~P1-001: Admin API~~ ✅ COMPLETADO
|
1. ~~P1-001: Admin API~~ ✅ COMPLETADO
|
||||||
2. ~~P1-002: Triggers inventory~~ ✅ COMPLETADO
|
2. ~~P1-002: Triggers inventory~~ ✅ COMPLETADO
|
||||||
3. ~~P1-003: MASTER_INVENTORY~~ ✅ COMPLETADO
|
3. ~~P1-003: MASTER_INVENTORY~~ ✅ COMPLETADO
|
||||||
4. **P1-004:** Documentar schema Communication
|
4. ~~P1-004: Schema Communication~~ ✅ COMPLETADO
|
||||||
5. **P1-005:** Documentar mecanicas M1-M2 extra
|
5. ~~P1-005: Mecanicas M1-M2 extra~~ ✅ COMPLETADO
|
||||||
6. **P1-006:** Clarificar mecanicas M5
|
6. ~~P1-006: Mecanicas M5~~ ✅ COMPLETADO
|
||||||
7. **P1-007:** Actualizar BACKEND_INVENTORY.yml
|
7. ~~P1-007: BACKEND_INVENTORY~~ ✅ COMPLETADO
|
||||||
|
|
||||||
|
### P2 (PENDIENTE - 6 tareas)
|
||||||
|
Ver plan de correcciones para detalles.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@ -4,23 +4,26 @@
|
|||||||
# Fuente: Validación VAL-001
|
# Fuente: Validación VAL-001
|
||||||
|
|
||||||
metadata:
|
metadata:
|
||||||
version: "2.9.0"
|
version: "3.0.0"
|
||||||
generated_date: "2025-11-11"
|
generated_date: "2025-11-11"
|
||||||
last_updated: "2025-12-18"
|
last_updated: "2025-12-23"
|
||||||
generated_by: "Architecture-Analyst - Corrección Routing Teacher Assignments + Documentación Orden Rutas"
|
generated_by: "Requirements-Analyst - Auditoria Documentacion vs Desarrollo"
|
||||||
framework: "NestJS 11.1.8 + TypeScript 5.x + TypeORM 0.3.x"
|
framework: "NestJS 11.1.8 + TypeScript 5.x + TypeORM 0.3.x"
|
||||||
database: "PostgreSQL 16"
|
database: "PostgreSQL 16"
|
||||||
package_manager: "npm"
|
package_manager: "npm"
|
||||||
total_modules: 13 # ✅ Verificado 2025-11-15
|
total_modules: 16 # ✅ Auditoria 2025-12-23 (admin, auth, educational, gamification, health, notifications, progress, social, teacher, websocket, etc.)
|
||||||
total_entities: 92 # ✅ Actualizado 2025-11-29 M4-M5 (+5 nuevas entities)
|
total_entities: 93 # ✅ Auditoria 2025-12-23
|
||||||
total_dtos: 327 # ✅ Verificado 2025-12-18 (sin 4 DTOs M4 no oficiales)
|
total_dtos: 327 # ✅ Verificado 2025-12-18
|
||||||
total_services: 88 # ✅ Actualizado 2025-11-29 M4-M5 (+3 servicios)
|
total_services: 103 # ✅ Auditoria 2025-12-23 (admin:22, teacher:16, +otros)
|
||||||
total_controllers: 71 # ✅ Actualizado 2025-11-29 M4-M5 (+3 controladores)
|
total_controllers: 76 # ✅ Auditoria 2025-12-23 (admin:22, teacher:8, +otros)
|
||||||
total_endpoints: 417 # ✅ Actualizado 2025-11-29 M4-M5 (+11 endpoints)
|
total_endpoints: "300+" # ✅ Auditoria 2025-12-23 (admin:150+, teacher:50+, +otros)
|
||||||
typescript_errors: 0 # ⚠️ 2025-11-28: Backend tiene errores PREEXISTENTES en tests auth (no en admin)
|
typescript_errors: 0 # ⚠️ 2025-11-28: Backend tiene errores PREEXISTENTES en tests auth (no en admin)
|
||||||
build_status: "⚠️ PREEXISTING TEST ERRORS" # 2025-11-28: auth-derived-fields.service.spec.ts (no admin)
|
build_status: "⚠️ PREEXISTING TEST ERRORS" # 2025-11-28: auth-derived-fields.service.spec.ts (no admin)
|
||||||
coherencia_bd: "97%" # ✅ Validado 2025-11-11 (87/117 tablas con entity, resto auxiliares)
|
coherencia_bd: "97%" # ✅ Validado 2025-11-11 (87/117 tablas con entity, resto auxiliares)
|
||||||
discrepancies_found: "ninguna - M4 tiene 5 ejercicios oficiales según DocumentoDeDiseño v6.4"
|
discrepancies_found: "ninguna - M4 tiene 5 ejercicios oficiales según DocumentoDeDiseño v6.4"
|
||||||
|
api_docs:
|
||||||
|
- "docs/90-transversal/api/API-TEACHER-MODULE.md"
|
||||||
|
- "docs/90-transversal/api/API-ADMIN-MODULE.md"
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# MÓDULOS (Modules)
|
# MÓDULOS (Modules)
|
||||||
@ -47,10 +50,11 @@ modules:
|
|||||||
- name: "admin"
|
- name: "admin"
|
||||||
description: "Administración del sistema"
|
description: "Administración del sistema"
|
||||||
path: "apps/backend/src/modules/admin"
|
path: "apps/backend/src/modules/admin"
|
||||||
schema_db: "system_configuration, admin_dashboard" # 2025-11-28: admin_reports usa admin_dashboard
|
schema_db: "system_configuration, admin_dashboard"
|
||||||
entities: 6 # 2025-11-28: +3 (admin-report.entity.ts, bulk-operation, feature-flag, notification-settings, system-alert, system-setting)
|
entities: 6
|
||||||
services: 15 # 2025-11-28: Reconteo real (15 servicios)
|
services: 22 # ✅ Auditoria 2025-12-23
|
||||||
controllers: 17 # 2025-11-28: Reconteo real (17 controllers)
|
controllers: 22 # ✅ Auditoria 2025-12-23
|
||||||
|
api_doc: "docs/90-transversal/api/API-ADMIN-MODULE.md"
|
||||||
dtos: 118
|
dtos: 118
|
||||||
dtos_by_subfolder:
|
dtos_by_subfolder:
|
||||||
alerts: 7
|
alerts: 7
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user