How serene-brew/kaizen works
Project type and purpose
• Kaizen is a Go-based TUI (terminal user interface) application for streaming anime directly in the command line.
• It consumes a private home-grown API to fetch anime metadata and stream URLs, then launches an external video player.
• It is not a full-stack web app but a single-binary CLI tool with a presentation layer (TUI), application-logic layer, and an external service dependency (the anime API and video player).
File structure
• Top-level files:
• main.go – program entry point, bootstraps configuration and TUI.
• install.sh / update.sh / uninstall.sh – lifecycle scripts.
• Go module files (go.mod, go.sum), CI/CD workflows (in .github/workflows).
• src/ directory holds the core application:
• APIcore.go – HTTP client code for interacting with the anime API.
• config.go – code to load user config from ~/.config/kaizen/config.yaml.
• mainModel.go, appState_test.go – the core model/state of the TUI.
• HelpMenu.go, InfoBox.go, WatchAnime.go, about.go – UI components.
• keymap.go, componentFocus_test.go – input handling, focus logic.
• styles.go – theme definitions.
• utils.go, shared.go – common utilities and types.
• Tests are co-located with their components for unit testing.
README for additional insights
• Describes user flows: search anime, browse SUB/DUB episodes, launch player.
• Mentions configuration directory, keybindings, and known display-size constraints.
• Confirms reliance on a “home‐grown” confidential API.
Elements
• Clear labels on each component (e.g., “TUI: WatchAnime”, “API Client”, “Config Loader”).
• Startup flow (main.go → Config Loader → MainModel).
• Data flow (MainModel ↔ API Client).
• Control flow (User Input → Keymap → MainModel → UI update).
• Process invocation (MainModel → External Video Player).
• Another for application/core-logic.
• A third for external services (API, player).