How gnanachandrik/tiny-desktop-pet works
Tiny Desktop Pet is an Electron companion for Windows and macOS. The user-facing workflow is: summon or receive a scheduled visit, interact with the pet, and optionally open chat; settings and pause controls configure that behavior. The main process owns windows, tray actions, scheduling, persistence, and chat replies, while renderer scripts provide the pet, summon, settings, and chat interfaces through a restricted IPC bridge. README-documented capabilities include encrypted API-key storage and customizable reminder messages; the excerpts do not show how the message-category file is consumed.
Main entry points: main.js Main Process · preload.js IPC Bridge · pet.js Pet Interaction · summon.js Summon Button
Components 18
App Runtime
- Main Process
main.js - Tray Controls
main.js - Visit Scheduler
main.js - Settings Store
main.js - IPC Bridge
preload.js
Pet Interfaces
- Pet Window
main.js - Pet Interaction
renderer/pet.js - Summon Window
main.js - Summon Button
renderer/summon.js
Controls and Chat
- Settings Window
main.js - Settings Form
renderer/settings.js - Chat Window
main.js - Chat Interface
renderer/chat.js - Reply Handler
main.js
Pet Content
- Pet Personality
config/personality.txt - Reminder Messages
config/messages.json
Other components
- User
- OpenAI API
Connections 20
- User → Tray Controls: uses
README.md - Tray Controls → Pet Window: summons
main.js - Tray Controls → Chat Window: opens
main.js - Tray Controls → Settings Window: opens
main.js - Tray Controls → Visit Scheduler: pauses
main.js - Visit Scheduler → Pet Window: shows visits
main.js - Main Process → Settings Store: reads and writes
main.js - Main Process → Pet Window: creates and updates
main.js - Main Process → Summon Window: creates
main.js - Main Process → Settings Window: opens
main.js - Main Process → Chat Window: opens
main.js - Summon Button → IPC Bridge: requests summon
renderer/summon.js - Pet Interaction → IPC Bridge: requests actions
renderer/pet.js - Settings Form → IPC Bridge: saves settings
renderer/settings.js - Chat Interface → IPC Bridge: sends message
renderer/chat.js - IPC Bridge → Main Process: invokes IPC
preload.js - Main Process → Pet Interaction: sends events
main.js - Main Process → Reply Handler: dispatches chat
main.js - Reply Handler → Pet Personality: reads prompt
main.js - Reply Handler → OpenAI API: sends chat and prompt
main.js