Architecture
Kiyosaki separates public use cases, infrastructure and command-line concerns.
Core
src/Core is the public, infrastructure-light surface:
immutable
DrawRecordandStoredCombinationdomain values;bounded
CombinationGenerator;FrequencyAnalyzerandSuccessRateAnalyzer;DrawImporter, which coordinates ports supplied by the system layer.
System
src/System owns volatile details:
Databaseis the single owner of SQLite location, schema and queries;ResultsClientisolates HTTP retrieval and year-level response caching;LotteryResultsParserowns the current official JSON contract.
src/Console/Application translates command options and exceptions into text
and exit codes.
This separation makes the generator and analyzers deterministic to test, keeps network access replaceable, and prevents tests from writing to committed data.