Repository navigation
feat: professionalize network map, align Praxium theme, fix OSM tile policy block - #12
Merged
Merged
Conversation
The map was hitting tile.openstreetmap.org directly for both light and dark rendering, which violates OSM's tile usage policy for anything beyond light personal/dev use — the app was getting blocked (osm.wiki/blocked) exactly as that policy warns. CARTO's basemaps were tried as a replacement but now require a signed-up API key even on their free tier, which isn't something to bolt on silently. Switch both organization-network-map.html and the admin preview map to Esri's community Canvas basemaps (World_Light_Gray_Base / World_Dark_Gray_Base) — genuinely keyless, no signup, and dark mode now uses a real dark basemap instead of a CSS invert() filter faking one over blocked OSM tiles. Updated the CSP img-src in both the public map page and vercel.json's /admin headers to match. Native tiles only go to zoom 16; added maxNativeZoom so Leaflet upscales rather than blanking past that instead of raising maxZoom's native ceiling. Also restores the initial map view to center on the Praxium Foundation's location (Vancouver, BC) at zoom 5 — this had regressed back to a generic [20, 0] world view during the professionalization refactor. Verified: npm run validate passes unchanged; headless-browser check confirms real tiles render (not "API key required" placeholders) in both light and dark mode with zero CSP violations. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved CSP, version-display, initial-view, and /admin header issues remain, along with documentation, token, and preconnect nits.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Professionalizes the Praxium network map, strengthens API/admin handling, and migrates basemap tiles from OSM to Esri.
Changes:
- Splits the map into modular HTML, CSS, JavaScript, and data assets.
- Adds Praxium branding, responsive UI, validation, security headers, tests, and CI updates.
- Updates Electron tooling, deployment workflows, documentation, and tile configuration.
| File | Reviewed change |
|---|---|
vercel.json |
Deployment security headers and updated tile CSP. |
test/public-assets.test.js |
Public asset and security tests. |
test/network-data.test.js |
Data normalization and relationship tests. |
test/api.test.js |
API, validation, and concurrency tests. |
README.md |
Architecture and workflow documentation. |
praxium-tokens-v2.css |
Praxium design tokens. |
praxium-contrast-comparison.html |
Contrast decision documentation. |
package.json |
Tooling, scripts, dependencies, and Node requirements. |
organization-network-map.html |
Public map structure and CSP. |
network-data.js |
Shared data normalization utilities. |
map.js |
Map rendering, filtering, themes, and Esri tiles. |
map.css |
Responsive map styling. |
electron/README.md |
Electron setup and icon documentation. |
electron/main.js |
Desktop window and IPC hardening. |
electron/icons/icon.svg |
Branded vector application icon. |
docs/PROFESSIONALIZATION_ROADMAP.md |
Architecture and operational roadmap. |
api/publish.js |
Field validation and relationship persistence. |
api/geocode.js |
Address and coordinate validation. |
api/auth.js |
Failed-login rate limiting. |
api/_lib/session.js |
Session-secret validation. |
api/_lib/rateLimit.js |
Failure tracking and reset behavior. |
api/_lib/http.js |
Secure response headers. |
api/_lib/githubGist.js |
API versioning and immutable revisions. |
admin/index.html |
Admin login security metadata. |
admin/dashboard.html |
Admin fields, CSP, and Leaflet integrity metadata. |
admin/admin.js |
Esri preview tiles and expanded fields. |
admin-editor/README.md |
Editor capability documentation. |
admin-editor/index.html |
Expanded organization fields and limits. |
admin-editor/app.js |
Relationship and field handling. |
.nvmrc |
Node major version. |
.gitignore |
Local artifact exclusions. |
.github/workflows/static.yml |
Modular public asset deployment. |
.github/workflows/ci.yml |
Dependency, syntax, and test validation. |
.github/workflows/build-release.yml |
Node 22 release builds. |
.github/dependabot.yml |
Dependency update automation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <meta | ||
| http-equiv="Content-Security-Policy" | ||
| content="default-src 'self'; script-src 'self' https://cdnjs.cloudflare.com; style-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com; img-src 'self' data: blob: https://tile.openstreetmap.org https://cdnjs.cloudflare.com; connect-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self'; upgrade-insecure-requests" |
| <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='6' fill='%233e3d3d'/%3E%3Ctext x='16' y='22' font-family='Arial,sans-serif' font-size='18' font-weight='500' text-anchor='middle' fill='%23c7ac98'%3EP%3C/text%3E%3C/svg%3E"> | ||
|
|
||
| <link rel="preconnect" href="https://cdnjs.cloudflare.com" crossorigin> | ||
| <link rel="preconnect" href="https://tile.openstreetmap.org" crossorigin> |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
This branch's prior commit (
2fd4397) is a large redesign/professionalization pass — split the monolithicorganization-network-map.htmlintomap.css/map.js/network-data.js, added a Praxium design-token stylesheet, hardened the API layer (rate limiting, validation, session handling), added new tests, and refreshed branding throughout.This PR adds one more commit on top that fixes something the redesign broke:
Tile provider was hitting OSM's own servers directly (policy violation → blocked)
Both light and dark rendering pointed straight at
tile.openstreetmap.org. OSM's tile usage policy (osm.wiki/tile_usage_policy) explicitly requires production apps embedded elsewhere (like this one, meant for a Squarespace iframe) to use a third-party provider instead of hotlinking their volunteer-run servers — and the app had in fact been blocked (osm.wiki/blocked), which is what surfaced this.World_Light_Gray_Base/World_Dark_Gray_Base) instead: genuinely keyless, no signup, and gives dark mode a real dark basemap instead of a CSSinvert()filter faking one over (blocked) OSM tiles.img-srcin both the public map page andvercel.json's/adminheaders to match the new host.maxNativeZoom: 16(Esri's native tile ceiling) withmaxZoom: 19so Leaflet upscales rather than showing blank tiles past that.Also restored a regression
The initial map view had reverted to a generic
[20, 0]world center during the redesign, losing an earlier fix that centers it on the Praxium Foundation's actual location (Vancouver, BC) at zoom 5.Test plan
npm run validate(syntax checks + all three test suites) passes unchanged.img-srcupdate.Once merged, this will deploy to GitHub Pages via the existing
static.ymlworkflow and be ready to embed in the Squarespace site.🤖 Generated with Claude Code