# jazbengu/licensing-african-dataset-website-revamp architecture

> Architecture diagram of the GitHub repository jazbengu/licensing-african-dataset-website-revamp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jazbengu/licensing-african-dataset-website-revamp
- Repository: https://github.com/jazbengu/licensing-african-dataset-website-revamp

## Overview

1. **Overall shape**
   - This repository is a full WordPress installation, not a standalone React app.
   - WordPress core is at the repository root, while the site-specific application lives in the custom theme `wp-content/themes/DS-LAW-LAB-LICENSE/`.

2. **Request entry and WordPress bootstrap**
   - Browser requests land on the WordPress front controller `index.php`, with `wp-config.php` providing database/runtime settings.
   - WordPress then loads core libraries from `wp-includes/` and resolves the active theme/template.

3. **Custom theme as the application shell**
   - `wp-content/themes/DS-LAW-LAB-LICENSE/index.php` is the main render shell.
   - It outputs the React mount point `

` and calls `wp_head()` / `wp_footer()` so WordPress can inject assets and metadata.

4. **Front-end delivery**
   - The theme’s `functions.php` enqueues the compiled front-end CSS/JS from the theme’s `assets/` directory.
   - The theme also contains an `index.html` that references hashed build artifacts directly, so there are two integration points to keep in sync when rebuilding the UI.

5. **React application boundary**
   - The actual UI source is in `react-code/`, built with Vite + TypeScript + React.
   - The app is organized as a SPA-style client bundle with `src/main.tsx` bootstrapping `src/app/App.tsx`, and feature pages under `src/app/pages/`.

6. **React UI structure**
   - Shared layout and reusable UI are split into `src/app/components/` and `src/app/components/ui/`.
   - The `ui/` directory is a large shadcn/Radix-style component library layer, while app-specific components include `Layout`, `LicenseGenerator`, `LicenseContent`, and `WelcomePopup`.
   - The page set includes content-oriented routes such as `Home`, `About`, `Blog`, `Dictionary`, `Resources`, `Privacy`, `terms`, `ViewLicense`, and `split-sheet`.

7. **Content and document flow**
   - The app appears centered on license generation and legal/content presentation rather than generic site navigation.
   - Static source documents and branding assets live in `react-code/src/imports/`, including license text/PDFs and logos that feed the UI and generated output views.

8. **Styling and build pipeline**
   - Styling is a mix of global CSS and Tailwind-based theming.
   - Key style inputs are in `react-code/src/styles/` plus `default_shadcn_theme.css`, and the build output is emitted into the theme’s `assets/` folder for runtime delivery.

9. **WordPress content/templating beyond the SPA**
   - The custom theme also contains PHP templates like `page-blog.php`, `page-dictionary.php`, `page-casestudies.php`, `page_inpractice.php`, and `single.php`.
   - That suggests WordPress still owns some content routing/rendering, while the React bundle provides the interactive licensing experience inside the theme shell.

10. **Admin, plugins, and operational subsystem**
   - `wp-admin/` and `wp-includes/` are standard WordPress management/runtime layers.
   - The repo also includes migration/backup tooling in `wp-content/plugins/` and backup storage folders such as `ai1wm-backups` and `backup-migration`, which are operational rather than user-facing.
   - These plugins handle export/import, staging, and site recovery, and should be treated as deployment/maintenance infrastructure in the diagram.

11. **Static hosting and web-server boundary**
   - `.htaccess` at the root and inside plugin backup directories indicates Apache-style rewrite/protection rules.
   - The site is therefore served as PHP on a web server, with static build assets and media served from the theme and `wp-content/` directories.

12. **Useful diagram boundary**
   - A good architecture diagram would separate:
     - **Browser**
     - **Web server / PHP**
     - **WordPress core**
     - **Custom WordPress theme shell**
     - **React SPA bundle**
     - **WordPress admin + backup/migration plugins**
     - **Database / file storage**
   - The main runtime flow is: browser request → WordPress bootstrap → theme shell with `#root` → enqueued React assets → client-side app execution.

