# nornarath001-ui/fullstack architecture

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

- Interactive diagram: https://gitdiagram.com/nornarath001-ui/fullstack
- Repository: https://github.com/nornarath001-ui/fullstack

## Overview

This repository combines a public-facing content portal with a Laravel administration backend. Visitors enter the React home page, load categorized content, select a section and view its content; the admin side manages that content and related files, alongside documents and other portal features. The route table and sampled controllers show the admin dispatch and content persistence paths. The README is empty, and the frontend header-fetch implementation and API routes were not sampled, so their backend connection is not asserted.

Main entry points: [`backend/routes/web.php`](https://github.com/nornarath001-ui/fullstack/blob/main/backend/routes/web.php) (Web routes), [`frontend/src/pages/HomePage.jsx`](https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/pages/HomePage.jsx) (Home page), [`backend/app/Http/Controllers/BodyContentController.php`](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/BodyContentController.php) (Body content), [`backend/app/Http/Controllers/ContentAttachmentController.php`](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/ContentAttachmentController.php) (File attachments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_visitor["Public portal"]
end

subgraph group_frontend["React experience"]
  node_home["Home page<br/>[HomePage.jsx]"]
  node_app["App routes<br/>[App.jsx]"]
  node_provider["Content state<br/>[ContentContext.jsx]"]
  node_header_api["Header API client<br/>[headers.js]"]
  node_header_ui["Header<br/>[Header.jsx]"]
  node_sidebar_ui["Sidebar<br/>[Sidebar.jsx]"]
  node_main_ui["Main content<br/>[MainContent.jsx]"]
  node_right_ui["Right menu<br/>[RightMenu.jsx]"]
  node_footer_ui["Footer<br/>[Footer.jsx]"]
end

subgraph group_admin["Admin workflows"]
  node_routes["Web routes<br/>[web.php]"]
  node_dashboard["Dashboard"]
  node_portal_admin["Portal sections"]
  node_documents["Documents"]
end

subgraph group_content["Content management"]
  node_content_admin["Body content"]
  node_body_model[("Content records<br/>[BodyContent.php]")]
  node_attachments["File attachments"]
  node_attachment_model[("Attachment records")]
  node_banners["Banner forms"]
  node_banner_model[("Banner records<br/>[BannerForm.php]")]
  node_headers_admin["Main headers"]
  node_header_model[("Header records<br/>[MainHeader.php]")]
  node_sidebar_admin["Sidebar content"]
  node_sidebar_model[("Sidebar records<br/>[SidebarContent.php]")]
  node_page_headers["Page headers"]
  node_file_store[("Public file storage")]
end

subgraph group_identity["Access and settings"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_user[("User account<br/>[User.php]")]
  node_locale["Locale switching<br/>[SetLocale.php]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_home
node_home -->|"uses state"| node_provider
node_home -->|"renders"| node_header_ui
node_home -->|"renders"| node_sidebar_ui
node_home -->|"renders"| node_main_ui
node_home -->|"renders"| node_right_ui
node_home -->|"renders"| node_footer_ui
node_provider -->|"fetches headers"| node_header_api
node_routes -->|"dispatches auth"| node_auth
node_auth -->|"authenticates"| node_user
node_routes -->|"dispatches dashboard"| node_dashboard
node_routes -->|"dispatches sections"| node_portal_admin
node_routes -->|"dispatches documents"| node_documents
node_routes -->|"dispatches content"| node_content_admin
node_routes -->|"dispatches files"| node_attachments
node_routes -->|"dispatches banners"| node_banners
node_routes -->|"dispatches headers"| node_headers_admin
node_routes -->|"dispatches sidebars"| node_sidebar_admin
node_routes -->|"dispatches page headers"| node_page_headers
node_routes -->|"appends middleware"| node_locale
node_content_admin -->|"reads and writes"| node_body_model
node_content_admin -->|"queries headers"| node_header_model
node_content_admin -->|"queries sidebars"| node_sidebar_model
node_content_admin -->|"stores uploads"| node_file_store
node_attachments -->|"loads content"| node_body_model
node_attachments -->|"reads and writes"| node_attachment_model
node_attachments -->|"stores files"| node_file_store
node_banners -->|"reads and writes"| node_banner_model
node_banners -->|"stores images"| node_file_store
node_headers_admin -->|"manages headers"| node_header_model
node_sidebar_admin -->|"queries headers"| node_header_model
node_sidebar_admin -->|"manages sidebars"| node_sidebar_model

click node_home "https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/pages/HomePage.jsx"
click node_app "https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/App.jsx"
click node_provider "https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/context/ContentContext.jsx"
click node_header_api "https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/api/headers.js"
click node_header_ui "https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/components/Header.jsx"
click node_sidebar_ui "https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/components/Sidebar.jsx"
click node_main_ui "https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/components/MainContent.jsx"
click node_right_ui "https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/components/RightMenu.jsx"
click node_footer_ui "https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/components/Footer.jsx"
click node_routes "https://github.com/nornarath001-ui/fullstack/blob/main/backend/routes/web.php"
click node_auth "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/AuthController.php"
click node_user "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Models/User.php"
click node_dashboard "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/DashboardController.php"
click node_portal_admin "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/ConstituencyController.php"
click node_documents "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/DocumentController.php"
click node_content_admin "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/BodyContentController.php"
click node_body_model "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Models/BodyContent.php"
click node_attachments "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/ContentAttachmentController.php"
click node_attachment_model "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Models/ContentAttachment.php"
click node_banners "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/BannerFormController.php"
click node_banner_model "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Models/BannerForm.php"
click node_headers_admin "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/MainHeaderController.php"
click node_header_model "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Models/MainHeader.php"
click node_sidebar_admin "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/SidebarContentController.php"
click node_sidebar_model "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Models/SidebarContent.php"
click node_page_headers "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/PageHeaderController.php"
click node_locale "https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Middleware/SetLocale.php"

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_home,node_app,node_provider,node_header_api,node_header_ui,node_sidebar_ui,node_main_ui,node_right_ui,node_footer_ui toneAmber
class node_routes,node_dashboard,node_portal_admin,node_documents toneMint
class node_content_admin,node_body_model,node_attachments,node_attachment_model,node_banners,node_banner_model,node_headers_admin,node_header_model,node_sidebar_admin,node_sidebar_model,node_page_headers,node_file_store toneRose
class node_auth,node_user,node_locale,node_visitor toneIndigo
```

## Components

### React experience

- [Home page](https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/pages/HomePage.jsx): `frontend/src/pages/HomePage.jsx`
- [App routes](https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Content state](https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/context/ContentContext.jsx): `frontend/src/context/ContentContext.jsx`
- [Header API client](https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/api/headers.js): `frontend/src/api/headers.js`
- [Header](https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/components/Header.jsx): `frontend/src/components/Header.jsx`
- [Sidebar](https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/components/Sidebar.jsx): `frontend/src/components/Sidebar.jsx`
- [Main content](https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/components/MainContent.jsx): `frontend/src/components/MainContent.jsx`
- [Right menu](https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/components/RightMenu.jsx): `frontend/src/components/RightMenu.jsx`
- [Footer](https://github.com/nornarath001-ui/fullstack/blob/main/frontend/src/components/Footer.jsx): `frontend/src/components/Footer.jsx`

### Admin workflows

- [Web routes](https://github.com/nornarath001-ui/fullstack/blob/main/backend/routes/web.php): `backend/routes/web.php`
- [Dashboard](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/DashboardController.php): `backend/app/Http/Controllers/DashboardController.php`
- [Portal sections](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/ConstituencyController.php): `backend/app/Http/Controllers/ConstituencyController.php`
- [Documents](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/DocumentController.php): `backend/app/Http/Controllers/DocumentController.php`

### Content management

- [Body content](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/BodyContentController.php): `backend/app/Http/Controllers/BodyContentController.php`
- [Content records](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Models/BodyContent.php): `backend/app/Models/BodyContent.php`
- [File attachments](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/ContentAttachmentController.php): `backend/app/Http/Controllers/ContentAttachmentController.php`
- [Attachment records](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Models/ContentAttachment.php): `backend/app/Models/ContentAttachment.php`
- [Banner forms](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/BannerFormController.php): `backend/app/Http/Controllers/BannerFormController.php`
- [Banner records](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Models/BannerForm.php): `backend/app/Models/BannerForm.php`
- [Main headers](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/MainHeaderController.php): `backend/app/Http/Controllers/MainHeaderController.php`
- [Header records](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Models/MainHeader.php): `backend/app/Models/MainHeader.php`
- [Sidebar content](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/SidebarContentController.php): `backend/app/Http/Controllers/SidebarContentController.php`
- [Sidebar records](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Models/SidebarContent.php): `backend/app/Models/SidebarContent.php`
- [Page headers](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/PageHeaderController.php): `backend/app/Http/Controllers/PageHeaderController.php`
- **Public file storage**

### Access and settings

- [Authentication](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Controllers/AuthController.php): `backend/app/Http/Controllers/AuthController.php`
- [User account](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Models/User.php): `backend/app/Models/User.php`
- [Locale switching](https://github.com/nornarath001-ui/fullstack/blob/main/backend/app/Http/Middleware/SetLocale.php): `backend/app/Http/Middleware/SetLocale.php`

### Other components

- **Visitor**

## Connections

- Visitor → App routes: opens
- App routes → Home page: routes to (evidence: `frontend/src/App.jsx`)
- Home page → Content state: uses state (evidence: `frontend/src/pages/HomePage.jsx`)
- Home page → Header: renders (evidence: `frontend/src/pages/HomePage.jsx`)
- Home page → Sidebar: renders (evidence: `frontend/src/pages/HomePage.jsx`)
- Home page → Main content: renders (evidence: `frontend/src/pages/HomePage.jsx`)
- Home page → Right menu: renders (evidence: `frontend/src/pages/HomePage.jsx`)
- Home page → Footer: renders (evidence: `frontend/src/pages/HomePage.jsx`)
- Content state → Header API client: fetches headers (evidence: `frontend/src/context/ContentContext.jsx`)
- Web routes → Authentication: dispatches auth (evidence: `backend/routes/web.php`)
- Authentication → User account: authenticates (evidence: `backend/app/Http/Controllers/AuthController.php`)
- Web routes → Dashboard: dispatches dashboard (evidence: `backend/routes/web.php`)
- Web routes → Portal sections: dispatches sections (evidence: `backend/routes/web.php`)
- Web routes → Documents: dispatches documents (evidence: `backend/routes/web.php`)
- Web routes → Body content: dispatches content (evidence: `backend/routes/web.php`)
- Web routes → File attachments: dispatches files (evidence: `backend/routes/web.php`)
- Web routes → Banner forms: dispatches banners (evidence: `backend/routes/web.php`)
- Web routes → Main headers: dispatches headers (evidence: `backend/routes/web.php`)
- Web routes → Sidebar content: dispatches sidebars (evidence: `backend/routes/web.php`)
- Web routes → Page headers: dispatches page headers (evidence: `backend/routes/web.php`)
- Web routes → Locale switching: appends middleware
- Body content → Content records: reads and writes (evidence: `backend/app/Http/Controllers/BodyContentController.php`)
- Body content → Header records: queries headers (evidence: `backend/app/Http/Controllers/BodyContentController.php`)
- Body content → Sidebar records: queries sidebars (evidence: `backend/app/Http/Controllers/BodyContentController.php`)
- Body content → Public file storage: stores uploads (evidence: `backend/app/Http/Controllers/BodyContentController.php`)
- File attachments → Content records: loads content (evidence: `backend/app/Http/Controllers/ContentAttachmentController.php`)
- File attachments → Attachment records: reads and writes (evidence: `backend/app/Http/Controllers/ContentAttachmentController.php`)
- File attachments → Public file storage: stores files (evidence: `backend/app/Http/Controllers/ContentAttachmentController.php`)
- Banner forms → Banner records: reads and writes (evidence: `backend/app/Http/Controllers/BannerFormController.php`)
- Banner forms → Public file storage: stores images (evidence: `backend/app/Http/Controllers/BannerFormController.php`)
- Main headers → Header records: manages headers (evidence: `backend/app/Http/Controllers/MainHeaderController.php`)
- Sidebar content → Header records: queries headers (evidence: `backend/app/Http/Controllers/SidebarContentController.php`)
- Sidebar content → Sidebar records: manages sidebars (evidence: `backend/app/Http/Controllers/SidebarContentController.php`)
