Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/TheSerchCp/SEAM/llms.txt

Use this file to discover all available pages before exploring further.

Projects (proyectos) and Tasks (tareas) are two closely related modules in SEAM, both scoped to a specific group ID extracted from the URL hash (e.g. #/proyectos/1). They share the same structural pattern: a creation form rendered inline on the page, a responsive table listing existing records, and stub repositories that are ready to be connected to a real backend. Until a backend endpoint is available, the Projects module renders an empty table while the Tasks module reads from the in-memory session.tareas seed data so the UI can be developed and tested independently.

Projects (Proyectos)

Repository functions

// proyectos.repository.js
export const getAll = () => [];
export const create = (d) => d;

Table columns

The projects table is driven by the following column definition:
const PROJECT_COLUMNS = [
    { label: 'Proyecto',     key: 'nombre'        },
    { label: 'Descripción',  key: 'descripcion'   },
    { label: 'Entrega',      key: 'fecha_entrega'  },
];

Expected project shape

When connected to a real backend, each project object returned from getAll() should conform to:
{
  "id": 1,
  "grupo_id": 1,
  "nombre": "Plataforma de calificaciones",
  "descripcion": "Objetivo, alcance y entregables del proyecto",
  "fecha_entrega": "2026-06-15"
}

Form fields

The create form collects three values:
FieldTypeRequired
nombretextYes
descripciontextareaYes
fecha_entregadateYes

Tasks (Tareas)

Repository functions

// tareas.repository.js
export const getAll = () => [];
export const create = (d) => d;
export const remove = (id) => id;

Table columns

const TASK_COLUMNS = [
    { label: 'Título',       key: 'titulo'        },
    { label: 'Descripción',  key: 'descripcion'   },
    { label: 'Entrega',      key: 'fecha_entrega'  },
];

Session state sample data

The TareasPage reads tasks from session.tareas (filtered by grupo_id) when the repository stub returns an empty array. The session seed illustrates the expected object shape:
// session.state.js
tareas: [
    {
        id:            1,
        profesor_id:   2,
        grupo_id:      1,
        titulo:        "Tarea 1",
        descripcion:   "Resolver ejercicios",
        fecha_entrega: "2026-06-15"
    }
]
// tareas.page.js — reading from session until backend is ready
const tasks = session.tareas.filter(task => task.grupo_id === grupoId);

Form fields

FieldTypeRequired
titulotextYes
descripciontextareaYes
fecha_entregadateYes

Connecting to a real backend

Both repositories follow the same pattern used by every other module in SEAM — import ApiClient and replace the stub returns with real HTTP calls:
// proyectos.repository.js — after wiring
import { ApiClient } from '../core/ApiClient.js';

export const getAll = ()    => ApiClient.get('/proyectos');
export const create = (d)   => ApiClient.post('/proyectos', d);
// tareas.repository.js — after wiring
import { ApiClient } from '../core/ApiClient.js';

export const getAll = ()     => ApiClient.get('/tareas');
export const create = (d)    => ApiClient.post('/tareas', d);
export const remove = (id)   => ApiClient.delete(`/tareas/${id}`);
Once the repository functions return real data, the pages will automatically render it in the tables without any other changes.
Both modules currently use stub repositories that return empty arrays or echo their input. The UI, form validation, and table rendering are fully implemented — only the repository layer needs to be pointed at a live API. No changes to the page or layout files are required.
To wire real-time updates into Projects and Tasks (the same way Users and Permissions work), add entries to OPERATION_LISTENERS in OperationListeners.js and subscribe to data:changed in the page initEvents function.

Build docs developers (and LLMs) love