How savire/dloc works
Main Components
• Command Line Interface (CLI) Module – This is the entry point to the application where the user’s commands or parameters are parsed.
• Core Logic (Source Code Counter) – Encapsulated primarily in app.dz, this component handles scanning through files or directories, counting source code lines, and applying any filtering logic.
• File System Helper – Although not a separate file, conceptually outline component(s) responsible for accessing directories and reading files.
• Output/Reporting Module – Represents how the final count and possibly additional outputs (e.g., statistics, error messages) are delivered back to the user.
Relationships and Interactions
• The CLI Module receives user input (e.g., file paths or options) and passes parameters to the Core Logic.
• The Core Logic invokes the File System Helper to scan directories and obtain file contents.
• After processing, the Core Logic calls the Output/Reporting Module, which displays results directly on the console.
• Optionally, if the program displays a logo or help information, it will reference the Assets folder.
• User Input → CLI Module → Core Logic → File System Helper
• Core Logic → Output Module (results back to the user)
• (Optionally) Assets are referenced by the CLI Module at startup.
Architectural Patterns and Design Principles
• Modular Design: Even though the implementation is in a single file (app.dz), conceptually separate the concerns (input handling, processing, file operations, output) into logical modules.
• Separation of Concerns: Clearly delineate responsibilities between parsing, processing, and reporting.
• Command Line Application Pattern: Emphasize how the system design adheres to typical CLI design approaches.
Relevant Technologies and Context
• The project uses the DoZe language/platform, which is highlighted in the README. Present the DoZe runtime or compiler as an underlying dependency that executes the app.dz file.
• Mention the pre-compiled binary option for end users, which suggests that the deployment and build process might eventually be more complex but for this project remains straightforward.