How leshbs/terra-matcher works
Terra Analog Mission Control turns a Gale Crater terrain reference and curated Earth candidates into an inspectable, feature-weighted similarity ranking—not a site approval. The main workflow serves scenario and candidate data through API routes, validates comparison data, and presents rankings and candidate-level explanations. Separate branches provide map-based exploration and methodology/provenance. An offline pipeline derives terrain features and rankings from raster inputs. The supplied excerpts support the scenario and methodology data access and several UI calls; some pipeline and API internals were not excerpted, so those relationships are omitted or marked unverified.
Main entry points: comparison-dashboard.tsx Mission dashboard · page.tsx Ranking page · comparison-workspace.tsx Candidate workspace · ExploreShell.tsx Explore shell
Components 25
Comparison experience
- Mission dashboard
components/comparison-dashboard.tsx - Ranking page
app/compare/page.tsx - Comparison data
components/comparison/data.ts - Ranked candidates
components/comparison/ranking-dashboard.tsx - Data contracts
components/comparison/contracts.ts - Candidate workspace
components/comparison/comparison-workspace.tsx - Score explanation
components/comparison/comparison-explainability.tsx - Feature comparison
components/comparison/feature-comparison.tsx - Methodology page
components/methodology-content.tsx
Data and provenance API
- Scenario endpoint
app/api/scenarios/route.ts - Candidate endpoint
app/api/scenarios/[scenarioId]/candidates/route.ts - Methodology endpoint
app/api/methodology/route.ts - Public DB client
lib/supabase/public.ts
Map exploration
- Explore shell
components/explore/ExploreShell.tsx - Explore data
lib/explore/data.ts - Terrain map
components/explore/MapView.tsx - Map geometry
lib/explore/geo.ts - Terrain layers
lib/explore/layers.ts
Terrain pipeline
- Ranking runner
pipeline/src/terra_analog/run_rankings.py - Ranking engine
pipeline/src/terra_analog/ranking.py - Feature runner
pipeline/src/terra_analog/run_training_features.py - Raster inputs
pipeline/src/terra_analog/source_rasters.py - Terrain features
pipeline/src/terra_analog/terrain_features.py
Other components
- Mission analyst
- Supabase
Connections 24
- Mission analyst → Mission dashboard: opens dashboard
README.md - Mission dashboard → Scenario endpoint: fetches scenarios
components/comparison-dashboard.tsx - Mission dashboard → Candidate endpoint: fetches candidates
components/comparison-dashboard.tsx - Scenario endpoint → Public DB client: queries via
app/api/scenarios/route.ts - Methodology endpoint → Public DB client: queries via
app/api/methodology/route.ts - Public DB client → Supabase: connects to
- Mission analyst → Ranking page: opens rankings
README.md - Ranking page → Comparison data: loads bundle
app/compare/page.tsx - Ranking page → Ranked candidates: renders ranking
app/compare/page.tsx - Ranked candidates → Data contracts: uses definitions
components/comparison/ranking-dashboard.tsx - Mission analyst → Candidate workspace: opens candidate
README.md - Candidate workspace → Score explanation: renders explanation
components/comparison/comparison-workspace.tsx - Candidate workspace → Feature comparison: renders features
components/comparison/comparison-workspace.tsx - Mission analyst → Methodology page: opens methodology
README.md - Methodology page → Methodology endpoint: loads provenance
- Mission analyst → Explore shell: opens map
- Explore shell → Explore data: loads data
components/explore/ExploreShell.tsx - Explore shell → Terrain map: renders map
components/explore/ExploreShell.tsx - Terrain map → Map geometry: builds map points
components/explore/MapView.tsx - Terrain map → Terrain layers: colors terrain
components/explore/MapView.tsx - Ranking runner → Ranking engine: uses ranking
pipeline/src/terra_analog/run_rankings.py - Ranking runner → Feature runner: uses features
pipeline/src/terra_analog/run_rankings.py - Feature runner → Raster inputs: uses rasters
pipeline/src/terra_analog/run_training_features.py - Feature runner → Terrain features: derives features
pipeline/src/terra_analog/run_training_features.py