# samuel-alves-correa/claudinho-panel architecture

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

- Interactive diagram: https://gitdiagram.com/samuel-alves-correa/claudinho-panel
- Repository: https://github.com/samuel-alves-correa/claudinho-panel

## Overview

Claudinho is a Claude Code plugin that turns session hooks into a live mascot and usage display. Claude Code events update per-session state and publish JSON; the separate Windows widget reads session files, selects the most urgent live session, and renders the notch, status, and detail bubbles. The README also documents plugin commands, mascot selection, and widget controls. The hook, formatter, mascot palette, and state contract are represented by sampled source; widget rendering and command handling are represented from the README and tree, so their internal links are limited to documented relationships.

Main entry points: [`hooks/register.tsx`](https://github.com/samuel-alves-correa/claudinho-panel/blob/main/hooks/register.tsx) (Hook registration), [`widget/iniciar-widget.cmd`](https://github.com/samuel-alves-correa/claudinho-panel/blob/main/widget/iniciar-widget.cmd) (Widget launcher), [`widget/claudinho-widget.ps1`](https://github.com/samuel-alves-correa/claudinho-panel/blob/main/widget/claudinho-widget.ps1) (Notch renderer), [`hooks/format.ts`](https://github.com/samuel-alves-correa/claudinho-panel/blob/main/hooks/format.ts) (Text formatting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hooks["Session hooks"]
  node_register["Hook registration<br/>[register.tsx]"]
  node_format["Text formatting<br/>[format.ts]"]
  node_mascots["Mascot palettes<br/>[mascots.ts]"]
end

subgraph group_state["Session state"]
  node_contract["State contract<br/>[index.d.ts]"]
  node_sessionfiles[("Session JSON files")]
end

subgraph group_widget["Desktop widget"]
  node_widgetscript["Notch renderer"]
  node_launcher["Widget launcher<br/>[iniciar-widget.cmd]"]
end

subgraph group_integration["Claude Code integration"]
  node_claude{{"Claude Code"}}
end

node_user(("Claude Code user"))

node_user -->|"uses"| node_claude
node_claude -->|"dispatches hooks"| node_register
node_register -->|"formats event data"| node_format
node_register -->|"selects palette"| node_mascots
node_register -->|"updates state"| node_contract
node_register -->|"writes session JSON"| node_sessionfiles
node_sessionfiles -->|"reads and renders"| node_widgetscript
node_user -->|"opens widget"| node_launcher
node_launcher -.->|"starts"| node_widgetscript
node_user -->|"runs plugin command"| node_register

click node_register "https://github.com/samuel-alves-correa/claudinho-panel/blob/main/hooks/register.tsx"
click node_format "https://github.com/samuel-alves-correa/claudinho-panel/blob/main/hooks/format.ts"
click node_mascots "https://github.com/samuel-alves-correa/claudinho-panel/blob/main/hooks/mascots.ts"
click node_contract "https://github.com/samuel-alves-correa/claudinho-panel/blob/main/types/index.d.ts"
click node_widgetscript "https://github.com/samuel-alves-correa/claudinho-panel/blob/main/widget/claudinho-widget.ps1"
click node_launcher "https://github.com/samuel-alves-correa/claudinho-panel/blob/main/widget/iniciar-widget.cmd"

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_register,node_format,node_mascots,node_user toneBlue
class node_contract,node_sessionfiles toneAmber
class node_widgetscript,node_launcher toneMint
class node_claude toneRose
```

## Components

### Session hooks

- [Hook registration](https://github.com/samuel-alves-correa/claudinho-panel/blob/main/hooks/register.tsx): `hooks/register.tsx`
- [Text formatting](https://github.com/samuel-alves-correa/claudinho-panel/blob/main/hooks/format.ts): `hooks/format.ts`
- [Mascot palettes](https://github.com/samuel-alves-correa/claudinho-panel/blob/main/hooks/mascots.ts): `hooks/mascots.ts`

### Session state

- [State contract](https://github.com/samuel-alves-correa/claudinho-panel/blob/main/types/index.d.ts): `types/index.d.ts`
- **Session JSON files**

### Desktop widget

- [Notch renderer](https://github.com/samuel-alves-correa/claudinho-panel/blob/main/widget/claudinho-widget.ps1): `widget/claudinho-widget.ps1`
- [Widget launcher](https://github.com/samuel-alves-correa/claudinho-panel/blob/main/widget/iniciar-widget.cmd): `widget/iniciar-widget.cmd`

### Claude Code integration

- **Claude Code**

### Other components

- **Claude Code user**

## Connections

- Claude Code user → Claude Code: uses (evidence: `README.md`)
- Claude Code → Hook registration: dispatches hooks (evidence: `README.md`)
- Hook registration → Text formatting: formats event data (evidence: `hooks/register.tsx`)
- Hook registration → Mascot palettes: selects palette (evidence: `hooks/register.tsx`)
- Hook registration → State contract: updates state (evidence: `hooks/register.tsx`)
- Hook registration → Session JSON files: writes session JSON (evidence: `hooks/register.tsx`)
- Session JSON files → Notch renderer: reads and renders (evidence: `README.md`)
- Claude Code user → Widget launcher: opens widget (evidence: `README.md`)
- Widget launcher → Notch renderer: starts
- Claude Code user → Hook registration: runs plugin command (evidence: `README.md`)
