How bikashpandeya/test_alterecho works
TerraLuna AI lets users explore Earth terrain candidates and compare them with a Mars reference. The main workflow runs from the dashboard through the frontend API client to FastAPI discovery: the comparison route selects real or demo summaries, checks compatibility, computes similarity, and returns ranked results. A separate provenance workflow acquires DEM data, harmonizes it to versioned AOIs, computes terrain metrics, and records quality and provenance for API use. The graph includes documented visualization and source-management capabilities; unsampled implementation details are omitted where their call relationships cannot be verified.
Main entry points: geospatial_service.py Geospatial processing · page.tsx Dashboard · catalog_service.py Catalog service · main.py FastAPI application
Components 27
Explorer interface
- Dashboard
frontend/app/page.tsx - API client
frontend/lib/api.ts - Candidate map
frontend/app/components/CandidateMap.tsx - Planet selector
frontend/app/components/PlanetSelector.tsx - Planet viewer
frontend/app/components/PlanetViewer.tsx - Space scene
frontend/app/components/SpaceScene.tsx
API and discovery
- FastAPI application
backend/app/main.py - API schemas
backend/app/models/schemas.py - Catalog routes
backend/app/routers/catalog.py - Discovery route
backend/app/routers/comparison.py - Geospatial routes
backend/app/routers/geospatial.py - Health route
backend/app/routers/health.py - Similarity engine
backend/app/services/similarity_service.py - Result explanations
backend/app/services/explanation_service.py
Terrain processing
- Geospatial processing
backend/app/services/geospatial_service.py - Terrain metrics
backend/app/services/terrain_service.py - SRTM acquisition
backend/app/services/srtm_service.py - Dataset processing
backend/app/scripts/process_site.py - Dataset acquisition
backend/app/scripts/acquire_dataset.py
Catalog and provenance
- Catalog service
backend/app/services/catalog_service.py - Site catalog
backend/app/data/sites.json - Similarity configuration
backend/app/data/similarity.v2.json - Processed terrain summaries
backend/data/processed - Versioned AOIs
backend/data/aoi - Source manifests
backend/data/manifests
Other components
- Explorer
- Backend API
Connections 29
- Explorer → Dashboard: explores
README.md - Dashboard → Planet selector: renders
frontend/app/page.tsx - Dashboard → Candidate map: renders
frontend/app/page.tsx - Dashboard → Space scene: renders
frontend/app/page.tsx - Dashboard → Planet viewer: renders
frontend/app/page.tsx - Dashboard → API client: requests data
frontend/app/page.tsx - API client → Backend API: calls HTTP API
README.md - FastAPI application → Catalog routes: registers
backend/app/main.py - FastAPI application → Discovery route: registers
backend/app/main.py - FastAPI application → Geospatial routes: registers
backend/app/main.py - FastAPI application → Health route: registers
backend/app/main.py - Catalog routes → Catalog service: calls
backend/app/routers/catalog.py - Discovery route → Catalog service: loads summaries
backend/app/routers/comparison.py - Discovery route → Similarity engine: compares features
backend/app/routers/comparison.py - Discovery route → Result explanations: builds explanations
backend/app/routers/comparison.py - Geospatial routes → Catalog service: loads catalog
backend/app/routers/geospatial.py - Geospatial routes → Geospatial processing: reads provenance
backend/app/routers/geospatial.py - Similarity engine → Similarity configuration: loads configuration
README.md - Catalog service → Site catalog: reads
backend/app/services/catalog_service.py - Catalog service → Processed terrain summaries: reads summaries
backend/app/services/catalog_service.py - Catalog service → API schemas: validates data
backend/app/services/catalog_service.py - Dataset processing → Geospatial processing: processes site
backend/app/scripts/process_site.py - Dataset acquisition → SRTM acquisition: acquires tiles
backend/app/scripts/acquire_dataset.py - Dataset acquisition → Geospatial processing: uses geospatial tools
backend/app/scripts/acquire_dataset.py - Geospatial processing → Terrain metrics: computes summaries
backend/app/services/geospatial_service.py - Geospatial processing → Versioned AOIs: uses AOIs
README.md - Geospatial processing → Source manifests: records provenance
README.md - Geospatial processing → Processed terrain summaries: writes summaries
backend/app/services/geospatial_service.py - API client → Candidate map: provides map types
frontend/app/components/CandidateMap.tsx