This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
FridOS is a kid-friendly terminal interface built with Nuxt 4 / Vue 3 and xterm.js. Kids learn typing, letters, numbers, and basic math by interacting with a real-feeling terminal. Pure client-side — no backend.
pnpm dev # Start dev server at localhost:3000
pnpm build # Build for production
pnpm preview # Preview production buildThe entire UI is a single xterm.js terminal. User input flows through:
Terminal.client.vue (keyboard capture) → command-handler.js (auto-discovery + routing) → commands/*.js (execution) → writes back to terminal and/or mutates global state
app.config.ts— Parent-facing configuration (kid's name, prompt, theme, emojis)app/components/AppTerminal.client.vue— xterm.js wrapper; handles input, renders overlaysapp/components/AnalogClock.vue— SVG analog clock overlay with animated hands and lighting effectsapp/utils/command-handler.js— Auto-discovers commands viaimport.meta.glob. Special routing: single letters → alphabet, numbers → number, math expressions → mathapp/utils/commands/— One file per command, auto-discovered. No registration needed.app/utils/terminal-config.js—createTerminalConfig(theme)builds xterm config from app configapp/composables/states.js— Global reactive state viauseState(image viewer, audio, clicker, clock)app/composables/assets.js— Dynamic asset loading viaimport.meta.globshared/utils/constants.js—TEXT_STYLES(ANSI escape codes)
- Create
app/utils/commands/<name>.js - Export a named function matching the filename:
export const name = (terminal, ...args) => {} - Export
helpSummarystring for the help listing - Optionally export
hidden = trueto hide from help
No registration step — auto-discovered by import.meta.glob.
Personalizable values (name, prompt symbol, prompt color, welcome message, emojis) live in runtimeConfig.public in nuxt.config.ts and can be overridden via NUXT_PUBLIC_* environment variables (see .env.example). The terminal theme lives in app.config.ts (Nuxt's defineAppConfig), accessed via useAppConfig().fridos. Version is read from package.json at build time via runtimeConfig.public.version.
No Pinia/Vuex — uses Nuxt useState composables in app/composables/states.js.
- Alphabet images:
app/assets/img/alphabet/— filename first letter = mapped letter - Gallery images:
app/assets/img/<command>/(e.g., mom/, dad/) - Audio:
app/assets/audio/ - Font: Monaspace Argon (SIL Open Font License)
This project prioritizes inclusivity. Family-related features (gallery commands) should never assume a traditional family structure. All families are welcome.