- UseCase : a file containing the use case definition
- App : a directory with a use cases folders and metadata (i18n, metadata)
- Product : a directory with a apps folders and metadata (i18n, metadata)
- Target : depends on it by for a GUI it's the screens where use cases are injected
> I would rethink how you named the 'App' layer export interface Logger {
debug(message: LoggerMessage, ...meta: unknown[]): void;
error(err: Error): void;
info(message: LoggerMessage, ...meta: unknown[]): void;
trace(message: LoggerMessage, ...meta: unknown[]): void;
warn(message: LoggerMessage, ...meta: unknown[]): void;
}
Great job ! Emojis can actually be useful while working locally, especially to detect errors quickly.
That being said, TBH I don't see any real scenario where I would "prototype a CLI". Unlike a GUI where elements can be placed in some places vs others, a CLI is a CLI.
For any developer, it would probably take less time to write it directly using one of the libraries listed here : https://bloomberg.github.io/stricli/blog/intro (TS/JS) or https://github.com/spf13/cobra (Go) with stub implementations for commands.
The main problem for me is that defining the CLI in a JSON file lacks all the flexibility of code (reusability, etc.).