How ua-snap/ardac-explorer works
Based on our analysis of the file tree and the README, ARDAC Explorer is a Nuxt.js (Vue) based full-stack web application that provides an interactive, map-intensive UI with rich content—including charts, items, and geospatial data visualization. The system is designed to serve both static and dynamic pages, integrate external geospatial services (like GeoServer, Rasdaman, and SNAP), and deploy as a statically generated website (with AWS S3 and CloudFront) while also offering robust local development support.
Main Components
• Client-Side Application:
– The Nuxt.js-based Vue SPA forms the heart of the frontend. Identify the key folders:
▪ Pages: (“pages/index.vue”, “pages/about.vue”, etc.) which define the different views.
▪ Layouts: (“layouts/default.vue”, “layouts/home.vue”) that provide common page structure.
▪ Components: an extensive collection including both general components (e.g., Header.vue, Footer.vue, Navbar.vue) and specialized “global” components (e.g., climate charts and map visualizations) used across the site.
▪ Stores: Vuex (or its Nuxt store module) used for managing state for charts, maps, and other data modules.
▪ Plugins: for integrating third-party libraries (Leaflet, Plotly, Lodash, etc.) and custom utilities.
▪ Assets & Public: static assets including geospatial data (GeoJSON files), images, styles (SCSS), and preview files.
• External Services & APIs:
– Highlight the external endpoints configured via environment variables:
▪ GEOSERVER_URL – for WMS map services.
▪ RASDAMAN_URL – for accessing rasdaman OWS (likely for spatiotemporal data queries).
▪ SNAP_API_URL – for additional Earth science data.
• Server-Side & Build Tools:
– Nuxt’s server folder (with its TS configuration) which may coordinate SSR or API handling.
– Scripts (e.g., csv2json.cjs) and configuration files (nuxt.config.ts, package.json, tsconfig.json) that drive the build and development process.
• Deployment Infrastructure:
– AWS S3 bucket for static website hosting.
– CloudFront for caching and distribution, with specific instructions for invalidations.
– CI/CD elements as noted by the deployment “npm run generate” command and AWS CLI usage.
Relationships and Interactions
• Pages load and compose various components which further depend on the state management in Stores and data provided by Assets.
• Plugins initialize and enhance functionality at startup (e.g., Leaflet maps, Plotly charts) and should be illustrated as middleware between the UI components and low-level external libraries.
• The Server processes requests (if using SSR or API route endpoints) and serves the pre-rendered pages which are built into a static site.
• The deployment pipeline (build, generate, AWS S3 upload, CloudFront invalidation) should be depicted as a separate process that finalizes the static site contents.
Architectural Patterns & Design Principles
• Component-Based Architecture: Emphasize separation between reusable Vue components and pages.
• Integration with External Services: Indicate how data flows from external geoservices (GeoServer, Rasdaman, SNAP) into the client application.
• Static Site Generation with Hydration: Notice that while the site is built statically, techniques in “app.vue” are used to catch and route dynamic redirects – mark this in the flow.
Technology, Frameworks, and Libraries
• Nuxt.js/Vue.js is the primary framework.
• SCSS for styling.
• Leaflet (with proj4leaflet plugin) for mapping.
• Plotly for advanced chart rendering.
• Lodash for utility functions.
• AWS (S3 and CloudFront) for hosting and distribution.