Files
SubMiner/docs/architecture
sudacode 40117d3b73 docs: address spec review feedback
Clarify frequency rank assignment vs filtering pipeline, add cache
capacity strategy for prefetch, specify seek detection threshold,
document cache invalidation re-prefetch behavior, detail ASS parsing
edge cases, add error handling section, and use replaceChildren().
2026-03-15 12:19:35 -07:00
..

Architecture Map

Status: active Last verified: 2026-03-13 Owner: Kyle Yasuda Read when: runtime ownership, composition boundaries, or layering questions

SubMiner runs as three cooperating runtimes:

  • Electron desktop app in src/
  • Launcher CLI in launcher/
  • mpv Lua plugin in plugin/subminer/

The desktop app keeps src/main.ts as composition root and pushes behavior into small runtime/domain modules.

Current Shape

  • src/main/ owns composition, runtime setup, IPC wiring, and app lifecycle adapters.
  • src/core/services/ owns focused runtime services plus pure or side-effect-bounded logic.
  • src/renderer/ owns overlay rendering and input behavior.
  • src/config/ owns config definitions, defaults, loading, and resolution.
  • src/main/runtime/composers/ owns larger domain compositions.

Architecture Intent

  • Small units, explicit boundaries
  • Composition over monoliths
  • Pure helpers where possible
  • Stable user behavior while internals evolve