How carbonplan/oae-web works
Main Components to Include:
Frontend Architecture (Primary Focus)
• Next.js Application Layer
• Pages (Route Handlers)
• Components Layer
• Store (State Management)
• Utils (Helpers)
Data Processing Pipeline
• Region Data Processing Scripts
• Tile Generation System
Core Application Structure
a) Client Layer (Top)
• Main entry points (/pages directory)
• To the component composition layer
b) Component Layer (Middle)
• Components into logical sections:
• Visualization Components (map.js, chart-section.js, timeseries.js)
• UI Controls (region-picker.js, footer components)
• Data Display (region-info.js, display-section.js)
c) Data & Utils Layer (Bottom)
• Store management (store/index.js)
• Utility functions (utils/)
• Data processing utilities (zarr.js, csv.js)
Data Flow Patterns
• Data flow from store to components
• User interaction flows
• Data processing pipelines
External Systems
Connections to:
• Static tile server (process-region-data/tiles)
• Data sources (geojson files, NetCDF data)
• Blue: Core Next.js components
• Green: Data visualization components
• Orange: Data processing utilities
• Purple: External data sources
• Gray: Utility functions
Specific Implementation Details:
Inside this container, create sections for
• Pages (/_app.js, /research/oae-efficiency)
• Components (showing hierarchy and relationships)
• Store (state management)
• Utils (supporting functions)
• Python scripts (build-tiles.py, convert.py)
• To the tile output directory
• Data transformation flow