How nasa-impact/veda-ui works
Project type and purpose
• VEDA Dashboard UI is a front-end, React-based single-page application for browsing and exploring NASA-IMPACT datasets (MDX-driven content, geospatial layers, charts). This repo contains only the UI; content configuration lives in a separate “veda-config” repo.
File structure
• Top-level:
• Dot-files and config (.babelrc, .parcelrc, .env, ESLint/Prettier)
• GitHub Actions workflows under .github/workflows
• README’s and ADRs under docs/ (including docs/development/ARCHITECTURE.md)
• app/
• app/index.html template
• app/graphics for static graphics
• scripts/
• main.tsx and entry points (redirects.tsx, instance.ts)
• context providers (veda-ui-provider, react-query)
• data-layer (fetch abstraction, dataset definitions)
• components grouped by domain (common, home, catalog, exploration, stories, sandbox, user-pages, uhoh)
• styles and USWDS wrappers under scripts/styles and scripts/uswds
• utils and custom parcel resolvers/transformers for MDX frontmatter
• static/public/geo-data – geojson state boundaries and other static assets
• mock/ – sample MDX content for local testing
• parcel-resolver-veda & parcel-transformer-mdx-frontmatter – custom build plugins
• tests/
• Jest unit tests alongside components
• Playwright E2E under test/playwright
README for additional insights
• Confirms UI-only focus, points to content/config docs elsewhere
• Directs to ARCHITECTURE.md for more background
Main components and their interactions
a. Developer Environment
• Local machine with Node.js, Yarn/NPM, .env for local overrides
b. Source Control & CI/CD
• GitHub repository → GitHub Actions pipelines (lint, test, build, release)
c. Build Layer
• Parcel bundler + Babel compile TSX/JS, MDX frontmatter transformer, parcel-resolver-veda for content resolution
d. Hosting/Deployment
• Static artifact (index.html + JS/CSS bundles + static assets) deployed to a CDN or static host (e.g. S3/Netlify/CloudFront)
e. Browser Runtime
1. Loader (index.html) pulls in the JS bundle
2. React Root mounts (main.tsx)
3. Context Providers wrap the app (veda-ui-provider, react-query)
4. Router (redirects.tsx) directs to feature pages: Home, Data Catalog, Exploration, Stories, Sandbox, User Pages, About, Uhoh
5. Each page composes domain components (from scripts/components/…) which in turn use common UI primitives (header, footer, cards, tables, charts, map controls)
6. Data layer hooks (use-stac-metadata-datasets, react-query, custom fetch utilities) call out to:
– veda-config server (JSON content)
– NASA STAC/geospatial APIs (tile servers, geojson)
– Static assets under /static/public
7. Components use Mapbox GL (scripts/components/common/map)
Architectural patterns & design principles
• Component-driven, domain-organized React modules
• Custom Parcel plugins for frontmatter-based MDX content inclusion
• Hook-based data fetching and state management via react-query
• Static SPA build – no backend code in this repo
• Separation of concerns: content config external, UI focuses on rendering