How shikhar13012001/monk-minal works
Main Components
a) Core Application Layer:
• Entry Point (index.js)
• Game Engine (modules/game.js)
• Configuration Handler (modules/options.js)
• Data Loader (modules/loader.js)
b) Data Layer:
• Word Database (data/allWords.json)
• Quotes Database (data/quotes.json)
c) Utility Layer:
• CLI Interface (utils/cli.js)
• Helper Functions (utils/helpers.js)
• Initialization Module (utils/init.js)
• Logging System (utils/log.js)
Component Relationships and Flow
• User Input → CLI Interface → Game Engine
• Game Engine ↔ Data Layer
• Game Engine → Logging System
• Configuration Handler ↔ Game Engine
• Initialization Module → All Components
┌─────────────────────────────────────────────────────┐
• User Interface │
• (Terminal/Command Line) │
• ┘
• ↕
┌─────────────────────────────────────────────────────┐
• CLI Interface │
• (utils/cli.js) │
• ┘
• ↕
┌─────────────────────────────────────────────────────┐
• Core Engine │
• ┬─────────────────┬────────────────┤
• Game Engine │ Options Handler│ Data Loader │
• (game.js) │ (options.js) │ (loader.js) │
• ┴─────────────────┴────────────────┘
• ↕
┌─────────────────────────────────────────────────────┐
• Data Layer │
• ┬───────────────────────────┤
• Word Database │ Quotes Database │
• (allWords.json) │ (quotes.json) │
• ┴───────────────────────────┘
Additional Elements
• Chalk
• Enquirer
• CLI-Spinners
• Random-Words
• Readline
• Strip-ANSI
• Ruxe
• Ora
Performance Monitoring
A separate section showing how performance metrics are calculated and displayed:
• WPM Calculator
• Accuracy Tracker
• Error Counter