mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-20 03:16:46 -07:00
- Stats dashboard redesign design and implementation plans - Episode detail and Anki card link design - Internal knowledge base restructure - Backlog tasks for testing, verification, and occurrence tracking
1.3 KiB
1.3 KiB
Layering Rules
Status: active
Last verified: 2026-03-13
Owner: Kyle Yasuda
Read when: deciding whether a dependency direction is acceptable
Preferred Dependency Flow
src/main.tssrc/main/composition and runtime adapterssrc/core/services/focused servicessrc/core/utils/and other pure helpers
Renderer, launcher, plugin, and stats each keep their own local layering and should not become a grab bag for unrelated cross-runtime behavior.
Rules
- Keep
src/main.tsthin; wire, do not implement. - Prefer injecting dependencies from
src/main/instead of reaching outward from core services. - Keep side effects explicit and close to composition boundaries.
- Put reusable business logic in focused services, not in top-level lifecycle files.
- Keep renderer concerns in
src/renderer/; avoid leaking DOM behavior into main-process code. - Treat
launcher/*.tsas source of truth for the launcher. Never hand-editdist/launcher/subminer.
Smells
main.tsgrows because logic was not extracted- service reaches directly into unrelated runtime state
- renderer code depends on main-process internals
- docs-site page becomes the only place internal architecture is explained