How phodal/chapi works
Main Components Architecture
┌─────────────────────────────────────────────────────────────┐
• Chapi Core System │
• ┬─────────────────────────┬──────────────────┤
• Language ASTs │ Domain Model │ Helpers │
• (Tier 1-3) │ │ │
• ┴─────────────────────────┴──────────────────┘
Detailed Component Breakdown
• Tier 1 (Green): Java, TypeScript
• Tier 2 (Yellow): Kotlin, Go, Python, Scala
• Tier 3 (Orange): Rust, C#, C, C++
• IDL (Blue): Protobuf, Thrift
b) Domain Model (Core):
• CodeProject
• CodeModule
• CodePackage
• CodeContainer
• CodeDataStruct
• CodeFunction
• Supporting Elements (CodeAnnotation, CodeField, etc.)
Source Code ─→ Language Parser ─→ AST Generation ─→ Domain Model ─→ Unified Output
Component Interactions
• How language parsers interact with the domain model
• How the domain model components relate to each other
• How helpers support the main components
Key Features Layer
Supported features for each language:
• HTTP API Declaration
• Syntax Parsing
• Function Calls
• Architecture/Package Analysis
• Real-world Usage
Implementation Details
Technical details like:
• ANTLR Grammar Integration
• Two-pass Scanning Process
• Language-specific Rules
• Extension Points
Labels
• Clear, concise component names
• Version information where relevant
• Support status indicators
Notes
• Important implementation details
• Experimental features
• Extension points
Remember to:
• Most important interactions
• Version information
• Clear boundaries between components
• Extension points for future development