How ngshiheng/michelin-my-maps works
Main Components
a) Core Components:
• Crawler Service (pkg/crawler)
• Parser Service (pkg/parser)
• Data Storage Layer (CSV output)
• Logger Service (pkg/logger)
• Michelin Domain Models (pkg/michelin)
b) External Components:
• Michelin Guide Website (External Data Source)
• Cache System (mentioned in README)
• CI/CD Pipeline (GitHub Actions)
[Michelin Website] -> [Crawler Service] -> [Parser Service] -> [CSV Storage]
Specific Component Details
Crawler Service (Main Component):
• Two sub-components: crawler.go and xpath.go
• Connection to external Michelin website
• Cache interaction
Parser Service:
• Connection to the Michelin domain models
• Test coverage (parser_test.go)
Domain Models:
• Three model files (distinction.go, restaurant.go, url.go)
• Their relationship to the parser
• External Layer |
• Service Layer |
• Domain Layer |
• Storage Layer |
Technical Details
• Go Colly integration points
• XPath selectors usage
• CSV output format
• Cache mechanism
• Error handling paths
• Logging points
This architecture should emphasize the project's main purpose as a data collection tool while showing its robust error handling, caching, and logging capabilities.