How xbl2602/bean-drift works
Bean Drift is a lunar landing-site navigator: users ask about or select a location, inspect illumination, Earth visibility, terrain and landmarks, compare candidate sites, then explore the Moon in synchronized 3D, 2D or first-person views. Its server also exposes read-only REST and MCP tools over shared lunar calculations. The graph preserves documented product stages and major interfaces; some subsystem links rely on README statements because their implementation files were not sampled.
Main entry points: lunar-quest-app.tsx Workspace orchestrator · use-point-analysis.ts Point analysis · route.ts Agent endpoint · terrain-source-routing.ts Terrain source routing
Components 22
User experience
- Landing page
app/(landing)/page.tsx - Workspace orchestrator
src/ui/product/lunar-quest-app.tsx - 3D globe
src/ui/product/globe-3d/globe-3d-view.tsx - 2D map
src/ui/product/map-2d/map-2d-view.tsx - First-person view
src/ui/product/first-person/first-person-view.tsx
AI assistant
- AI tools panel
src/ui/product/panels/ai-chat/ai-chat.tsx - Agent endpoint
app/api/agent/route.ts - Agent runner
src/features/agent-search/logic/run-agent.ts - IAU gazetteer
src/features/agent-search/logic/gazetteer.ts - DeepSeek service
src/features/agent-search/api/deepseek.ts
Science interfaces
- REST tools
app/api - MCP endpoint
app/mcp/route.ts - MCP server
src/core/mcp/server.ts - Tool registry
src/core/registry.ts
Lunar analysis
- Point analysis
src/ui/product/analysis/use-point-analysis.ts - Landing-site mode
src/ui/product/modes/landing-sites-mode.tsx - Mission simulator
src/ui/product/simulator/mission-sim.ts - Visibility timeline
src/features/point-timeline/logic/get-point-timeline.ts
Terrain data
- Terrain source routing
src/core/data/terrain-source-routing.ts - Polar terrain
src/core/data/polar-terrain.ts - Global terrain maps
src/core/data/precomputed-maps.ts
Other components
- Explorer
Connections 24
- Explorer → Landing page: opens
README.md - Explorer → Workspace orchestrator: explores
README.md - Landing page → Workspace orchestrator: links to
app/(landing)/page.tsx - Workspace orchestrator → 3D globe: renders
src/ui/product/lunar-quest-app.tsx - Workspace orchestrator → 2D map: renders
src/ui/product/lunar-quest-app.tsx - Workspace orchestrator → First-person view: renders
src/ui/product/lunar-quest-app.tsx - Workspace orchestrator → Point analysis: uses
src/ui/product/lunar-quest-app.tsx - Workspace orchestrator → Landing-site mode: shows
src/ui/product/lunar-quest-app.tsx - Workspace orchestrator → Mission simulator: offers
README.md - Workspace orchestrator → Visibility timeline: shows
README.md - Explorer → AI tools panel: asks
README.md - AI tools panel → Agent endpoint: posts question
README.md - Agent endpoint → Agent runner: creates handler
app/api/agent/route.ts - Agent runner → IAU gazetteer: resolves names
src/features/agent-search/logic/run-agent.ts - Agent endpoint → DeepSeek service: configures completion
- Explorer → REST tools: queries
README.md - Explorer → MCP endpoint: connects
README.md - MCP endpoint → MCP server: delegates to
app/mcp/route.ts - MCP server → Tool registry: dispatches tools
src/core/mcp/server.ts - Tool registry → Point analysis: exposes calculations
README.md - REST tools → Point analysis: shares core
README.md - Point analysis → Terrain source routing: uses terrain
README.md - Terrain source routing → Polar terrain: reads polar data
src/core/data/terrain-source-routing.ts - Terrain source routing → Global terrain maps: reads global data
src/core/data/terrain-source-routing.ts