How ianthebaptist/tut_staic_lenin works
Project Type and Purpose
• This is a pure front-end, static interactive map application (“tut_staic_lenin”) that displays geo-referenced photos of Lenin monuments in Belarus.
• There is no server-side code or database—everything is delivered as static assets (HTML, CSS, JS, GeoJSON, and image files) and hosted (e.g., via GitHub Pages).
Main Components
a. Client Browser
• Renders index.html, style.css, script.js
• Runs MapLibre GL JS to display the map and interactivity
• Loads and parses monuments.geojson
• Displays monument details and invokes a lightbox for photos
b. Static Asset Host
• Serves index.html, style.css, script.js, monuments.geojson, and photos/ folder
• Could be GitHub Pages, Netlify, S3, etc.
c. External Tile Service
• Provides map tiles (e.g., OpenStreetMap / MapTiler / MapLibre-compatible tiles)
• MapLibre fetches raster/vector tiles at runtime
d. Data Store (Static Files)
• monuments.geojson (feature collection of monument locations and metadata)
• photos/ (JPEG/PNG images referenced by GeoJSON properties)
Relationships & Data Flow
1. Browser → Asset Host : GET index.html, CSS, JS
2. Browser → Asset Host : GET monuments.geojson
3. Browser → Asset Host : GET photos when a popup/lightbox is opened
4. Browser → External Tile Service : GET map tiles as user pans/zooms
5. script.js (client logic) parses geojson, adds markers, listens for click events → injects photo URLs into the sidebar/lightbox
Architectural Patterns & Principles
• Client-Side Rendering: All UI and data processing happens in the browser.
• Static Hosting: No application server or database.
• Separation of Concerns:
• index.html for structure
• style.css for layout and responsive styles
• script.js for map logic and event handling
• Progressive Enhancement: The map is functional in modern browsers; fallback or basic content could appear if JS fails.
Technologies & Libraries
• HTML5, CSS3, JavaScript (ES6+)
• MapLibre GL JS for map rendering
• GeoJSON for spatial data
• Webmanifest for PWA metadata (photos/site.webmanifest)
• GitHub Pages (or equivalent) for hosting