# salaesp/cherry-office architecture

> Architecture diagram of the GitHub repository salaesp/cherry-office, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/salaesp/cherry-office
- Repository: https://github.com/salaesp/cherry-office

## Overview

Oficina es una aplicación de escritorio para dirigir agentes Claude Code dentro de oficinas configuradas como carpetas. La persona crea o abre una oficina, conversa con agentes o convoca reuniones, asigna tareas y sigue flujos; los agentes ejecutan trabajo mediante Claude Code y entregan resultados para revisión. La interfaz también expone biblioteca, conocimiento, actividad y vistas isométricas. El README documenta las capacidades principales; las relaciones internas no visibles en los extractos se omiten o se indican como no verificadas.

Main entry points: [`backend/src/router.ts`](https://github.com/salaesp/cherry-office/blob/main/backend/src/router.ts) (Router API), [`backend/src/claude-runner.ts`](https://github.com/salaesp/cherry-office/blob/main/backend/src/claude-runner.ts) (Ejecución Claude Code), [`backend/src/reuniones.ts`](https://github.com/salaesp/cherry-office/blob/main/backend/src/reuniones.ts) (Chat y reuniones), [`backend/src/programador.ts`](https://github.com/salaesp/cherry-office/blob/main/backend/src/programador.ts) (Tareas y programación)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Aplicación de escritorio"]
  node_shell["Carcasa Electron<br/>[main.ts]"]
end

subgraph group_experience["Interfaz de oficina"]
  node_frontend["Pantallas de oficina<br/>[app.js]"]
  node_pixel["Oficina pixel<br/>[oficina-pixel.js]"]
  node_lego["Vista 3D opcional<br/>[oficina3d.js]"]
  node_inbox["Bandeja de entregas<br/>[entregables.js]"]
end

subgraph group_work["Trabajo con agentes"]
  node_agents["Agentes y permisos<br/>[permisos.ts]"]
  node_creator["Creador de oficinas<br/>[creador.ts]"]
  node_chat_meetings["Chat y reuniones<br/>[reuniones.ts]"]
  node_tasks["Tareas y programación<br/>[programador.ts]"]
  node_flows["Flujos multiagente<br/>[motor-flujos.ts]"]
  node_claude["Ejecución Claude Code<br/>[claude-runner.ts]"]
  node_scheduler["Tareas programadas<br/>[programador.ts]"]
  node_flows_model["Modelo de flujos<br/>[modelo-flujos.ts]"]
  node_tasks_model["Modelo de tareas<br/>[tareas.ts]"]
end

subgraph group_knowledge["Contenido y resultados"]
  node_library["Biblioteca<br/>[biblioteca.ts]"]
  node_knowledge_files["Conocimiento<br/>[conocimiento.ts]"]
  node_deliveries["Entregas y revisión<br/>[entregas.ts]"]
end

subgraph group_backend["Backend y datos"]
  node_api["Router API<br/>[router.ts]"]
  node_services["Servicios y módulos<br/>[servicios.ts]"]
  node_office["Oficinas<br/>[oficinas.ts]"]
  node_office_model["Modelo de oficina<br/>[oficina.ts]"]
  node_store[("Almacenamiento SQLite<br/>[sqlite.ts]")]
  node_json["JSON de API<br/>[json.ts]"]
  node_config["Configuración<br/>[config.ts]"]
end

node_person(("Persona usuaria"))

node_person -->|"usa"| node_frontend
node_frontend -.->|"envía pedidos"| node_api
node_shell -->|"inicia backend"| node_api
node_frontend -->|"muestra vista"| node_pixel
node_person -->|"elige apariencia"| node_lego
node_api -->|"gestiona oficinas"| node_office
node_office -->|"lee y escribe"| node_office_model
node_api -->|"enruta reuniones"| node_chat_meetings
node_api -->|"enruta biblioteca"| node_library
node_api -->|"enruta tareas"| node_tasks
node_api -->|"enruta entregas"| node_deliveries
node_person -->|"describe oficina"| node_creator
node_person -->|"conversa y convoca"| node_chat_meetings
node_person -->|"asigna trabajo"| node_tasks
node_person -->|"define procesos"| node_flows
node_tasks -.->|"ejecuta trabajo"| node_claude
node_chat_meetings -.->|"ejecuta conversación"| node_claude
node_flows -->|"usa modelo"| node_flows_model
node_tasks -->|"gestiona tareas"| node_tasks_model
node_agents -->|"configura ejecución"| node_claude
node_person -->|"consulta documentos"| node_library
node_person -->|"mantiene conocimiento"| node_knowledge_files
node_claude -.->|"produce resultados"| node_deliveries
node_deliveries -->|"presenta entregas"| node_inbox
node_scheduler -.->|"dispara tareas"| node_claude
node_services -->|"registra módulos"| node_api
node_api -->|"codifica respuestas"| node_json
node_office -->|"lee configuración"| node_config
node_library -->|"persiste datos"| node_store
node_deliveries -->|"persiste entregas"| node_store
node_chat_meetings -->|"lee turnos"| node_store

click node_shell "https://github.com/salaesp/cherry-office/blob/main/desktop/src/main.ts"
click node_frontend "https://github.com/salaesp/cherry-office/blob/main/oficina/ui/app.js"
click node_pixel "https://github.com/salaesp/cherry-office/blob/main/oficina/ui/pixel/oficina-pixel.js"
click node_lego "https://github.com/salaesp/cherry-office/blob/main/oficina/ui/oficina3d.js"
click node_api "https://github.com/salaesp/cherry-office/blob/main/backend/src/router.ts"
click node_services "https://github.com/salaesp/cherry-office/blob/main/backend/src/servicios.ts"
click node_office "https://github.com/salaesp/cherry-office/blob/main/backend/src/oficinas.ts"
click node_office_model "https://github.com/salaesp/cherry-office/blob/main/backend/src/oficina.ts"
click node_agents "https://github.com/salaesp/cherry-office/blob/main/backend/src/permisos.ts"
click node_creator "https://github.com/salaesp/cherry-office/blob/main/backend/src/creador.ts"
click node_chat_meetings "https://github.com/salaesp/cherry-office/blob/main/backend/src/reuniones.ts"
click node_tasks "https://github.com/salaesp/cherry-office/blob/main/backend/src/programador.ts"
click node_flows "https://github.com/salaesp/cherry-office/blob/main/backend/src/motor-flujos.ts"
click node_claude "https://github.com/salaesp/cherry-office/blob/main/backend/src/claude-runner.ts"
click node_library "https://github.com/salaesp/cherry-office/blob/main/backend/src/biblioteca.ts"
click node_knowledge_files "https://github.com/salaesp/cherry-office/blob/main/backend/src/conocimiento.ts"
click node_deliveries "https://github.com/salaesp/cherry-office/blob/main/backend/src/entregas.ts"
click node_scheduler "https://github.com/salaesp/cherry-office/blob/main/backend/src/programador.ts"
click node_store "https://github.com/salaesp/cherry-office/blob/main/backend/src/sqlite.ts"
click node_json "https://github.com/salaesp/cherry-office/blob/main/backend/src/json.ts"
click node_config "https://github.com/salaesp/cherry-office/blob/main/backend/src/config.ts"
click node_flows_model "https://github.com/salaesp/cherry-office/blob/main/backend/src/modelo-flujos.ts"
click node_tasks_model "https://github.com/salaesp/cherry-office/blob/main/backend/src/tareas.ts"
click node_inbox "https://github.com/salaesp/cherry-office/blob/main/oficina/ui/entregables.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_shell toneBlue
class node_frontend,node_pixel,node_lego,node_inbox toneAmber
class node_agents,node_creator,node_chat_meetings,node_tasks,node_flows,node_claude,node_scheduler,node_flows_model,node_tasks_model toneMint
class node_library,node_knowledge_files,node_deliveries toneRose
class node_api,node_services,node_office,node_office_model,node_store,node_json,node_config,node_person toneIndigo
```

## Components

### Aplicación de escritorio

- [Carcasa Electron](https://github.com/salaesp/cherry-office/blob/main/desktop/src/main.ts): `desktop/src/main.ts`

### Interfaz de oficina

- [Pantallas de oficina](https://github.com/salaesp/cherry-office/blob/main/oficina/ui/app.js): `oficina/ui/app.js`
- [Oficina pixel](https://github.com/salaesp/cherry-office/blob/main/oficina/ui/pixel/oficina-pixel.js): `oficina/ui/pixel/oficina-pixel.js`
- [Vista 3D opcional](https://github.com/salaesp/cherry-office/blob/main/oficina/ui/oficina3d.js): `oficina/ui/oficina3d.js`
- [Bandeja de entregas](https://github.com/salaesp/cherry-office/blob/main/oficina/ui/entregables.js): `oficina/ui/entregables.js`

### Trabajo con agentes

- [Agentes y permisos](https://github.com/salaesp/cherry-office/blob/main/backend/src/permisos.ts): `backend/src/permisos.ts`
- [Creador de oficinas](https://github.com/salaesp/cherry-office/blob/main/backend/src/creador.ts): `backend/src/creador.ts`
- [Chat y reuniones](https://github.com/salaesp/cherry-office/blob/main/backend/src/reuniones.ts): `backend/src/reuniones.ts`
- [Tareas y programación](https://github.com/salaesp/cherry-office/blob/main/backend/src/programador.ts): `backend/src/programador.ts`
- [Flujos multiagente](https://github.com/salaesp/cherry-office/blob/main/backend/src/motor-flujos.ts): `backend/src/motor-flujos.ts`
- [Ejecución Claude Code](https://github.com/salaesp/cherry-office/blob/main/backend/src/claude-runner.ts): `backend/src/claude-runner.ts`
- [Tareas programadas](https://github.com/salaesp/cherry-office/blob/main/backend/src/programador.ts): `backend/src/programador.ts`
- [Modelo de flujos](https://github.com/salaesp/cherry-office/blob/main/backend/src/modelo-flujos.ts): `backend/src/modelo-flujos.ts`
- [Modelo de tareas](https://github.com/salaesp/cherry-office/blob/main/backend/src/tareas.ts): `backend/src/tareas.ts`

### Contenido y resultados

- [Biblioteca](https://github.com/salaesp/cherry-office/blob/main/backend/src/biblioteca.ts): `backend/src/biblioteca.ts`
- [Conocimiento](https://github.com/salaesp/cherry-office/blob/main/backend/src/conocimiento.ts): `backend/src/conocimiento.ts`
- [Entregas y revisión](https://github.com/salaesp/cherry-office/blob/main/backend/src/entregas.ts): `backend/src/entregas.ts`

### Backend y datos

- [Router API](https://github.com/salaesp/cherry-office/blob/main/backend/src/router.ts): `backend/src/router.ts`
- [Servicios y módulos](https://github.com/salaesp/cherry-office/blob/main/backend/src/servicios.ts): `backend/src/servicios.ts`
- [Oficinas](https://github.com/salaesp/cherry-office/blob/main/backend/src/oficinas.ts): `backend/src/oficinas.ts`
- [Modelo de oficina](https://github.com/salaesp/cherry-office/blob/main/backend/src/oficina.ts): `backend/src/oficina.ts`
- [Almacenamiento SQLite](https://github.com/salaesp/cherry-office/blob/main/backend/src/sqlite.ts): `backend/src/sqlite.ts`
- [JSON de API](https://github.com/salaesp/cherry-office/blob/main/backend/src/json.ts): `backend/src/json.ts`
- [Configuración](https://github.com/salaesp/cherry-office/blob/main/backend/src/config.ts): `backend/src/config.ts`

### Other components

- **Persona usuaria**

## Connections

- Persona usuaria → Pantallas de oficina: usa (evidence: `README.md`)
- Pantallas de oficina → Router API: envía pedidos
- Carcasa Electron → Router API: inicia backend (evidence: `desktop/src/main.ts`)
- Pantallas de oficina → Oficina pixel: muestra vista (evidence: `README.md`)
- Persona usuaria → Vista 3D opcional: elige apariencia (evidence: `README.md`)
- Router API → Oficinas: gestiona oficinas (evidence: `README.md`)
- Oficinas → Modelo de oficina: lee y escribe (evidence: `backend/src/oficinas.ts`)
- Router API → Chat y reuniones: enruta reuniones (evidence: `backend/src/router.ts`)
- Router API → Biblioteca: enruta biblioteca (evidence: `backend/src/router.ts`)
- Router API → Tareas y programación: enruta tareas (evidence: `backend/src/router.ts`)
- Router API → Entregas y revisión: enruta entregas (evidence: `backend/src/router.ts`)
- Persona usuaria → Creador de oficinas: describe oficina (evidence: `README.md`)
- Persona usuaria → Chat y reuniones: conversa y convoca (evidence: `README.md`)
- Persona usuaria → Tareas y programación: asigna trabajo (evidence: `README.md`)
- Persona usuaria → Flujos multiagente: define procesos (evidence: `README.md`)
- Tareas y programación → Ejecución Claude Code: ejecuta trabajo (evidence: `backend/src/programador.ts`)
- Chat y reuniones → Ejecución Claude Code: ejecuta conversación (evidence: `backend/src/reuniones.ts`)
- Flujos multiagente → Modelo de flujos: usa modelo
- Tareas y programación → Modelo de tareas: gestiona tareas (evidence: `backend/src/programador.ts`)
- Agentes y permisos → Ejecución Claude Code: configura ejecución (evidence: `backend/src/permisos.ts`)
- Persona usuaria → Biblioteca: consulta documentos (evidence: `README.md`)
- Persona usuaria → Conocimiento: mantiene conocimiento (evidence: `README.md`)
- Ejecución Claude Code → Entregas y revisión: produce resultados
- Entregas y revisión → Bandeja de entregas: presenta entregas (evidence: `README.md`)
- Tareas programadas → Ejecución Claude Code: dispara tareas (evidence: `backend/src/programador.ts`)
- Servicios y módulos → Router API: registra módulos (evidence: `backend/src/servicios.ts`)
- Router API → JSON de API: codifica respuestas (evidence: `backend/src/router.ts`)
- Oficinas → Configuración: lee configuración (evidence: `backend/src/oficinas.ts`)
- Biblioteca → Almacenamiento SQLite: persiste datos (evidence: `backend/src/biblioteca.ts`)
- Entregas y revisión → Almacenamiento SQLite: persiste entregas (evidence: `backend/src/entregas.ts`)
- Chat y reuniones → Almacenamiento SQLite: lee turnos (evidence: `backend/src/reuniones.ts`)
