Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
430 commits
Select commit Hold shift + click to select a range
9b27944
modified composer.lock
hacklab-dgs May 19, 2026
b3364ee
feat(build): auto-detect Node 24 via nvm fallback in install-and-buil…
hacklab-dgs May 19, 2026
e07442c
refactor(ai): Phase 1 — unified factory, tool registry, REST permissions
hacklab-dgs May 20, 2026
c72f9ab
refactor(ai): Phase 2 — unified prompt builder + georeferencing conve…
hacklab-dgs May 20, 2026
9d9d3ab
refactor(ai): migrate Minilayer to hacklabr/ai-assistant with native MCP
hacklab-dgs May 20, 2026
86c326d
style(bulk): fix WPCS violations in class-bulk-processor.php
hacklab-dgs May 20, 2026
2c04bc3
feat(ai): enable structured output by default with UI disclaimers
hacklab-dgs May 20, 2026
6e493b1
fix(ai): correct namespace reference for AI_REST_Permissions in Minil…
hacklab-dgs May 20, 2026
7f1d68c
Make post ID required for prompt-based minimaps
leopiccionia May 21, 2026
ab4ce26
Hide CPT options from map blocks sidebars
leopiccionia May 21, 2026
f58f2a9
Improve minilayer generation
leopiccionia May 22, 2026
d3ed23a
Implement deduplication on Stories Near You block
leopiccionia May 25, 2026
1338d14
Move Stories Near You towards Newspack Blocks parity
leopiccionia May 25, 2026
ae81b00
Stories Near You use native Gutenberg rendering, fix de-duplication
leopiccionia May 25, 2026
fa36be1
Fix rendering of Stories Near You block in Newspack
leopiccionia May 25, 2026
588b86a
feat: add AI Context Assistant for editorial paragraph generation
hacklab-dgs May 26, 2026
3ec8315
Improve consent handling in Stories Near You block
leopiccionia May 26, 2026
62365a8
feat: add toggle and default prompt reference for Context Assistant s…
hacklab-dgs May 26, 2026
157786c
Move 'Embedded Data' tab from main nav to link inside Settings tab
hacklab-dgs May 26, 2026
a6e2f0a
Configure user location granularity on Stories Near You block
leopiccionia May 26, 2026
207468c
Improve skeleton rendering in Gutenberg
leopiccionia May 26, 2026
db25cfc
Allow inline HTML in context assistant paragraphs
hacklab-dgs May 26, 2026
129b00b
Fix copy button and add HTML entity decoding for context paragraphs
hacklab-dgs May 26, 2026
99ce119
Fix Copy button to preserve rich text (HTML links/formatting)
hacklab-dgs May 26, 2026
bd36e5b
Strengthen execCommand copy with focus and reflow for iframe editors
hacklab-dgs May 26, 2026
517eac8
Reforce grid
leopiccionia May 26, 2026
8f28a0b
Improve chat message sanitization to strip inline JSON schema noise
hacklab-dgs May 26, 2026
e647335
Store clean chat messages separately to avoid JSON schema pollution
hacklab-dgs May 26, 2026
0ff14c2
docs: Update AGENTS.md and architecture docs for Context Assistant ch…
hacklab-dgs May 26, 2026
01a9067
Add retry, content validation, retry/clear buttons, and user badges
hacklab-dgs May 26, 2026
4f8ba28
docs: Update AGENTS.md and architecture docs for new Context Assistan…
hacklab-dgs May 26, 2026
9cfb9a8
Fix retry context, badge position, timestamp, and prevent double insert
hacklab-dgs May 26, 2026
515f6cc
Revamp docs text, add new sections
leopiccionia May 26, 2026
780223a
Fix Markdown
leopiccionia May 26, 2026
c2f16cf
Add some new screenshots to docs
leopiccionia May 26, 2026
ddfa238
Localize more strings
leopiccionia May 26, 2026
891e139
Remove redundant translation hook
leopiccionia May 26, 2026
26f82d8
First interaction now asks clarifying questions before generating par…
hacklab-dgs May 27, 2026
53caf11
Force AI responses in WordPress site language
hacklab-dgs May 27, 2026
ca115e9
Restore screenshots removed by AI
leopiccionia May 27, 2026
3004cdc
Make AI retry more resilient to network errors and timeouts
hacklab-dgs May 27, 2026
88e257b
Strip HTML tags from assistant_message and message fields
hacklab-dgs May 27, 2026
e71f61b
Merge branch 'feature/experimental' into feature/experimental-context…
hacklab-dgs May 27, 2026
b4de749
Add final screenshots to docs, refine dev docs
leopiccionia May 27, 2026
874b943
Merge branch 'feature/experimental' of github.com:InfoAmazonia/jeo-pl…
leopiccionia May 27, 2026
0c0d3fa
Document AI content assistant (WIP)
leopiccionia May 27, 2026
60e47c9
Improve styling of Stories Near You block
leopiccionia May 27, 2026
4a8ad7c
Improve styling of Stories Near You block
leopiccionia May 27, 2026
670442d
Move MkDocs site to path /docs
leopiccionia May 27, 2026
0a8be8a
Add landing-page initial
hacklab-dgs May 27, 2026
0280061
Rebuild landing page to match approved Figma V2
hacklab-dgs May 28, 2026
346e5a1
Add config ngrok in vite config
hacklab-dgs May 28, 2026
2fdb522
Refine landing page: video hero, Figma assets, fonts and consent/terms
hacklab-dgs May 28, 2026
1b07ba5
Wire external links, mobile menu and hero scroll-cue fixes
hacklab-dgs May 29, 2026
15360eb
Add prints to AI assistant docs
leopiccionia May 29, 2026
722f517
Add more documentation about AI usage in JEO
leopiccionia May 29, 2026
dc68d2e
add Google Analytics
hacklab-dgs May 29, 2026
42306b8
change GA id
hacklab-dgs May 29, 2026
7bb5e17
Merge branch 'develop' into feature/experimental
leopiccionia Jun 8, 2026
d9d825b
Merge branch 'develop' into feature/experimental
leopiccionia Jun 8, 2026
cd6bf70
Improve CI
leopiccionia Jun 8, 2026
9788637
Improve CI
leopiccionia Jun 8, 2026
fa418e9
Merge branch 'develop' into feature/experimental
leopiccionia Jun 8, 2026
18f259d
Merge branch 'develop' into feature/experimental
leopiccionia Jun 11, 2026
20886ca
Remove missing files from docs nav
leopiccionia Jun 11, 2026
e8eca82
Run `npm audit fix`
leopiccionia Jun 12, 2026
3c4efdf
Update dependencies and size report
leopiccionia Jun 12, 2026
1014739
Improve i18n strings
leopiccionia Jun 12, 2026
f1d192f
Replace text domain
leopiccionia Jun 12, 2026
429a481
Merge branch 'develop' into feature/experimental
leopiccionia Jun 12, 2026
7b1ac57
Add skeleton to avoid users stuck in skeleton phase
leopiccionia Jun 15, 2026
61709d9
Lint code
leopiccionia Jun 15, 2026
86e62a1
Fix Git merge
leopiccionia Jun 17, 2026
d28c6f2
Fix posts ordering in Stories Near You block
leopiccionia Jun 17, 2026
dc53763
Don't use over-precise locations in Stories Near You block
leopiccionia Jun 17, 2026
48746f8
Improve handling of style layers in editor
leopiccionia Jun 18, 2026
b068e0d
Fix missing import
leopiccionia Jun 18, 2026
bbcdda8
Fix missing import
leopiccionia Jun 18, 2026
7dacd97
feat(ai): add Context Assistant prompt engineering and WP-CLI Docker …
hacklab-dgs Jun 19, 2026
4e12411
feat(context): redesign Context Assistant prompt generator to match P…
hacklab-dgs Jun 19, 2026
13be35a
feat(context): transparent structured-output storage for custom prompt
hacklab-dgs Jun 19, 2026
c0b99fd
docs(context): document structured-output storage for ai_context_prompt
hacklab-dgs Jun 19, 2026
e5b24ba
Improve map and layer previews performance
leopiccionia Jun 19, 2026
9de562b
Map default longitude should be used in preview
leopiccionia Jun 19, 2026
d4c4f45
feat(minimap, stories-near-you): Phase 1-2 validation and RAG improve…
hacklab-dgs Jun 19, 2026
d5b0a41
Merge branch 'feature/experimental' of github.com:InfoAmazonia/jeo-pl…
hacklab-dgs Jun 19, 2026
0ea9505
Allow filtering stories by radius
leopiccionia Jun 19, 2026
e007782
feat(build): add self-contained WordPress ZIP builder
hacklab-dgs Jun 19, 2026
7290df6
feat(minimap): Phase 3 — refinement stability
hacklab-dgs Jun 20, 2026
2e4f583
feat(minimap): Phase 1-2 — UX fixes, RAG improvements and layer reasons
hacklab-dgs Jun 20, 2026
b5956b5
feat(stories-near-you): Phase 4.4-4.6 — ordering, scoring and age filter
hacklab-dgs Jun 20, 2026
61275e7
feat(minimap, layers): Phase 4.1-4.3 — layer themes, proactive admin …
hacklab-dgs Jun 20, 2026
0549f2c
docs(architecture): update minimap and stories-near-you READMEs
hacklab-dgs Jun 20, 2026
5d61a29
feat(build): add self-contained WordPress ZIP builder
hacklab-dgs Jun 20, 2026
c039e5c
feat(minimap, stories-near-you): port Phases 3-4 from feature/experim…
hacklab-dgs Jun 20, 2026
4f6cc35
fix(settings): ensure map default lat/lon are floats in frontend config
hacklab-dgs Jun 20, 2026
be2bc19
feat(editor): port preview architecture from feature/experimental
hacklab-dgs Jun 20, 2026
ddc8b61
fix(minimap,stories,context): address editorial feedback (Carolina/Ju…
hacklab-dgs Jun 21, 2026
7a12f8b
Merge branch 'feature/experimental-correcoes-2026-06-19' into feature…
hacklab-dgs Jun 21, 2026
1cd5173
Add claude context
hacklab-dgs Jun 23, 2026
c617b59
Update some links and provisional HTML <base>
leopiccionia Jun 23, 2026
f34e04a
Fix provisional HTML <base>
leopiccionia Jun 23, 2026
99c07e5
build(scripts): unify release scripts and fix Node 24 check
hacklab-dgs Jun 23, 2026
82de631
build(scripts): preflight required PHP extensions before composer
hacklab-dgs Jun 23, 2026
e971756
Merge branch 'develop' into feature/experimental
leopiccionia Jun 23, 2026
dad0e8a
Tentatively fix merge
leopiccionia Jun 23, 2026
524f2dd
Merge branch 'feature/experimental' of github.com:InfoAmazonia/jeo-pl…
hacklab-dgs Jun 23, 2026
2a0d4ae
Translate remaining strings
leopiccionia Jun 23, 2026
7d2d159
Merge branch 'feature/experimental' of github.com:InfoAmazonia/jeo-pl…
leopiccionia Jun 23, 2026
670ae0a
Add translator comments
leopiccionia Jun 23, 2026
9e3431f
Chore: Update PHP dependencies
leopiccionia Jun 23, 2026
6a5f713
Make plugin check action fail on errors
leopiccionia Jun 23, 2026
283d39d
Merge branch 'develop' into feature/experimental
leopiccionia Jun 25, 2026
22bab1c
Update dependencies; tentatively fix merge
leopiccionia Jun 25, 2026
b18cf4a
Fix unit tests
leopiccionia Jun 25, 2026
6d31c83
Tentatively fix CI
leopiccionia Jun 25, 2026
5673a1e
feat: editorial refinements for minimap, stories-near-you and context…
hacklab-dgs Jun 25, 2026
13680cb
fix(minimap): resolve regressão de loop infinito e requisições não di…
hacklab-dgs Jun 25, 2026
615c12c
[Merge branch 'feature/experimental' of github.com:InfoAmazonia/jeo-p…
hacklab-dgs Jun 25, 2026
e491f8a
docs: adiciona guia de apresentação das correções v3.6.5 para o cliente
hacklab-dgs Jun 25, 2026
c09bb47
Fix `mapbox://` tileset IDs handling
leopiccionia Jun 26, 2026
a1d55e2
Improve error handling in Stories Near You block
leopiccionia Jun 26, 2026
b7845c4
Add geolocation accuracy fallback in Stories Near You block
leopiccionia Jun 26, 2026
45b3a09
Disable content filters for agents
leopiccionia Jun 26, 2026
11814e0
Improve history preservation in AI context generation
leopiccionia Jul 2, 2026
f4e8a2b
Merge branch 'develop' into feature/experimental
leopiccionia Jul 7, 2026
04fc629
Chore: Update size limits
leopiccionia Jul 7, 2026
fc51bf7
Merge branch 'feature/experimental' into feature/experimental-fixes
leopiccionia Jul 7, 2026
1887dbc
Chore: Lint
leopiccionia Jul 7, 2026
fa0e4d3
Update plugin check action
leopiccionia Jul 7, 2026
19da390
Update architecture docs
leopiccionia Jul 7, 2026
8529114
Add style composition to minimap
leopiccionia Jul 7, 2026
a490cad
Update plugin check action
leopiccionia Jul 7, 2026
83ccf09
Improve error messages in Stories Near You block
leopiccionia Jul 13, 2026
6caf629
Merge branch 'feature/experimental' into feature/experimental-fixes
leopiccionia Jul 13, 2026
babaa57
Fix preview keys
leopiccionia Jul 14, 2026
89b5c70
Fix missing references
leopiccionia Jul 14, 2026
7b00bd3
Remove unused opacity control
leopiccionia Jul 14, 2026
b6fb5b7
Add custom access tokens to more layer types
leopiccionia Jul 14, 2026
b4381ca
Use coordinates of geocoded points, if available
leopiccionia Jul 14, 2026
331596e
Fix manual geocoding
leopiccionia Jul 14, 2026
7422540
Fix missing references
leopiccionia Jul 14, 2026
68bc76b
Fix style composition in frontend
leopiccionia Jul 14, 2026
d01b94a
Keep inline HTML in suggested paragraphs
leopiccionia Jul 14, 2026
19c16f3
Stories Near You: block pointer events in editor
leopiccionia Jul 14, 2026
d25931a
Chore: Refresh translations
leopiccionia Jul 14, 2026
0a0c12b
Allow passing mapStyle
leopiccionia Jul 15, 2026
787858a
Improve handling of private keys during style composition
leopiccionia Jul 15, 2026
5f5046e
Chore: Refresh translations
leopiccionia Jul 15, 2026
ede7d99
Minimap should preserve manual layers
leopiccionia Jul 15, 2026
bfee1c0
Add docs
leopiccionia Jul 15, 2026
77878b0
Chore: Refresh translations
leopiccionia Jul 15, 2026
b33d29e
Adjust link backing in context generation
leopiccionia Jul 16, 2026
4fc4fd4
Fix merges
leopiccionia Jul 16, 2026
de0406f
Chore: Fix size thresholds
leopiccionia Jul 17, 2026
90390dc
Fix display of fixed layers on minimap
leopiccionia Jul 17, 2026
98df918
Add misssing translations
leopiccionia Jul 17, 2026
9947007
Fix manual geolocation validation
leopiccionia Jul 17, 2026
0186b7b
Improve preservation of chat on AI failure
leopiccionia Jul 17, 2026
5b1509a
Disallow self-referencing in context generation
leopiccionia Jul 17, 2026
1c07723
Disallow self-referencing in context generation
leopiccionia Jul 17, 2026
0f5e2a5
Chore: Refresh translations
leopiccionia Jul 17, 2026
0e44c1d
Fix Nominatim geocoding
leopiccionia Jul 20, 2026
43b2a8a
Fix nearby posts query for posts with many geolocated points
leopiccionia Jul 20, 2026
2401b00
Add recency tie-break to context generation
leopiccionia Jul 23, 2026
f704588
Merge branch 'develop' into feature/experimental
leopiccionia Jul 23, 2026
c367d12
Chore: Audit fix
leopiccionia Jul 23, 2026
a4330be
Minimap should return raster layers behind vector ones
leopiccionia Aug 31, 2026
71f231a
Refactor `fetch_mapbox_style` as helper function, with support to tra…
leopiccionia Aug 31, 2026
f7faea7
Allow restoring previous minimap version
leopiccionia Sep 1, 2026
436aea4
Add deterministic boundary layer generation for minimap
leopiccionia Sep 1, 2026
e83df12
feat(ai): deterministic minilayer classifier, remove DevKit MCP, add …
leopiccionia Sep 1, 2026
13321fe
feat(ai): add WP-CLI commands and classifier logging for minilayer/bo…
leopiccionia Sep 1, 2026
916cfc8
fix(cli): add positional arg docs and hyphen aliases for WP-CLI commands
leopiccionia Sep 1, 2026
545a3a3
fix(ai): correct IBGE boundary resolution and normalize classifier pa…
leopiccionia Sep 1, 2026
b66397c
docs(readme): update third-party services disclosures
leopiccionia Sep 1, 2026
b78921e
feat(ai): cache IBGE/OSM lookups and add Overpass request-args filter
leopiccionia Sep 1, 2026
b659ddf
ci: bump browserslist from 4.28.2 to 4.28.8
dependabot[bot] Sep 1, 2026
026af80
ci: bump postcss from 8.5.15 to 8.5.26
dependabot[bot] Sep 1, 2026
6ba538e
ci: bump squizlabs/php_codesniffer from 3.13.5 to 3.13.6
dependabot[bot] Sep 1, 2026
c828c9a
ci: bump ip-address from 10.2.0 to 10.7.0
dependabot[bot] Sep 1, 2026
9f79ea1
ci: bump brace-expansion
dependabot[bot] Sep 1, 2026
cd2d15b
Merge branch 'master' into develop
leopiccionia Sep 1, 2026
70085b6
Merge branch 'develop' into feature/experimental
leopiccionia Sep 1, 2026
7a23af3
Merge branch 'feature/experimental' into feature/experimental-minilayers
leopiccionia Sep 1, 2026
90d4b6d
Avoid preview warning
leopiccionia Sep 2, 2026
f64b76a
Show more previous suggestions
leopiccionia Sep 2, 2026
d89bd9a
Add priority for internal links over external ones
leopiccionia Sep 2, 2026
fd5383b
Chore: Reload translations
leopiccionia Sep 2, 2026
a874eeb
Chore: Update size report
leopiccionia Sep 2, 2026
fd9155a
Fix layer validation
leopiccionia Sep 3, 2026
577ff49
Fix Funai query, update docs
leopiccionia Sep 3, 2026
ecc344b
Add secret Mapbox key field, for creating AI minilayers
leopiccionia Sep 3, 2026
0203180
Chore: Update dependencies
leopiccionia Sep 3, 2026
9972611
Chore: Fix Jest
leopiccionia Sep 3, 2026
3609687
New GeoJSON layer type
leopiccionia Sep 3, 2026
5eee136
Merge; fix GeoJSON styling
leopiccionia Sep 4, 2026
6e32aba
Add generic Style JSON layer-type; change default dark layer
leopiccionia Sep 4, 2026
e13b981
Normalize chat history in case of AI error
leopiccionia Sep 4, 2026
f7fcf06
Fix attribution rendering
leopiccionia Sep 4, 2026
88505bf
Chore: Fix i18n linting
leopiccionia Sep 4, 2026
f2b61b6
Add pins to minimap previews
leopiccionia Sep 8, 2026
41c88b8
Fix escaping of HTML entities
leopiccionia Sep 8, 2026
584a2e3
Improve responsiveness of style editor
leopiccionia Sep 8, 2026
20127e4
Improve styling of layers sidebar
leopiccionia Sep 9, 2026
5379956
Improve layer metadata generation for minilayers
leopiccionia Sep 9, 2026
97ea17f
Easier-to-understand minimap layers choices
leopiccionia Sep 9, 2026
a83dfe2
Chore: Fix i18n linting
leopiccionia Sep 9, 2026
a206954
Update docs
leopiccionia Sep 9, 2026
21c85e1
Fix pointer events in Stories Near You editor
leopiccionia Sep 15, 2026
ea674a9
Don't enqueue map assets just because Stories Near You is present
leopiccionia Sep 15, 2026
2f373fa
Improve combination of multiple themes
leopiccionia Sep 15, 2026
f6b710c
Improve minilayer-OSM integration
leopiccionia Sep 15, 2026
853a806
Show Gutenberg AI features only if provider is configured
leopiccionia Sep 15, 2026
b23b277
Fix invalid LatLng objects
leopiccionia Sep 15, 2026
9d30927
Fix chat history submission
leopiccionia Sep 16, 2026
d4c066c
Remove outdated files
leopiccionia Sep 16, 2026
8f87c51
Redesign landing page to JEO Maps (v3) — issue #669
julialaurentino Sep 18, 2026
884c87e
Landing polish: official layer photos, glass effect, mobile and foote…
julialaurentino Sep 22, 2026
55f6de1
Allow easier customization of JEO templates
leopiccionia Sep 23, 2026
416fb7f
Fix title output in maps single
leopiccionia Sep 23, 2026
9bde137
Normalize comma-separated lists as array, for compatibility
leopiccionia Sep 24, 2026
2f09fad
Chore: Update architecture docs
leopiccionia Sep 24, 2026
cc52077
Add MapLibre GL support for some legacy MapboxGL expressions
leopiccionia Sep 24, 2026
6761e55
Generate l10n PHP files
leopiccionia Sep 24, 2026
6c0ba5f
Fix regression in styles conversion
leopiccionia Sep 24, 2026
f731d5c
docs: migrate documentation site from MkDocs to VitePress
leopiccionia Sep 30, 2026
4054fe8
Merge remote-tracking branch 'origin/feat/landing-redesign' into feat…
leopiccionia Sep 30, 2026
b254c7e
build: single command builds the complete site (landing + docs)
leopiccionia Sep 30, 2026
ea75bbe
refactor: move landing source from site-novo/www/ to landing-page/
leopiccionia Sep 30, 2026
a092f61
docs: sync generated site
leopiccionia Sep 30, 2026
ce5a460
build: add preview:site script (serves site/ at localhost:4174)
leopiccionia Sep 30, 2026
26a62a8
Chore: Remove wrongly commited ZIP file
leopiccionia Sep 30, 2026
a6fe62b
docs: redirect /docs/ to the site root instead of a hardcoded domain
leopiccionia Sep 30, 2026
aade06d
docs: refresh navbar branding and fix entry links
leopiccionia Sep 30, 2026
d8712ed
landing: use the SVG wordmark in the header
leopiccionia Sep 30, 2026
e2af1ed
build: add dev:site for integrated local preview
leopiccionia Sep 30, 2026
a9be5e6
docs: sync generated site
leopiccionia Sep 30, 2026
b1055c2
Compress demo video
leopiccionia Sep 30, 2026
c79c453
ci: publish the site to gh-pages instead of committing site/
leopiccionia Sep 30, 2026
5bf86c4
Restore old index.md
leopiccionia Sep 30, 2026
43fa384
Revert link rewrites
leopiccionia Sep 30, 2026
8bbbb40
Use 4.0.0-beta.1 as working version
leopiccionia Oct 2, 2026
cd5a559
Merge branch 'feature/experimental' into feature/new-docs
leopiccionia Oct 2, 2026
ce85f70
Remove dead code
leopiccionia Oct 2, 2026
9a28017
Improve docs about site build
leopiccionia Oct 2, 2026
af9818e
Improve handling of interpolations and other legacy MapboxGL features
leopiccionia Oct 7, 2026
310cf9d
Adjusts responsiveness and hides the form on the landing page
julialaurentino Oct 21, 2026
576d108
Merge branch 'feat/landing-redesign' into feature/experimental
julialaurentino Oct 21, 2026
7eb3983
Merge branch 'feature/experimental' into feature/new-docs
leopiccionia Oct 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
173 changes: 173 additions & 0 deletions .architecture/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
# JEO Plugin — Architecture for AI Agents

> **Navigation index** — consult the files below based on your current task.

## Quick Reference

| Task | File |
|------|------|
| Create/modify Gutenberg blocks | [`blocks/README.md`](blocks/README.md) |
| Work with maps (CPT `map`) | [`maps/README.md`](maps/README.md) |
| Composed Mapbox styles (style composer) | [`composed-styles/README.md`](composed-styles/README.md) |
| Work with layers | [`layers/README.md`](layers/README.md) |
| Geocoding, post geolocation | [`geocoding/README.md`](geocoding/README.md) |
| Storymap (scrollytelling) | [`storymap/README.md`](storymap/README.md) |
| Discovery feature | [`discovery/README.md`](discovery/README.md) |
| Stories Near You block | [`stories-near-you/README.md`](stories-near-you/README.md) |
| AI integration (georef, RAG, bulk, minilayer) | [`ai/README.md`](ai/README.md) |
| Minilayer (AI-generated layers) | [`minilayer/README.md`](minilayer/README.md) |
| AI Context (editorial suggestions) | [`context/README.md`](context/README.md) |
| Minimap (AI-assisted map block) | [`minimap/README.md`](minimap/README.md) |
| REST API endpoints | [`rest-api/README.md`](rest-api/README.md) |
| Settings, admin pages | [`settings/README.md`](settings/README.md) |
| Frontend: MapLibre/Mapbox, React, iframe | [`frontend/README.md`](frontend/README.md) |
| Templates PHP/EJS, shortcodes, embeds | [`templates/README.md`](templates/README.md) |
| Build (webpack), scripts, CI | [`build/README.md`](build/README.md) |
| Deploy to WordPress.org | [`deployment/README.md`](deployment/README.md) |

## Project Overview

```
jeo-plugin/
├── src/ # WordPress plugin (deployed as-is)
│ ├── jeo.php # Main entry point (PHP 8.2+)
│ ├── includes/ # Backend PHP
│ │ ├── class-jeo.php # Central orchestrator (Singleton)
│ │ ├── loaders.php # PSR-0 autoloader + global functions
│ │ ├── maps/ # CPT `map`
│ │ ├── layers/ # CPT `map-layer`
│ │ ├── layer-types/ # Layer types + JS renderers
│ │ ├── legend-types/ # Legend types + JS renderers
│ │ ├── geocode/ # Geocoders (Nominatim, Mapbox)
│ │ ├── storymap/ # CPT `storymap`
│ │ ├── ai/ # AI: georef, RAG, bulk, providers
│ │ ├── settings/ # Settings page
│ │ ├── sidebars/ # Gutenberg sidebars (assets)
│ │ ├── menu/ # Admin menu
│ │ ├── admin/ # Dashboard + Welcome pages
│ │ ├── cli/ # WP-CLI commands
│ │ └── traits/ # Singleton, Rest_Validate_Meta
│ ├── js/
│ │ ├── src/ # JS/React source
│ │ │ ├── lib/ # MapLibre/Mapbox abstraction
│ │ │ ├── jeo-map/ # Frontend map rendering
│ │ │ ├── map-blocks/ # Gutenberg blocks
│ │ │ ├── layers-sidebar/ # Layer editor sidebar
│ │ │ ├── maps-sidebar/ # Map editor sidebar
│ │ │ ├── posts-sidebar/ # Geolocation sidebar
│ │ │ ├── posts-selector/ # Related posts selector
│ │ │ ├── jeo-storymap/ # Storymap display
│ │ │ ├── discovery/ # Discovery app
│ │ │ ├── icons/ # SVG/PNG assets
│ │ │ └── shared/ # Hooks, utils, shared components (incl. composed-style-*.js)
│ │ └── build/ # Build output (webpack)
│ ├── css/ # SCSS
│ ├── templates/ # PHP + EJS templates
│ └── languages/ # .pot / translations
├── scripts/ # Build and CI scripts
├── docs/ # Documentation (VitePress → site/docs/)
├── landing-page/ # Landing page (React + Vite → site/)
└── .github/workflows/ # CI/CD
```

## Stack

| Layer | Technology |
|-------|-----------|
| Backend | PHP 8.2+, WordPress 6.x |
| Frontend | React 18, WordPress Element, Gutenberg Data |
| Maps | MapLibre GL JS (default) / Mapbox GL JS (optional) |
| Build | Webpack 5, @wordpress/scripts |
| Lint | PHPCS (WPCS), ESLint (via wp-scripts) |
| Tests | Jest (JS), PHPUnit (PHP) |
| AI | NeuronAI (10 providers: Gemini, OpenAI, DeepSeek, etc.) |

## Key Conventions

- **PHP**: PSR-0 autoloading (`Jeo\ClassName` → `class-class-name.php`), WPCS coding standards
- **Singleton**: All main classes use `Jeo\Singleton` trait
- **Global accessors**: `jeo()`, `jeo_maps()`, `jeo_layers()`, `jeo_settings()`, etc.
- **Meta REST**: `_related_point` for geolocation, registered with full REST schema
- **Iframe compat**: Extensive patching for Block API v3 (Gutenberg iframe editor)
- **Composed Mapbox styles**: `mapbox`-type layers are merged into a single cached Mapbox Style JSON by `Map_Style_Composer`, rendered natively by MapLibre (legacy Static Tiles overlay removed in 3.1.0). See [`composed-styles/README.md`](composed-styles/README.md).
- **JS entries**: Each webpack entry point is independent; `dependOn` for shared chunks

## Architecture Diagram (C4 Container)

```mermaid
graph TB
User[User/Editor] --> WP[WordPress]
WP --> JEO[JEO Plugin PHP]
JEO --> DB[(WordPress DB)]
JEO --> REST[REST API /jeo/v1/]
JEO --> MSC[Map Style Composer]
MSC --> |cached style.json/manifest.json| CACHE[(Uploads Cache)]
REST --> GB[Gutenberg Blocks/Sidebars]
GB --> ML[MapLibre GL / Mapbox GL]
ML --> MSC
JEO --> AI[AI Providers]
JEO --> GEO[Geocoding APIs]
JEO --> MCP[Mapbox DevKit MCP]
AI --> RAG[RAG Vector Store]
ML --> Tiles[Tile Servers]
MSC --> MBX[Mapbox Styles API]

subgraph Frontend JS
GB
ML
end

subgraph External APIs
AI
GEO
Tiles
MBX
end
```

## Data Model

```mermaid
erDiagram
MAP ||--o{ MAP_LAYER : "has layers"
MAP ||--o{ POST : "related posts"
POST ||--o{ RELATED_POINT : "geolocated at"
STORYMAP ||--o{ CHAPTER : "has chapters"
STORYMAP ||--o{ MAP_LAYER : "chapter layers"
MAP_LAYER ||--|| LAYER_TYPE : "type of"
MAP_LAYER ||--|| LEGEND_TYPE : "displayed as"

MAP {
int ID PK
float center_lat
float center_lon
int initial_zoom
json layers
json pan_limits
json related_posts
string composed_style_hash
json composed_style_warnings
}
MAP_LAYER {
int ID PK
string type
json layer_type_options
string source_url
string legend_type
json legend_type_options
}
POST {
int ID PK
}
RELATED_POINT {
float lat
float lon
string city
string region
string country
int relevance
}
STORYMAP {
int ID PK
}
```
Loading
Loading