# divelarde/palagunitaan architecture

> Architecture diagram of the GitHub repository divelarde/palagunitaan, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/divelarde/palagunitaan
- Repository: https://github.com/divelarde/palagunitaan

## Overview

Palagunitaan is a heritage-contribution and discovery platform with role-based review and administration. The principal workflow is contributor submission, validation, and publication, followed by public browsing, map, and timeline discovery. The graph also includes authentication, editorial history, and documented blog/highlight/admin branches. Evidence is limited to the supplied excerpts and SOURCE INDEX; unsampled subsystems are represented at their existing directory paths, without speculative internal call links.

Main entry points: [`client/src/App.js`](https://github.com/divelarde/palagunitaan/blob/main/client/src/App.js) (Application router), [`client/src/api/axios.js`](https://github.com/divelarde/palagunitaan/blob/main/client/src/api/axios.js) (HTTP client), [`server/services/reviewService.js`](https://github.com/divelarde/palagunitaan/blob/main/server/services/reviewService.js) (Review workflow), [`server/models/heritageEntryModel.js`](https://github.com/divelarde/palagunitaan/blob/main/server/models/heritageEntryModel.js) (Heritage entries)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Application router<br/>[App.js]"]
  node_http["HTTP client<br/>[axios.js]"]
end

subgraph group_identity["Identity and access"]
  node_authui["Client auth state<br/>[AuthContext.js]"]
  node_authapi["Auth routes<br/>[authRoutes.js]"]
  node_authlogic["Authentication service<br/>[authService.js]"]
  node_users[("User records<br/>[userModel.js]")]
end

subgraph group_heritage["Heritage workflow"]
  node_submission["Entry submission<br/>[SubmitEntryPage.js]"]
  node_entryapi["Entry API"]
  node_entrycontroller["Entry controller"]
  node_entryservice["Entry processing"]
  node_entries[("Heritage entries")]
  node_validator["Review dashboard"]
  node_reviewapi["Review routes<br/>[reviewRoutes.js]"]
  node_reviewcontroller["Review controller"]
  node_reviewservice["Review workflow<br/>[reviewService.js]"]
  node_editorial[("Editorial history")]
end

subgraph group_discovery["Discovery and media"]
  node_publicdiscovery["Browse and detail"]
  node_map["Map exploration<br/>[MapPage.js]"]
  node_timeline["Timeline view<br/>[TimelinePage.js]"]
  node_blog["Blog publishing"]
  node_highlights["Featured highlights"]
end

subgraph group_operations["Administration"]
  node_adminui["Admin dashboard"]
  node_adminroutes["Admin routes<br/>[adminRoutes.js]"]
  node_admincontent["Content management"]
  node_notifications["Notifications"]
  node_database[("MySQL pool<br/>[db.js]")]
end

node_visitor(("Platform user"))

node_visitor -->|"uses"| node_app
node_app -->|"provides auth"| node_authui
node_app -->|"routes to"| node_submission
node_app -->|"routes to"| node_validator
node_app -->|"routes to"| node_adminui
node_app -->|"routes to"| node_publicdiscovery
node_authui -->|"uses"| node_http
node_app -.->|"uses services"| node_http
node_authapi -->|"delegates"| node_authlogic
node_authlogic -->|"reads and writes"| node_users
node_submission -.->|"submits via"| node_entryapi
node_entryapi -->|"routes to"| node_entrycontroller
node_entrycontroller -->|"delegates"| node_entryservice
node_entryservice -->|"reads and writes"| node_entries
node_entryservice -->|"persists entry"| node_entries
node_validator -.->|"reviews via"| node_reviewapi
node_reviewapi -->|"routes to"| node_reviewcontroller
node_reviewcontroller -->|"delegates"| node_reviewservice
node_reviewservice -->|"updates status"| node_entries
node_reviewcontroller -->|"reads history"| node_editorial
node_reviewservice -->|"records action"| node_editorial
node_reviewservice -->|"notifies decision"| node_notifications
node_entries -->|"queries"| node_database
node_editorial -->|"queries"| node_database
node_users -->|"queries"| node_database
node_publicdiscovery -.->|"fetches content"| node_http
node_map -.->|"fetches map data"| node_http
node_timeline -.->|"fetches timeline"| node_http
node_app -->|"loads blog service"| node_blog
node_app -->|"loads highlight service"| node_highlights
node_adminui -.->|"uses admin API"| node_adminroutes
node_adminroutes -->|"mounts content routes"| node_admincontent
node_admincontent -.->|"queries content"| node_database
node_app -->|"mounts API"| node_adminroutes

click node_app "https://github.com/divelarde/palagunitaan/blob/main/client/src/App.js"
click node_authui "https://github.com/divelarde/palagunitaan/blob/main/client/src/context/AuthContext.js"
click node_http "https://github.com/divelarde/palagunitaan/blob/main/client/src/api/axios.js"
click node_authapi "https://github.com/divelarde/palagunitaan/blob/main/server/routes/authRoutes.js"
click node_authlogic "https://github.com/divelarde/palagunitaan/blob/main/server/services/authService.js"
click node_users "https://github.com/divelarde/palagunitaan/blob/main/server/models/userModel.js"
click node_submission "https://github.com/divelarde/palagunitaan/blob/main/client/src/pages/SubmitEntryPage.js"
click node_entryapi "https://github.com/divelarde/palagunitaan/blob/main/server/routes/heritageEntryRoutes.js"
click node_entrycontroller "https://github.com/divelarde/palagunitaan/blob/main/server/controllers/heritageEntryController.js"
click node_entryservice "https://github.com/divelarde/palagunitaan/blob/main/server/services/heritageEntryService.js"
click node_entries "https://github.com/divelarde/palagunitaan/blob/main/server/models/heritageEntryModel.js"
click node_validator "https://github.com/divelarde/palagunitaan/blob/main/client/src/pages/ValidatorDashboardPage.js"
click node_reviewapi "https://github.com/divelarde/palagunitaan/blob/main/server/routes/reviewRoutes.js"
click node_reviewcontroller "https://github.com/divelarde/palagunitaan/blob/main/server/controllers/reviewController.js"
click node_reviewservice "https://github.com/divelarde/palagunitaan/blob/main/server/services/reviewService.js"
click node_editorial "https://github.com/divelarde/palagunitaan/blob/main/server/models/editorialActionModel.js"
click node_publicdiscovery "https://github.com/divelarde/palagunitaan/tree/main/client/src/pages"
click node_map "https://github.com/divelarde/palagunitaan/blob/main/client/src/pages/MapPage.js"
click node_timeline "https://github.com/divelarde/palagunitaan/blob/main/client/src/pages/TimelinePage.js"
click node_blog "https://github.com/divelarde/palagunitaan/blob/main/server/controllers/blogPostController.js"
click node_highlights "https://github.com/divelarde/palagunitaan/blob/main/server/controllers/highlightController.js"
click node_adminui "https://github.com/divelarde/palagunitaan/blob/main/client/src/pages/AdminDashboardPage.js"
click node_adminroutes "https://github.com/divelarde/palagunitaan/blob/main/server/routes/adminRoutes.js"
click node_admincontent "https://github.com/divelarde/palagunitaan/blob/main/server/controllers/adminContentController.js"
click node_notifications "https://github.com/divelarde/palagunitaan/blob/main/server/services/notificationService.js"
click node_database "https://github.com/divelarde/palagunitaan/blob/main/server/config/db.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_http,node_visitor toneBlue
class node_authui,node_authapi,node_authlogic,node_users toneAmber
class node_submission,node_entryapi,node_entrycontroller,node_entryservice,node_entries,node_validator,node_reviewapi,node_reviewcontroller,node_reviewservice,node_editorial toneMint
class node_publicdiscovery,node_map,node_timeline,node_blog,node_highlights toneRose
class node_adminui,node_adminroutes,node_admincontent,node_notifications,node_database toneIndigo
```

## Components

### Web client

- [Application router](https://github.com/divelarde/palagunitaan/blob/main/client/src/App.js): `client/src/App.js`
- [HTTP client](https://github.com/divelarde/palagunitaan/blob/main/client/src/api/axios.js): `client/src/api/axios.js`

### Identity and access

- [Client auth state](https://github.com/divelarde/palagunitaan/blob/main/client/src/context/AuthContext.js): `client/src/context/AuthContext.js`
- [Auth routes](https://github.com/divelarde/palagunitaan/blob/main/server/routes/authRoutes.js): `server/routes/authRoutes.js`
- [Authentication service](https://github.com/divelarde/palagunitaan/blob/main/server/services/authService.js): `server/services/authService.js`
- [User records](https://github.com/divelarde/palagunitaan/blob/main/server/models/userModel.js): `server/models/userModel.js`

### Heritage workflow

- [Entry submission](https://github.com/divelarde/palagunitaan/blob/main/client/src/pages/SubmitEntryPage.js): `client/src/pages/SubmitEntryPage.js`
- [Entry API](https://github.com/divelarde/palagunitaan/blob/main/server/routes/heritageEntryRoutes.js): `server/routes/heritageEntryRoutes.js`
- [Entry controller](https://github.com/divelarde/palagunitaan/blob/main/server/controllers/heritageEntryController.js): `server/controllers/heritageEntryController.js`
- [Entry processing](https://github.com/divelarde/palagunitaan/blob/main/server/services/heritageEntryService.js): `server/services/heritageEntryService.js`
- [Heritage entries](https://github.com/divelarde/palagunitaan/blob/main/server/models/heritageEntryModel.js): `server/models/heritageEntryModel.js`
- [Review dashboard](https://github.com/divelarde/palagunitaan/blob/main/client/src/pages/ValidatorDashboardPage.js): `client/src/pages/ValidatorDashboardPage.js`
- [Review routes](https://github.com/divelarde/palagunitaan/blob/main/server/routes/reviewRoutes.js): `server/routes/reviewRoutes.js`
- [Review controller](https://github.com/divelarde/palagunitaan/blob/main/server/controllers/reviewController.js): `server/controllers/reviewController.js`
- [Review workflow](https://github.com/divelarde/palagunitaan/blob/main/server/services/reviewService.js): `server/services/reviewService.js`
- [Editorial history](https://github.com/divelarde/palagunitaan/blob/main/server/models/editorialActionModel.js): `server/models/editorialActionModel.js`

### Discovery and media

- [Browse and detail](https://github.com/divelarde/palagunitaan/tree/main/client/src/pages): `client/src/pages`
- [Map exploration](https://github.com/divelarde/palagunitaan/blob/main/client/src/pages/MapPage.js): `client/src/pages/MapPage.js`
- [Timeline view](https://github.com/divelarde/palagunitaan/blob/main/client/src/pages/TimelinePage.js): `client/src/pages/TimelinePage.js`
- [Blog publishing](https://github.com/divelarde/palagunitaan/blob/main/server/controllers/blogPostController.js): `server/controllers/blogPostController.js`
- [Featured highlights](https://github.com/divelarde/palagunitaan/blob/main/server/controllers/highlightController.js): `server/controllers/highlightController.js`

### Administration

- [Admin dashboard](https://github.com/divelarde/palagunitaan/blob/main/client/src/pages/AdminDashboardPage.js): `client/src/pages/AdminDashboardPage.js`
- [Admin routes](https://github.com/divelarde/palagunitaan/blob/main/server/routes/adminRoutes.js): `server/routes/adminRoutes.js`
- [Content management](https://github.com/divelarde/palagunitaan/blob/main/server/controllers/adminContentController.js): `server/controllers/adminContentController.js`
- [Notifications](https://github.com/divelarde/palagunitaan/blob/main/server/services/notificationService.js): `server/services/notificationService.js`
- [MySQL pool](https://github.com/divelarde/palagunitaan/blob/main/server/config/db.js): `server/config/db.js`

### Other components

- **Platform user**

## Connections

- Platform user → Application router: uses (evidence: `client/src/App.js`)
- Application router → Client auth state: provides auth (evidence: `client/src/App.js`)
- Application router → Entry submission: routes to (evidence: `client/src/App.js`)
- Application router → Review dashboard: routes to (evidence: `client/src/App.js`)
- Application router → Admin dashboard: routes to (evidence: `client/src/App.js`)
- Application router → Browse and detail: routes to (evidence: `client/src/App.js`)
- Client auth state → HTTP client: uses (evidence: `client/src/context/AuthContext.js`)
- Application router → HTTP client: uses services
- Auth routes → Authentication service: delegates
- Authentication service → User records: reads and writes (evidence: `server/services/authService.js`)
- Entry submission → Entry API: submits via
- Entry API → Entry controller: routes to (evidence: `server/routes/heritageEntryRoutes.js`)
- Entry controller → Entry processing: delegates (evidence: `server/controllers/heritageEntryController.js`)
- Entry processing → Heritage entries: reads and writes (evidence: `server/services/heritageEntryService.js`)
- Entry processing → Heritage entries: persists entry (evidence: `server/services/heritageEntryService.js`)
- Review dashboard → Review routes: reviews via
- Review routes → Review controller: routes to (evidence: `server/routes/reviewRoutes.js`)
- Review controller → Review workflow: delegates (evidence: `server/controllers/reviewController.js`)
- Review workflow → Heritage entries: updates status (evidence: `server/services/reviewService.js`)
- Review controller → Editorial history: reads history (evidence: `server/controllers/reviewController.js`)
- Review workflow → Editorial history: records action (evidence: `server/services/reviewService.js`)
- Review workflow → Notifications: notifies decision (evidence: `server/services/reviewService.js`)
- Heritage entries → MySQL pool: queries (evidence: `server/models/heritageEntryModel.js`)
- Editorial history → MySQL pool: queries (evidence: `server/models/editorialActionModel.js`)
- User records → MySQL pool: queries (evidence: `server/models/userModel.js`)
- Browse and detail → HTTP client: fetches content
- Map exploration → HTTP client: fetches map data
- Timeline view → HTTP client: fetches timeline
- Application router → Blog publishing: loads blog service (evidence: `client/src/App.js`)
- Application router → Featured highlights: loads highlight service (evidence: `client/src/App.js`)
- Admin dashboard → Admin routes: uses admin API
- Admin routes → Content management: mounts content routes (evidence: `server/routes/adminRoutes.js`)
- Content management → MySQL pool: queries content
- Application router → Admin routes: mounts API
