mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-21 17:31:15 +00:00
b0fffa6d42
Phase A baseline outputs from /autodev (Steps 1-5): - Problem & solution docs (_docs/00_problem, _docs/01_solution) - Codebase documentation (_docs/02_document) incl. architecture, module-layout, glossary, system-flows, baseline compliance scan - Test specs (blackbox, performance, resilience, security, resource, traceability matrix) - Test task decomposition (_docs/02_tasks/todo): AZ-285..AZ-290 - Testability refactor (_docs/04_refactoring/01-testability-refactoring): - TC-01 Move DownloadedTileInfoV2 + new ExistingTileInfo to Common.DTO - TC-02 Replace dead ISatelliteDownloader API with real signatures - TC-03 GoogleMapsDownloaderV2 implements ISatelliteDownloader - TC-04 TileService depends on ISatelliteDownloader (mockable) - TC-05 DI + endpoints use ISatelliteDownloader - Test runner scripts (scripts/run-tests.sh, run-performance-tests.sh) - Autodev state pointer (_docs/_autodev_state.md) Prepares the codebase for AZ-285..AZ-290 unit/integration test work. Co-authored-by: Cursor <cursoragent@cursor.com>
2.7 KiB
2.7 KiB
Module: Common/Configs
Purpose
Configuration POCOs that bind to appsettings.json sections via IOptions<T> pattern.
Public Interface
MapConfig
Service(string): map provider name (e.g., "GoogleMaps")ApiKey(string): API key for the map provider
StorageConfig
TilesDirectory(string): base path for tile storage (default:/tiles)ReadyDirectory(string): base path for output files (default:/ready)GetTileSubdirectoryPath(int zoomLevel, int tileX, int tileY) → string: computes bucketed subdirectory path ({tiles}/{zoom}/{xBucket}/{yBucket}) using integer division by 1000GetTileFilePath(int zoomLevel, int tileX, int tileY, string timestamp) → string: computes full file path with timestamped filename (tile_{z}_{x}_{y}_{ts}.jpg)
ProcessingConfig
MaxConcurrentDownloads(int, default: 4): semaphore limit for parallel tile downloadsMaxConcurrentRegions(int, default: 3): parallel region processing workersDefaultZoomLevel(int, default: 20): fallback zoom levelQueueCapacity(int, default: 100): bounded channel capacity for region request queueDelayBetweenRequestsMs(int, default: 50): throttle delay between Google Maps requestsSessionTokenReuseCount(int, default: 100): tiles per session token before rotation
DatabaseConfig
ConnectionString(string): DB connection string (unused — connection string is resolved directly fromIConfigurationinProgram.cs)
Internal Logic
StorageConfig.GetTileSubdirectoryPath buckets tiles by dividing X/Y coordinates by 1000, preventing filesystem performance degradation from too many files in one directory.
Dependencies
None (pure POCOs, no internal imports).
Consumers
Program.cs— binds from config sections viabuilder.Services.Configure<T>()GoogleMapsDownloaderV2— readsMapConfig,StorageConfig,ProcessingConfigviaIOptions<T>RegionService— readsStorageConfigRegionProcessingService— readsProcessingConfigRouteProcessingService— readsStorageConfigRegionRequestQueue— receivesQueueCapacityas constructor param
Data Models
No domain entities; these are configuration DTOs.
Configuration
These classes define the configuration shape consumed by all services.
| Config Class | appsettings Section |
|---|---|
| MapConfig | MapConfig |
| StorageConfig | StorageConfig |
| ProcessingConfig | ProcessingConfig |
| DatabaseConfig | (not wired — connection string read directly) |
External Integrations
None.
Security
MapConfig.ApiKey holds the Google Maps API key. In production, injected via environment variable MapConfig__ApiKey.
Tests
No dedicated tests.