How hdck007/goat works
Main Components to Include:
Compiler System
• Components include:
• Parser (parser.go)
• AST Generator (ast-to-json.go)
• Transpiler (transpiler.go)
Core Virtual DOM Engine (goat directory)
• Components include:
• Virtual Element System (velement.go)
• Block Management (block.go)
• Rendering Engine (render.go)
• DOM Proxy (proxy.go)
• Edit Operations (edits.go)
WebAssembly Runtime
• This as a bridge between the Go code and the browser
• Main.wasm files in both site and compiler directories
Browser Environment
• DOM interaction layer
Three Main Flows
a. Compilation Flow:
.goat files → Parser → AST → Transpiler → Go code
b. Build Flow:
Go code → WebAssembly compilation → .wasm files
c. Runtime Flow:
Virtual DOM → DOM Proxy → Browser DOM
Key Relationships to Highlight:
Demonstrate the WebAssembly bridge between Go code and browser
Additional Elements:
Notes about the development server (planned feature)
Level of Detail:
• Keep the main components clearly separated
• File relationships without getting into code-level details
• Major interfaces between components
• Event binding system (marked as TODO)
• Prop serialization flow (marked as TODO)
Special Considerations:
Development server's planned position in the architecture
Remember to:
• Use clear, readable fonts
• A title and brief description
• Version information
• External dependencies
• A small section showing planned features