How jazbengu/licensing-african-dataset-website-revamp works
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 Core runtime · DS-LAW-LAB-LICENSE/index.php Theme shell · App.tsx App shell · index.php Front controller
Components 22
Browser
End-user requests and the client-side UI runtime.
- Request · Browser requests enter the site and receive the rendered WordPress page.
WordPress
PHP bootstrap, core runtime, admin, and content routing.
- Front controller · Top-level WordPress entry script that starts bootstrap for public requests.
index.php - Config · Database and runtime configuration consumed during WordPress bootstrap.
wp-config.php - Core runtime · Main WordPress libraries and template resolution machinery.
wp-includes - Admin · WordPress administration interface and management APIs.
wp-admin - Content root · Theme, plugin, and upload area under WordPress content storage.
wp-content
Custom theme
Site-specific WordPress theme shell and PHP templates.
- Theme shell · Custom theme render shell that mounts the React app inside WordPress.
wp-content/themes/DS-LAW-LAB-LICENSE/index.php - Asset enqueue · Theme functions that enqueue built CSS and JS for runtime delivery.
wp-content/themes/DS-LAW-LAB-LICENSE/functions.php - PHP templates · WordPress page and single templates for content-led routes.
wp-content/themes/DS-LAW-LAB-LICENSE/page-blog.php - Theme HTML · Theme index HTML that points at hashed build artifacts.
wp-content/themes/DS-LAW-LAB-LICENSE/index.html - Theme 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 · React application entrypoint that starts the client bundle.
react-code/src/main.tsx - App shell · Top-level SPA container that coordinates pages and layout.
react-code/src/app/App.tsx - App components · Site-specific components such as layout, license generation, and popup flows.
react-code/src/app/components - UI library · Reusable Radix/shadcn-style UI primitives used across the app.
react-code/src/app/components/ui - Pages · Content-oriented SPA views such as Home, Blog, Dictionary, and license views.
react-code/src/app/pages - Source docs · License text, PDFs, logos, and source documents used by the UI.
react-code/src/imports - Styles · Global CSS, Tailwind theme, and shared visual system inputs.
react-code/src/styles
Ops plugins
Backup, migration, and maintenance infrastructure.
- Migration plugins · Backup, export, import, and staging plugins used for operations.
wp-content/plugins - Backups · 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 · Theme assets, uploads, plugin storage, and static backups on disk.
wp-content - Database · WordPress content, settings, and plugin state persisted in the site database.
Connections 21
- 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.