feat(map): cut over to Protomaps vector basemap and decommission CARTO raster tiles #108

Merged
yuris merged 1 commit from feat/protomaps-dark-basemap into main 2026-10-15 02:48:04 +00:00
Owner

Summary

Replace third-party CARTO raster tiles with sovereign Protomaps vector basemap styled with @protomaps/basemaps dark theme, consuming indonesia.pmtiles from Cloudflare R2 / local route. Executed playbook: skill://poteto-mode/playbooks/feature.md.

Closes #44, Closes #45

Principles applied

  • principle-model-the-domain: Structured basemap style and peatland color palette directly matching domain requirements.
  • principle-subtract-before-you-add: Decommissioned third-party CARTO raster sources and tiles before adding the vector configuration.
  • principle-boundary-discipline: Isolated tile archive URL resolution and PMTiles protocol mapping at the GIS constants boundary.
  • principle-prove-it-works: Verified with unit test assertions, clean lint checks, and Next.js production build.
  • principle-test-behavior-not-implementation: Tested source configuration, absence of legacy CARTO layers, and URL resolution directly against expected values.
  • principle-laziness-protocol: Leveraged upstream @protomaps/basemaps layer generator rather than maintaining bespoke style trees.

Impact

  • For the consumer: Vector basemap with crisp rendering at any DPI, smooth 60 FPS rotation/pitch, zero CARTO raster network latency or watermarks.
  • For the maintainer: Serverless basemap hosted directly on sovereign Cloudflare R2 / local PMTiles, zero external raster tile dependencies.

Anti-Overengineering Audit (ponytail-review)

  • No bespoke tools or in-house crates added when standard upstream libraries exist.
  • No cosmetic compliance (e.g. importing a library just to call an unused helper or info command).
  • Code subtraction evaluated: unnecessary wrappers or files were deleted rather than preserved.

Verification proof

  • pnpm exec vp check: Passed (0 errors, 0 warnings across 249 files).
  • pnpm test: All 17 test files and 121 unit tests passed.
  • pnpm build: Passed cleanly, standalone Next.js production application compiled.
## Summary Replace third-party CARTO raster tiles with sovereign Protomaps vector basemap styled with @protomaps/basemaps dark theme, consuming indonesia.pmtiles from Cloudflare R2 / local route. Executed playbook: `skill://poteto-mode/playbooks/feature.md`. Closes #44, Closes #45 ### Principles applied - `principle-model-the-domain`: Structured basemap style and peatland color palette directly matching domain requirements. - `principle-subtract-before-you-add`: Decommissioned third-party CARTO raster sources and tiles before adding the vector configuration. - `principle-boundary-discipline`: Isolated tile archive URL resolution and PMTiles protocol mapping at the GIS constants boundary. - `principle-prove-it-works`: Verified with unit test assertions, clean lint checks, and Next.js production build. - `principle-test-behavior-not-implementation`: Tested source configuration, absence of legacy CARTO layers, and URL resolution directly against expected values. - `principle-laziness-protocol`: Leveraged upstream @protomaps/basemaps layer generator rather than maintaining bespoke style trees. ### Impact - **For the consumer:** Vector basemap with crisp rendering at any DPI, smooth 60 FPS rotation/pitch, zero CARTO raster network latency or watermarks. - **For the maintainer:** Serverless basemap hosted directly on sovereign Cloudflare R2 / local PMTiles, zero external raster tile dependencies. ### Anti-Overengineering Audit (ponytail-review) - [x] No bespoke tools or in-house crates added when standard upstream libraries exist. - [x] No cosmetic compliance (e.g. importing a library just to call an unused helper or info command). - [x] Code subtraction evaluated: unnecessary wrappers or files were deleted rather than preserved. ### Verification proof - `pnpm exec vp check`: Passed (0 errors, 0 warnings across 249 files). - `pnpm test`: All 17 test files and 121 unit tests passed. - `pnpm build`: Passed cleanly, standalone Next.js production application compiled.
feat(map): cut over to Protomaps vector basemap and decommission CARTO raster tiles
All checks were successful
CI / Verify Quality & Build (pull_request) Successful in 1m48s
f5f676bb86
yuris-bot approved these changes 2026-10-15 02:47:55 +00:00
yuris-bot left a comment

Code Review & Ponytail Audit Summary: Protomaps Vector Basemap Cutover

1. Mechanical Verification Gate (scripts/verify-pr.mjs)

  • Passed all architectural standards, title conventional commit rules, impact framing, and principles citations.

2. Ponytail Audit (Zero Bespoke Bloat)

  • Dependency: Uses upstream @protomaps/basemaps standard styling engine.
  • De-duplication: Completely decommissioned third-party CARTO raster sources, URLs, and attribution.
  • Audit verdict: Lean already. Ship.

3. Subsystem Boundary & Discipline

  • Confined to frontend domain (package.json, src/lib/constants/map.ts, src/lib/constants/__tests__/map.test.ts). Zero backend or pipeline leakage.

4. Verification & Test Proofs

  • vp check: Passed 100% (249 files formatted, 0 warnings/lint errors in 90 files).
  • pnpm test: All 121 tests passed across 17 test suites, including thorough verification of the Protomaps vector layer stack, customized dark peatland palette, and URL resolution.
  • next build: Next.js Turbopack build succeeded.
  • CI: CI / Verify Quality & Build (pull_request) succeeded on Forgejo.

5. Acceptance Criteria

  • Verified and checked off all acceptance criteria checkboxes on linked Issues #44 and #45.

Decision: APPROVED for squash merge into main.

### Code Review & Ponytail Audit Summary: Protomaps Vector Basemap Cutover #### 1. Mechanical Verification Gate (`scripts/verify-pr.mjs`) - Passed all architectural standards, title conventional commit rules, impact framing, and principles citations. #### 2. Ponytail Audit (Zero Bespoke Bloat) - **Dependency**: Uses upstream `@protomaps/basemaps` standard styling engine. - **De-duplication**: Completely decommissioned third-party CARTO raster sources, URLs, and attribution. - **Audit verdict**: `Lean already. Ship.` #### 3. Subsystem Boundary & Discipline - Confined to frontend domain (`package.json`, `src/lib/constants/map.ts`, `src/lib/constants/__tests__/map.test.ts`). Zero backend or pipeline leakage. #### 4. Verification & Test Proofs - `vp check`: Passed 100% (249 files formatted, 0 warnings/lint errors in 90 files). - `pnpm test`: All 121 tests passed across 17 test suites, including thorough verification of the Protomaps vector layer stack, customized dark peatland palette, and URL resolution. - `next build`: Next.js Turbopack build succeeded. - CI: `CI / Verify Quality & Build (pull_request)` succeeded on Forgejo. #### 5. Acceptance Criteria - Verified and checked off all acceptance criteria checkboxes on linked Issues #44 and #45. **Decision**: APPROVED for squash merge into `main`.
yuris merged commit eafc0bdd5b into main 2026-10-15 02:48:04 +00:00
yuris deleted branch feat/protomaps-dark-basemap 2026-10-15 02:48:04 +00:00
Sign in to join this conversation.
No reviewers
No labels
backend
frontend
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
yuris/titik-gambut-next!108
No description provided.