Main entry points: [`wp-includes`](https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/wp-includes) (Core runtime), [`wp-content/themes/DS-LAW-LAB-LICENSE/index.php`](https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/wp-content/themes/DS-LAW-LAB-LICENSE/index.php) (Theme shell), [`react-code/src/app/App.tsx`](https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/react-code/src/app/App.tsx) (App shell), [`index.php`](https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/index.php) (Front controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser"]
  node_browser_request(("Request<br/>client entry"))
end

subgraph group_wordpress["WordPress"]
  node_wp_index["Front controller<br/>PHP entrypoint<br/>[index.php]"]
  node_wp_config["Config<br/>runtime settings<br/>[wp-config.php]"]
  node_wp_core["Core runtime<br/>WordPress core"]
  node_wp_admin["Admin<br/>CMS backend"]
  node_wp_content["Content root<br/>content storage"]
end

subgraph group_theme["Custom theme"]
  node_theme_shell["Theme shell<br/>theme entry<br/>[index.php]"]
  node_theme_functions["Asset enqueue<br/>theme PHP<br/>[functions.php]"]
  node_theme_templates["PHP templates<br/>theme templates<br/>[page-blog.php]"]
  node_theme_build_html["Theme HTML<br/>static shell<br/>[index.html]"]
  node_theme_assets["Theme assets<br/>built assets"]
end

subgraph group_react["React app"]
  node_react_main["Bootstrap<br/>Vite entry<br/>[main.tsx]"]
  node_react_app["App shell<br/>React SPA<br/>[App.tsx]"]
  node_react_components["App components<br/>React UI"]
  node_react_ui["UI library<br/>component kit"]
  node_react_pages["Pages<br/>route views"]
  node_react_imports["Source docs<br/>content assets"]
  node_react_styles["Styles<br/>styling"]
end

subgraph group_ops["Ops plugins"]
  node_ops_plugins["Migration plugins<br/>maintenance tools"]
  node_ops_backups[("Backups<br/>backup storage")]
end

subgraph group_storage["Storage"]
  node_file_storage[("File storage<br/>filesystem")]
  node_database[("Database")]
end

node_browser_request -->|"HTTP request"| node_wp_index
node_wp_index -->|"loads"| node_wp_config
node_wp_index -->|"boots"| node_wp_core
node_wp_core -->|"selects"| node_theme_shell
node_theme_shell -->|"enqueues"| node_theme_functions
node_theme_shell -->|"falls back to"| node_theme_templates
node_theme_shell -.->|"mirrors"| node_theme_build_html
node_theme_functions -->|"serves"| node_theme_assets
node_theme_build_html -->|"references"| node_theme_assets
node_theme_assets -->|"boots"| node_react_main
node_react_main -->|"renders"| node_react_app
node_react_app -->|"composes"| node_react_components
node_react_app -->|"routes to"| node_react_pages
node_react_components -->|"uses"| node_react_ui
node_react_pages -->|"consumes"| node_react_imports
node_react_app -->|"styles"| node_react_styles
node_wp_admin -->|"manages"| node_ops_plugins
node_ops_plugins -->|"writes"| node_ops_backups
node_wp_core -->|"reads/writes"| node_database
node_wp_core -->|"reads/writes"| node_file_storage
node_ops_backups -->|"stored in"| node_file_storage

click node_wp_index "https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/index.php"
click node_wp_config "https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/wp-config.php"
click node_wp_core "https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/wp-includes"
click node_wp_admin "https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/wp-admin"
click node_wp_content "https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/wp-content"
click node_theme_shell "https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/wp-content/themes/DS-LAW-LAB-LICENSE/index.php"
click node_theme_functions "https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/wp-content/themes/DS-LAW-LAB-LICENSE/functions.php"
click node_theme_templates "https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/wp-content/themes/DS-LAW-LAB-LICENSE/page-blog.php"
click node_theme_build_html "https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/wp-content/themes/DS-LAW-LAB-LICENSE/index.html"
click node_theme_assets "https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/wp-content/themes/DS-LAW-LAB-LICENSE/assets"
click node_react_main "https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/react-code/src/main.tsx"
click node_react_app "https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/react-code/src/app/App.tsx"
click node_react_components "https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/react-code/src/app/components"
click node_react_ui "https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/react-code/src/app/components/ui"
click node_react_pages "https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/react-code/src/app/pages"
click node_react_imports "https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/react-code/src/imports"
click node_react_styles "https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/react-code/src/styles"
click node_ops_plugins "https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/wp-content/plugins"
click node_ops_backups "https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/wp-content/ai1wm-backups"
click node_file_storage "https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/wp-content"

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_browser_request toneBlue
class node_wp_index,node_wp_config,node_wp_core,node_wp_admin,node_wp_content toneAmber
class node_theme_shell,node_theme_functions,node_theme_templates,node_theme_build_html,node_theme_assets toneMint
class node_react_main,node_react_app,node_react_components,node_react_ui,node_react_pages,node_react_imports,node_react_styles toneRose
class node_ops_plugins,node_ops_backups toneIndigo
class node_file_storage,node_database toneTeal
```

## Components

### Browser

End-user requests and the client-side UI runtime.

- **Request**: client entry · Browser requests enter the site and receive the rendered WordPress page.

### WordPress

PHP bootstrap, core runtime, admin, and content routing.

- [Front controller](https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/index.php): PHP entrypoint · Top-level WordPress entry script that starts bootstrap for public requests. · `index.php`
- [Config](https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/wp-config.php): runtime settings · Database and runtime configuration consumed during WordPress bootstrap. · `wp-config.php`
- [Core runtime](https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/wp-includes): WordPress core · Main WordPress libraries and template resolution machinery. · `wp-includes`
- [Admin](https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/wp-admin): CMS backend · WordPress administration interface and management APIs. · `wp-admin`
- [Content root](https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/wp-content): content storage · Theme, plugin, and upload area under WordPress content storage. · `wp-content`

### Custom theme

Site-specific WordPress theme shell and PHP templates.

- [Theme shell](https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/wp-content/themes/DS-LAW-LAB-LICENSE/index.php): theme entry · Custom theme render shell that mounts the React app inside WordPress. · `wp-content/themes/DS-LAW-LAB-LICENSE/index.php`
- [Asset enqueue](https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/wp-content/themes/DS-LAW-LAB-LICENSE/functions.php): theme PHP · Theme functions that enqueue built CSS and JS for runtime delivery. · `wp-content/themes/DS-LAW-LAB-LICENSE/functions.php`
- [PHP templates](https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/wp-content/themes/DS-LAW-LAB-LICENSE/page-blog.php): theme templates · WordPress page and single templates for content-led routes. · `wp-content/themes/DS-LAW-LAB-LICENSE/page-blog.php`
- [Theme HTML](https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/wp-content/themes/DS-LAW-LAB-LICENSE/index.html): static shell · Theme index HTML that points at hashed build artifacts. · `wp-content/themes/DS-LAW-LAB-LICENSE/index.html`
- [Theme assets](https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/wp-content/themes/DS-LAW-LAB-LICENSE/assets): built assets · Compiled CSS/JS and legal assets served from the theme directory. · `wp-content/themes/DS-LAW-LAB-LICENSE/assets`

### React app

Vite-built SPA client bundle and UI source.

- [Bootstrap](https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/react-code/src/main.tsx): Vite entry · React application entrypoint that starts the client bundle. · `react-code/src/main.tsx`
- [App shell](https://github.com/jazbengu/licensing-african-dataset-website-revamp/blob/dev/react-code/src/app/App.tsx): React SPA · Top-level SPA container that coordinates pages and layout. · `react-code/src/app/App.tsx`
- [App components](https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/react-code/src/app/components): React UI · Site-specific components such as layout, license generation, and popup flows. · `react-code/src/app/components`
- [UI library](https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/react-code/src/app/components/ui): component kit · Reusable Radix/shadcn-style UI primitives used across the app. · `react-code/src/app/components/ui`
- [Pages](https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/react-code/src/app/pages): route views · Content-oriented SPA views such as Home, Blog, Dictionary, and license views. · `react-code/src/app/pages`
- [Source docs](https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/react-code/src/imports): content assets · License text, PDFs, logos, and source documents used by the UI. · `react-code/src/imports`
- [Styles](https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/react-code/src/styles): styling · Global CSS, Tailwind theme, and shared visual system inputs. · `react-code/src/styles`

### Ops plugins

Backup, migration, and maintenance infrastructure.

- [Migration plugins](https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/wp-content/plugins): maintenance tools · Backup, export, import, and staging plugins used for operations. · `wp-content/plugins`
- [Backups](https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/wp-content/ai1wm-backups): backup storage · Archived site copies and staging artifacts stored under wp-content. · `wp-content/ai1wm-backups`

### Storage

Database and filesystem-backed content, media, and backups.

- [File storage](https://github.com/jazbengu/licensing-african-dataset-website-revamp/tree/dev/wp-content): filesystem · Theme assets, uploads, plugin storage, and static backups on disk. · `wp-content`
- **Database**: wp database · WordPress content, settings, and plugin state persisted in the site database.

## Connections

- Request → Front controller: HTTP request · Browser requests hit the WordPress front controller.
- Front controller → Config: loads · Bootstrap reads runtime and database configuration.
- Front controller → Core runtime: boots · WordPress core libraries initialize the request lifecycle.
- Core runtime → Theme shell: selects · Core resolves the active theme and template.
- Theme shell → Asset enqueue: enqueues · Theme shell uses functions.php to register frontend assets.
- Theme shell → PHP templates: falls back to · WordPress page and single templates still serve some routes.
- Theme shell → Theme HTML: mirrors · The HTML shell must stay aligned with the built frontend entry.
- Asset enqueue → Theme assets: serves · Compiled CSS and JS are delivered from the theme assets folder.
- Theme HTML → Theme assets: references · Static HTML points at hashed build artifacts.
- Theme assets → Bootstrap: boots · The built client bundle starts from the React entrypoint.
- Bootstrap → App shell: renders · Main bootstrap mounts the top-level SPA app.
- App shell → App components: composes · App shell assembles layout and license-specific components.
- App shell → Pages: routes to · Page-level views provide the content sections and flows.
- App components → UI library: uses · App-specific components are built on shared UI primitives.
- Pages → Source docs: consumes · Pages and views read legal documents, PDFs, and logos.
- App shell → Styles: styles · The SPA consumes global CSS and Tailwind theme layers.
- Admin → Migration plugins: manages · Admin interfaces expose backup and migration plugin workflows.
- Migration plugins → Backups: writes · Plugins create and manage backup archives and staging artifacts.
- Core runtime → Database: reads/writes · Core persists posts, settings, and site metadata in the database.
- Core runtime → File storage: reads/writes · Core serves theme files, media, plugins, and other site assets from disk.
- Backups → File storage: stored in · Backup archives live in filesystem-backed wp-content storage.
