How eddy3133/gis-sample-projects works
Project type and purpose
• This is a single‐page, front-end React application bootstrapped with Create React App.
File structure
• Top-level files:
• package.json / package-lock.json: NPM package definitions & lockfile.
• public/: Static HTML entry point and manifest (index.html, manifest.json, robots.txt).
• src/: All React source code.
• src breakdown:
• src/index.js → ReactDOM entry, injects <App/> into public/index.html.
• src/App.js → Root component, contains React Router (navigates pages).
• src/components/ → Reusable UI (Header, Footer).
• src/pages/ → Route targets (Landingpage, About, Contact, Works).
• src/utils/Maps/ → Offline map assets (zipped shapefile bundles).
• config/test, reportWebVitals, setupTests.
README insights
• Standard Create React App. No custom back end, no external microservices described.
• Build, start, test scripts via npm.
Main components & interactions
a. Components
1) Browser / Client (Web App)
2) React Application
– Entry Point (index.js / App.js)
– Router / Pages (Landing, About, Works, Contact)
– Shared Components (Header, Footer)
– Utility Layer (Maps assets loader)
3) Static Asset Server (e.g., Netlify/Apache/Nginx serving build/*)
4) Offline Data Storage (zipped shapefiles in src/utils/Maps)
5) Build Pipeline (Node.js + Webpack + Babel)
b. Relationships & data flow
• Browser requests index.html from Static Server → loads bundled JS/CSS.
• App.js (Router) directs user to a page component.
• Page components import reusable UI and call utility functions to fetch or unzip map assets.
• Utility layer serves map data from local assets directly in browser memory.
• Build Pipeline: source files → webpack + Babel → production bundles → deployed to Static Server.
c. Architectural patterns / principles
• Single-Page Application (SPA) with client-side routing.
• Component-based UI (Header/Footer shared).
• Separation of concerns:
– Pages (views) vs. Components (UI elements) vs. Utils (data handling).
d. Key technologies
• React, React Router, JSX, CSS modules
• Create React App (Webpack, Babel, ESLint)
• Node.js / npm (dev server, build)
• Local zipped shapefiles (GIS data)