How daveagill/aoc2024 works
Main Components Organization
a) Runtime Environment Layer
• TypeScript compiler representation
• Permissions (--allow-read) configuration
b) Project Structure Layer
• Helpers.ts utility module connection
Day Module Pattern (repeat for each day)
• Input Handler (data.txt, example.txt)
• Solution Components (part1.ts, part2.ts)
• Test Runner (test.ts)
• Blue: Runtime components
• Green: Solution modules
• Yellow: Test components
• Gray: Input/data files
• Purple: Utility/helper components
Data Flow Representation
• File system read operations (data.txt → solution)
• Test execution flow (test.ts → part1/part2)
• Helper utility usage (helpers.ts → day modules)
Specific Elements
┌─ Core Infrastructure ─────┐
• Deno Runtime │
• TypeScript Compiler │
• File System Access │
• ┘
b) Day Module Template:
┌─ Day N ─────────────────┐
• ┌─ Input ─┐ ┌─ Logic ─┐ │
• data │ │ part1 │ │
• example │ │ part2 │ │
• ┘ └─────────┘ │
• ┌─ Tests ─────────────┐ │
• test.ts │ │
• ┘ │
• ┘
Integration Points
How the following integrate:
• deno.json configuration
• helpers.ts utility functions
• test runner system
Execution Flow
Two main execution paths:
Single Solution Mode: deno task dNpM
Key Considerations:
Maintain Consistency
• Keep module representations uniform
• Apply consistent naming conventions