How currenjin/wharf works
Main Components
a) Core Components:
• CLI Interface (Entry Point)
• Project Analyzer
• Framework Detectors
• Service Detectors
• Docker Configuration Generators
• File Writers
b) Domain Model:
• Project
• Framework
• Services (Database, Cache, MessageQueue)
Component Relationships
CLI Input → Project Analysis → Detection → Generation → Output Files
Input Layer
• CommandLineRunner (entry point)
• CommandLineMessage (user input processing)
Analysis Layer
• DefaultProjectAnalyzer
• Project domain object
Detection Layer (two parallel tracks)
• Framework Detectors:
• SpringBootFrameworkDetector
• NodeFrameworkDetector
• Service Detectors:
• DatabaseService (MySQL, PostgreSQL)
• CacheService (Redis)
• MessageQueueService (RabbitMQ)
Generation Layer
• DockerComposeGenerator
• DockerfileGenerator
• DockerServiceGenerator
Output Layer
• DockerConfigWriter
• Generated Files (Dockerfile, docker-compose.yml)
Important Details
• Supported frameworks (Spring Boot, Node.js)
• Supported services (MySQL, PostgreSQL, Redis, RabbitMQ)
• File I/O operations
• Main flow of control
Technical Notes
• Interface-based design (ProjectAnalyzer, FrameworkDetector, ServiceDetector)
• Domain model relationships
• Where exception handling occurs (UnsupportedFrameworkException, UnsupportedServiceException)
Remember to maintain a balance between showing the high-level architecture and including important implementation details that make Wharf unique, such as its smart detection capabilities and zero-configuration approach.