Core Principles

Modular by design

Modular

Each feature lives in its own module.

Discoverable

Modules are found automatically at runtime.

Reloadable

Changes appear on the next menu render.

Separated

UI, config, and business logic stay isolated.

Module Discovery Contract

Controller-driven registration
  1. Create app/modules/<name>/controller.py
  2. Export register(menu) -> None
  3. Add menu items with menu.add("Label", handler)
  4. Use no-arg callables as handlers
  5. Let the runtime scan and reload on each loop

Layer Architecture

Clean separation of concerns

Presentation

app/core/menu.py, ui.py, status.py

Configuration

config.py and cron_runtime.py

Business Logic

app/modules/*/service.py

Shared Libraries

app/libraries/*/ integrations and utilities

Runtime Flow

From launch to live reload
run.py -> app.main.main()
  -> scan app/modules/*/controller.py
  -> import modules and call register(menu)
  -> render menu and execute selected handler
  -> loop repeats and picks up changes

This loop is what makes TerminalOS ideal for rapid iteration.

Included Libraries

Reusable tooling