# vcodewonders-vcw/folotoy-ai architecture

> Architecture diagram of the GitHub repository vcodewonders-vcw/folotoy-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vcodewonders-vcw/folotoy-ai
- Repository: https://github.com/vcodewonders-vcw/folotoy-ai

## Overview

Folotoy Server is a self-hosted voice-conversation service. The documented user workflow is speech input, speech-to-text, LLM conversation, then text-to-speech output; conversational data is also published to MQTT. The repository listing contains deployment/configuration files but no server source excerpts, so this is a capability-level map rather than a verified internal call graph. README-documented relationships are cited; implementation paths are left null where the tree does not identify them.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Voice interaction"]
  node_speech_input["Speech input"]
  node_speech_output["Voice output"]
end

subgraph group_ai["AI services"]
  node_stt["Speech to text"]
  node_llm["LLM conversation"]
  node_tts["Text to speech"]
  node_mqtt[("MQTT broker")]
end

subgraph group_hosting["Self-hosting"]
  node_role_config["Role configuration<br/>[roles.json]"]
  node_advanced_roles["Advanced roles"]
  node_compose["Compose deployment<br/>[docker-compose.yml]"]
  node_deploy_skill["Deployment skill"]
end

node_user(("Folotoy user"))

node_user -->|"provides speech"| node_speech_input
node_speech_input -->|"transcribes with"| node_stt
node_stt -->|"feeds conversation"| node_llm
node_llm -->|"generates voice text"| node_tts
node_tts -->|"returns voice"| node_speech_output
node_speech_output -->|"delivers audio"| node_user
node_llm -->|"publishes conversation data"| node_mqtt

click node_role_config "https://github.com/vcodewonders-vcw/folotoy-ai/blob/main/config/roles.json"
click node_advanced_roles "https://github.com/vcodewonders-vcw/folotoy-ai/blob/main/config/roles-advanced.json"
click node_compose "https://github.com/vcodewonders-vcw/folotoy-ai/blob/main/docker-compose.yml"
click node_deploy_skill "https://github.com/vcodewonders-vcw/folotoy-ai/blob/main/folotoy-server-deploy.skill"

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_speech_input,node_speech_output,node_user toneBlue
class node_stt,node_llm,node_tts,node_mqtt toneAmber
class node_role_config,node_advanced_roles,node_compose,node_deploy_skill toneMint
```

## Components

### Voice interaction

- **Speech input**
- **Voice output**

### AI services

- **Speech to text**
- **LLM conversation**
- **Text to speech**
- **MQTT broker**

### Self-hosting

- [Role configuration](https://github.com/vcodewonders-vcw/folotoy-ai/blob/main/config/roles.json): `config/roles.json`
- [Advanced roles](https://github.com/vcodewonders-vcw/folotoy-ai/blob/main/config/roles-advanced.json): `config/roles-advanced.json`
- [Compose deployment](https://github.com/vcodewonders-vcw/folotoy-ai/blob/main/docker-compose.yml): `docker-compose.yml`
- [Deployment skill](https://github.com/vcodewonders-vcw/folotoy-ai/blob/main/folotoy-server-deploy.skill): `folotoy-server-deploy.skill`

### Other components

- **Folotoy user**

## Connections

- Folotoy user → Speech input: provides speech (evidence: `README.md`)
- Speech input → Speech to text: transcribes with (evidence: `README.md`)
- Speech to text → LLM conversation: feeds conversation (evidence: `README.md`)
- LLM conversation → Text to speech: generates voice text (evidence: `README.md`)
- Text to speech → Voice output: returns voice (evidence: `README.md`)
- Voice output → Folotoy user: delivers audio (evidence: `README.md`)
- LLM conversation → MQTT broker: publishes conversation data (evidence: `README.md`)
