Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/arquitectura.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Qué proceso corre dónde y cómo se hablan entre sí.
|------|----------|
| `/` | Dashboard multi-tablero (redirige a `/board/guest` si no hay sesión) |
| `/board/[id]` | Tablero: columnas, tareas, vistas LIST / BOARD / NOTE-LIST |
| `/whiteboard/[id]` | Pizarra del tablero (Excalidraw, ver `features/whiteboard.md`) |
| `/archive/[id]` | Archivo de tareas y notas archivadas |
| `/time/[id]` | Registro de uso por sesiones |
| `/settings`, `/settings/[id]` | Preferencias de usuario y de tablero |
Expand Down Expand Up @@ -138,7 +139,7 @@ El esquema Prisma y su diagrama ER están en **[modelo-datos.md](./modelo-datos.
| Auth | [Better Auth](https://better-auth.com), Credentials + GitHub, sesión en DB |
| Estado de servidor | TanStack Query |
| Estado de cliente | Zustand (puntual) |
| UI | Radix UI, Tailwind, `lucide-react`, Tiptap (rich text) |
| UI | Radix UI, Tailwind, `lucide-react`, Tiptap (rich text), Excalidraw (pizarra) |
| i18n | i18next / react-i18next (ES · EN) |
| Tests | Vitest (unit), Playwright (e2e: Chromium + Firefox) |

Expand Down
21 changes: 21 additions & 0 deletions docs/casos-de-uso.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Capo es una herramienta visual para gestionar tareas de forma sencilla y efectiv
* **Etiquetas y prioridades**: Ordena tareas por importancia y usa grupos de etiquetas personalizables.
* **Notas y archivo**: Guarda una nota por tablero, archiva tareas diarias (hasta 30 por día) y exporta el historial en PDF.
* **Columnas adaptables**: Crea, renombra o elimina columnas (máximo 6, mínimo 2).
* **Pizarra**: Dibuja libremente en una pizarra por tablero, con guardado automático y exportación a PNG/SVG.

Detalle de las historias de usuario implementadas actualmente:

Expand Down Expand Up @@ -134,6 +135,26 @@ Detalle de las historias de usuario implementadas actualmente:
* Como usuario, puedo exportar el archivo.
* Se puede exportar el formato entre PDF y JSON.

## Pizarra

* Como usuario, puedo dibujar libremente en una pizarra propia de cada tablero.
* Es una sola pizarra por tablero y la edita solo el dueño (sin colaboración en vivo).
* Funciona con cuenta y en modo invitado.
* No se pueden agregar imágenes.

* Como usuario, mis cambios en la pizarra se guardan automáticamente.
* Se guarda 1 segundo después del último cambio y al salir de la página.
* La pizarra no puede superar 1 MB; si lo supera, se avisa y no se guarda.

* Como usuario, puedo exportar la pizarra como imagen PNG o SVG.

* Como usuario, puedo alternar el fondo de la pizarra entre el color del tablero y el de las columnas.
* La preferencia es por tablero y queda guardada en este navegador.

* Como usuario invitado a un tablero compartido, no veo la pizarra.

* Al eliminar un tablero se elimina también su pizarra.

## Registro de uso

* Como usuario, puedo visualizar el tiempo de uso actual del tablero.
Expand Down
21 changes: 19 additions & 2 deletions docs/diagramas/modelo-datos.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h1>Qué guarda Capo</h1>

<svg viewBox="0 0 1160 850" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="datos-title datos-desc">
<title id="datos-title">Modelo de datos de Capo</title>
<desc id="datos-desc">Un usuario tiene varios tableros; cada tablero tiene columnas con tareas (que pueden tener sub-tareas, auto-relación por parentId) y, como accesorios uno a uno, una nota, un recordatorio, un archivo y un limbo; muchos tableros pueden apuntar al mismo grupo de etiquetas activo. Board y User referencian un Theme del catálogo de temas. Un tablero tiene varios BoardShare, los links (por email o público) para compartirlo en solo lectura. TagVariant es un catálogo aparte: Tag.variant guarda su id dentro del Json de TagGroup.tags/Task.tags, sin FK real (línea punteada).</desc>
<desc id="datos-desc">Un usuario tiene varios tableros; cada tablero tiene columnas con tareas (que pueden tener sub-tareas, auto-relación por parentId) y, como accesorios uno a uno, una nota, un recordatorio, un archivo, un limbo y una pizarra; muchos tableros pueden apuntar al mismo grupo de etiquetas activo. Board y User referencian un Theme del catálogo de temas. Un tablero tiene varios BoardShare, los links (por email o público) para compartirlo en solo lectura. TagVariant es un catálogo aparte: Tag.variant guarda su id dentro del Json de TagGroup.tags/Task.tags, sin FK real (línea punteada).</desc>

<defs>
<marker id="d-arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#4f5d75"/></marker>
Expand Down Expand Up @@ -119,14 +119,19 @@ <h1>Qué guarda Capo</h1>
<text x="548" y="314" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace">1</text>
<text x="624" y="434" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace">N</text>

<!-- 14. Board -> Whiteboard (salta la línea punteada de TagVariant) -->
<path d="M 540,232 H 846 A 6 6 0 0 1 858 232 H 868 Q 876,232 876,240 V 638 Q 876,646 868,646 H 820" fill="none" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#d-arrow)"/>
<text x="548" y="228" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace">1</text>
<text x="828" y="640" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace">0..1</text>

<!-- 11. Task -> Task (parentId, self) -->
<path d="M 1110,140 H 1130 Q 1140,140 1140,150 V 238 Q 1140,248 1130,248 H 1110" fill="none" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#d-arrow)"/>
<text x="1144" y="146" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace">N</text>
<text x="1144" y="252" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace">1</text>

<!-- 12. Task -> TagVariant (Tag.variant, id embebido en Json, sin FK real) -->
<path d="M 900,168 H 860 Q 852,168 852,176 V 288 Q 852,296 844,296 H 820" fill="none" stroke="#4f5d75" stroke-width="1.1" stroke-dasharray="3 2" marker-end="url(#d-dot)"/>
<text x="856" y="230" fill="#4f5d75" font-size="7.5" font-family="'Geist Mono', monospace">variant</text>
<text x="856" y="256" fill="#4f5d75" font-size="7.5" font-family="'Geist Mono', monospace">variant</text>

<!-- Entities -->
<!-- TagGroup -->
Expand Down Expand Up @@ -269,6 +274,18 @@ <h1>Qué guarda Capo</h1>
<text x="652" y="520" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace">&#8594; boardId</text>
<text x="652" y="544" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace">unique (boardId, recipientEmail)</text>

<!-- Whiteboard -->
<rect x="640" y="600" width="180" height="92" rx="6" fill="#f5f5f5"/>
<rect x="640" y="600" width="180" height="92" rx="6" fill="#ffffff" stroke="#2d3142" stroke-width="1"/>
<text x="652" y="618" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', sans-serif">Whiteboard</text>
<rect x="786" y="606" width="26" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.35)" stroke-width="0.8"/>
<text x="799" y="615" fill="#4f5d75" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.06em">1:1</text>
<line x1="640" y1="624" x2="820" y2="624" stroke="rgba(45,49,66,0.18)" stroke-width="0.8"/>
<text x="652" y="640" fill="#eb6c36" font-size="9" font-family="'Geist Mono', monospace"># id</text>
<text x="652" y="656" fill="#2d3142" font-size="9" font-family="'Geist Mono', monospace">scene : Json</text>
<text x="652" y="672" fill="#2d3142" font-size="9" font-family="'Geist Mono', monospace">updatedAt</text>
<text x="652" y="688" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace">&#8594; boardId · unique</text>

<!-- Theme -->
<rect x="60" y="400" width="200" height="124" rx="6" fill="#f5f5f5"/>
<rect x="60" y="400" width="200" height="124" rx="6" fill="#ffffff" stroke="#2d3142" stroke-width="1"/>
Expand Down
21 changes: 19 additions & 2 deletions docs/diagramas/modelo-datos.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading