How hw-technology-com/geoportal works
1. Project shape
- This is a static, client-side geoportal: no backend application code in the repo, no build system, and no server-rendered pages.
- The runtime is the browser, with the site hosted on GitHub Pages.
2. Entry point and page shell
- index.html is the single application entry point.
- css/styles.css provides the global layout and visual system.
- The UI is likely organized as a single-page experience with sections/modules swapped in the browser rather than full page navigation.
3. Application orchestration
- js/app.js acts as the central controller for navigation and UI state.
- It coordinates which screen/module is active and connects the page shell to the geospatial tools.
4. Configuration boundary
- js/config.js is the main integration boundary for environment-specific values.
- It centralizes the GeoServer base URL, workspace name, and layer definitions, so the rest of the app does not hardcode service details.
5. Map rendering subsystem
- js/viewer.js is the geospatial viewer built on OpenLayers.
- It is responsible for initializing the map, managing layers, and presenting spatial data in the browser.
6. WMS visualization flow
- js/wms.js handles map layer visualization through WMS GetMap requests.
- The browser requests rendered map images from GeoServer, which are overlaid in the OpenLayers viewer.
7. WFS download flow
- js/download.js manages feature export via WFS GetFeature requests.
- It supports downloading geospatial data from GeoServer in formats such as Shapefile ZIP and KML.
- This is the main data-extraction path, separate from map rendering.
8. External geospatial service
- The application depends on an external GeoServer instance hosted at Azure (geoserver-aqp.azurewebsites.net).
- GeoServer is the authoritative source of layers and the place where WMS/WFS requests are served from.
9. Cross-origin and browser integration
- Because the frontend is on GitHub Pages and the services are on a different domain, the architecture depends on CORS being enabled on GeoServer.
- Without that, the browser cannot fetch map and download responses.
10. Contact subsystem
- js/contact.js is a separate UI module for contact/form interactions.
- The repo does not show a dedicated API or mail backend, so this is likely client-side UI behavior or an integration point that still depends on external handling.
11. Deployment architecture
- The repository includes GitHub Actions workflows under .github/workflows/.
- These workflows likely automate static deployment/validation and publish the site to GitHub Pages.
- There is no containerization or cloud app service in the repo itself; hosting is static.
12. Key architecture diagram boundaries
- Draw three main zones:
Browser SPA (index.html, css, js/*) → GeoServer WMS/WFS backend → Static hosting/CI via GitHub Pages and GitHub Actions.
- The important data flows are:
- user interaction → app.js → viewer.js/wms.js → GeoServer map images
- user download action → download.js → GeoServer feature exports
- app configuration → config.js → all geospatial modules
Main entry points: app.js App controller · viewer.js Map viewer · wms.js WMS overlay · download.js Downloads
Components 15
Browser SPA
Client-side static application running in the browser.
- App shell · Single-page entry point that loads the application UI.
index.html - Global styles · Site-wide layout and visual system.
css/styles.css - App controller · Coordinates navigation, UI state, and module wiring.
js/app.js - Config · Centralizes GeoServer URL, workspace, and layer definitions.
js/config.js - Map viewer · Initializes the browser map and manages spatial layers.
js/viewer.js - WMS overlay · Builds WMS requests for rendered map images.
js/wms.js - Downloads · Handles WFS-based exports such as Shapefile ZIP and KML.
js/download.js - Contact UI · Client-side contact/form interaction module.
js/contact.js - OpenLayers · Browser mapping library used by the viewer.
GeoServer backend
External geospatial services for rendering and feature export.
- GeoServer · Authoritative source for map layers and feature data.
- WMS · Rendered map-image endpoint consumed by the viewer.
- WFS · Feature-download endpoint used for data exports.
- CORS · Cross-origin access required for browser requests to GeoServer.
Hosting & CI
Static deployment and workflow automation.
- GitHub Actions · Static validation and deployment automation.
.github/workflows/deploy.yml - GitHub Pages · Publishes the static site for browser delivery.
Connections 17
- App shell → Global styles: loads · The page shell applies the global stylesheet.
- App shell → App controller: boots · The page entry loads the main application controller.
- App controller → Config: reads · The app consumes shared service and layer configuration.
- App controller → Map viewer: orchestrates · Main UI state activates the geospatial viewer.
- App controller → Downloads: routes · Download actions are delegated to the export module.
- App controller → Contact UI: opens · Contact interactions are handled in a separate UI module.
- Map viewer → OpenLayers: uses · The viewer is implemented on top of OpenLayers.
- Map viewer → WMS overlay: requests · Map layers are rendered through WMS overlay requests.
- WMS overlay → Config: uses · WMS requests use the shared GeoServer configuration.
- Downloads → Config: uses · WFS export requests use the shared GeoServer configuration.
- WMS overlay → WMS: GetMap · Browser map images are fetched from GeoServer WMS.
- Downloads → WFS: GetFeature · Feature exports are fetched from GeoServer WFS.
- WMS → GeoServer: served by · GeoServer provides the WMS endpoint.
- WFS → GeoServer: served by · GeoServer provides the WFS endpoint.
- GeoServer → CORS: must allow · Cross-origin browser requests depend on CORS configuration.
- GitHub Actions → GitHub Pages: publishes · GitHub Actions deploy the static site to GitHub Pages.
- GitHub Pages → App shell: hosts · The static host serves the browser entry point and assets.