Browse Source

chore(project): rename PHPengine to PHEngine

softword 2 months ago
parent
commit
9aa582b14f

+ 2 - 2
AGENTS.md

@@ -1,7 +1,7 @@
-# PHPEngine
+# PHEngine
 
 ## Project Overview
-PHPEngine is a PHP/Fat-Free Framework application with a React administration UI. It exposes a same-origin JSON API for session authentication, navigation, notifications, encrypted configuration, and user administration.
+PHEngine is a PHP/Fat-Free Framework application with a React administration UI. It exposes a same-origin JSON API for session authentication, navigation, notifications, encrypted configuration, and user administration.
 
 ## Tech Stack
 PHP 8.5+, Fat-Free Framework 3.9, MySQL via F3 `DB\SQL`, React 19, React Router 7, MUI 9, Tailwind CSS 4, and Vite 7.

+ 2 - 2
composer.json

@@ -1,6 +1,6 @@
 {
-    "name": "gianvoci/phpengine",
-    "description": "PHPEngine application framework",
+    "name": "gianvoci/phengine",
+    "description": "PHEngine application framework",
     "license": "proprietary",
     "require": {
         "php": "^8.5",

+ 2 - 2
package.json

@@ -1,12 +1,12 @@
 {
-  "name": "phpengine",
+  "name": "phengine",
   "version": "1.12.1",
   "codename": "Barricade",
   "private": true,
   "engines": {
     "node": "^20.19.0 || >=22.12.0"
   },
-  "description": "PHPEngine",
+  "description": "PHEngine",
   "author": "Giancarlo Voci",
   "scripts": {
     "clean": "shx --silent rm -rf deploy.tar.gz tmp node_modules ui/admin/node_modules src_minified assets/frontend assets/admin Site.log cfg/*.old ui/*/masterpage.tpl fbtpl *.tgz",

+ 3 - 3
phpengine.sql → phengine.sql

@@ -7,9 +7,9 @@ SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
 
 SET NAMES utf8mb4;
 
-DROP DATABASE IF EXISTS `phpengine`;
-CREATE DATABASE `phpengine` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
-USE `phpengine`;
+DROP DATABASE IF EXISTS `phengine`;
+CREATE DATABASE `phengine` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
+USE `phengine`;
 
 DROP TABLE IF EXISTS `label_bindings`;
 CREATE TABLE `label_bindings` (

+ 1 - 1
specs/commands.md

@@ -30,7 +30,7 @@ The application bootstrap requires `cfg/config.bin`. Its base64+gzip encoding is
 
 ## Database
 
-`phpengine.sql` is a MySQL dump for the `phpengine` database. It contains `DROP DATABASE`, `CREATE DATABASE`, and sample user data; review it before importing and never run it against a database that must be preserved.
+`phengine.sql` is a MySQL dump for the `phengine` database. It contains `DROP DATABASE`, `CREATE DATABASE`, and sample user data; review it before importing and never run it against a database that must be preserved.
 
 The role-catalog migration is an explicit data-changing CLI operation. It is not run during boot, has no automatic rollback, and must be reviewed before execution.
 

+ 1 - 1
specs/conventions-database.md

@@ -6,7 +6,7 @@ Read this when changing MySQL schema, F3 mappers, or data-integrity rules.
 `Core\System\System` creates the F3 `DB\SQL` connection from `DSN`, `dbuser`, and `dbpass` F3 globals. It uses PDO exceptions and enables persistent connections on Linux and all CLI requests. Keep credentials in configuration, not source code.
 
 ## Schema Source
-`phpengine.sql` is the tracked schema source. It defines six tables:
+`phengine.sql` is the tracked schema source. It defines six tables:
 
 | Table | Engine | Role |
 |---|---|---|

+ 1 - 1
specs/file-structure.md

@@ -20,7 +20,7 @@ Read this when you need the repository map, boot order, or generated-file bounda
 | `assets/app/` | Ignored local Vite build output, including hashed JS/CSS and the manifest; do not edit manually. |
 | `assets/images/` | Static images referenced by the React UI and runtime configuration. |
 | `vite.config.js` | Builds `ui/app` into `assets/app` with base `/phengine/assets/app/` and suppresses Rollup `"use client"` module-directive warnings. |
-| `phpengine.sql` | MySQL schema and sample data dump, including the role catalog and inventory tables. |
+| `phengine.sql` | MySQL schema and sample data dump, including the role catalog and inventory tables. |
 
 ## Boot and Request Flow
 1. `index.php` validates PHP, decrypts `cfg/config.bin`, and invokes `ApplicationComposition` over `src/`.

+ 2 - 2
specs/integrations/mysql.md

@@ -10,7 +10,7 @@ Read this when changing MySQL connections, mappers, transactions, or persistence
 | `src/Core/System/User.php` | `users` mapper, role serialization, password hash generation |
 | `src/Core/System/Notifications.php` | `notifications` mapper and table-wide clear operation |
 | `src/Core/Api/UserController.php` | Account CRUD, row locks, transactions, duplicate detection |
-| `phpengine.sql` | Schema, unique index, and sample data |
+| `phengine.sql` | Schema, unique index, and sample data |
 
 ## Flow
 1. F3 globals provide DSN and database credentials to `System`.
@@ -24,7 +24,7 @@ Read this when changing MySQL connections, mappers, transactions, or persistence
 |---|---|---|
 | Connection secrets | Values originate in runtime configuration, not request input | `cfg/config.bin` loaded by `index.php` |
 | Request values in queries | Mapper predicates use placeholders for username/ID lookups | `User`, `AuthController`, `UserController` |
-| Duplicate identities | Application precheck plus `uq_users_username` database constraint | `UserController`, `phpengine.sql` |
+| Duplicate identities | Application precheck plus `uq_users_username` database constraint | `UserController`, `phengine.sql` |
 | Final administrator race | Transaction and `SELECT id FROM users FOR UPDATE` serialize checks and mutations | `UserController` |
 | Role deserialization | `unserialize(..., ['allowed_classes' => false])` prevents object instantiation | `User::__construct()` |
 | Table-wide notification deletion | Only authenticated, CSRF-protected notification API path reaches `emptyAll()` | `NotificationController::delete()` |

+ 1 - 1
specs/module-index.md

@@ -17,7 +17,7 @@ Tier 1 requires full context loading. Tier 2 is customized business logic. Tier
 | Navigation | `src/Core/Api/NavigationController.php`, `src/Core/Admin/Admin.php`, `src/Modules/Blank/Blank.php` | 2 | Builds the role-ID-filtered and ordered application menu, including Inventory Monitor. | [API routes](api-routes.md) |
 | Notifications | `src/Core/System/Notifications.php`, `src/Core/Api/NotificationController.php` | 2 | Persists, groups, polls, and deletes notification records. | [API routes](api-routes.md) |
 | Inventory Monitor demo plugin | `src/Modules/Blank/Blank.php` | 4 | Retained demo plugin initializer that publishes the ID-2 Inventory Monitor navigation entry without volatile role registration. | [role and inventory spec](role-and-inventory.md) |
-| Database schema and migration | `phpengine.sql`, `scripts/migrate-role-catalog.php` | 1 | MySQL role/inventory schema, constraints, seed records, and explicit legacy-role migration. | [database conventions](conventions-database.md) |
+| Database schema and migration | `phengine.sql`, `scripts/migrate-role-catalog.php` | 1 | MySQL role/inventory schema, constraints, seed records, and explicit legacy-role migration. | [database conventions](conventions-database.md) |
 | React boot and routes | `ui/app/src/main.jsx`, `App.jsx`, `routes.jsx` | 2 | React/MUI setup, session bootstrap, guarded routes, and page selection. | [frontend conventions](conventions-frontend.md) |
 | Frontend API client | `ui/app/src/api/client.js` | 1 | Same-origin URL resolution, cookies, JSON errors, and in-memory CSRF handling. | [browser API integration](integrations/browser-api.md) |
 | Admin React features | `ui/app/src/features/admin/` | 2 | Configuration, user-management, and role-catalog UI. | [API routes](api-routes.md) |

+ 1 - 1
specs/role-and-inventory.md

@@ -4,7 +4,7 @@ Read this when changing persistent roles, user role assignments, inventory items
 
 ## Purpose
 
-PHPEngine uses a persistent role catalog for authorization and provides a persistent Inventory Monitor demo. Role IDs are stable authorization keys; display labels are editable metadata and must not be used as permission checks.
+PHEngine uses a persistent role catalog for authorization and provides a persistent Inventory Monitor demo. Role IDs are stable authorization keys; display labels are editable metadata and must not be used as permission checks.
 
 ## Role Catalog
 

+ 1 - 1
src/Core/Admin/Admin.php

@@ -26,7 +26,7 @@ class Admin extends PluginStrategy
 
 		// System Settings
 		$this->AddMenuItem('System Settings', ['mainMenu' => 'adminMainMenu', 'mdiClass' => 'settings', 'permissionId' => self::ADMIN_ROLE_ID]);
-		$this->AddMenuItem('PHPEngine Settings', ['mainMenu' => 'System Settings', 'url' => 'admin/phpengine-settings', 'permissionId' => self::ADMIN_ROLE_ID]);
+		$this->AddMenuItem('PHEngine Settings', ['mainMenu' => 'System Settings', 'url' => 'admin/phengine-settings', 'permissionId' => self::ADMIN_ROLE_ID]);
 		$this->AddMenuItem('Users', ['mainMenu' => 'System Settings', 'url' => 'admin/users', 'permissionId' => self::ADMIN_ROLE_ID]);
 		$this->AddMenuItem('Roles', ['mainMenu' => 'System Settings', 'url' => 'admin/roles', 'permissionId' => self::ADMIN_ROLE_ID]);
 	}

+ 1 - 1
src/Core/System/PluginStrategy.php

@@ -135,7 +135,7 @@ class PluginStrategy implements IPluginStrategy
 	 * Add menu to application for the plugin, if another menu with same $menuName is present, the last added has priority on other.
 	 *
 	 * @param string $menuName Name of menu to add
-	 * @param array $options the PHPEngine menu structure
+	 * @param array $options the PHEngine menu structure
 	 *
 	 * <br/><br/>
 	 * [<br/>

+ 2 - 2
src/Core/System/RuntimeServices.php

@@ -87,7 +87,7 @@ class RuntimeServices
 	}
 
 	/**
-	 * Decrypt $data using PHPEngine algorithm
+	 * Decrypt $data using PHEngine algorithm
 	 *
 	 * @param $binaryData
 	 * @return string
@@ -98,7 +98,7 @@ class RuntimeServices
 	}
 
 	/**
-	 * Encrypt $data using PHPEngine algorithm
+	 * Encrypt $data using PHEngine algorithm
 	 *
 	 * @param $data
 	 * @return string

+ 1 - 1
ui/app/index.html

@@ -4,7 +4,7 @@
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <link rel="icon" href="/phengine/assets/images/favicon.ico" />
-    <title>PHPEngine</title>
+    <title>PHEngine</title>
   </head>
   <body>
     <div id="root"></div>

+ 1 - 1
ui/app/src/features/admin/ConfigPage.jsx

@@ -163,7 +163,7 @@ function BoxHeader() {
 				Administration
 			</Typography>
 			<Typography variant="h3" component="h1">
-				PHPEngine Settings
+				PHEngine Settings
 			</Typography>
 			<Typography color="text.secondary">
 				Edit the application configuration text. Changes are encrypted before they are stored.

+ 2 - 2
ui/app/src/features/auth/LoginPage.jsx

@@ -46,12 +46,12 @@ function LoginPage({ onAuthenticated }) {
 							component="img"
 							className="mx-auto mb-4 h-20 object-contain"
 							src={`${APPLICATION_BASE_PATH}/assets/images/logo.png`}
-							alt="PHPEngine"
+							alt="PHEngine"
 						/>
 						<Typography variant="h4" component="h1">
 							Sign in
 						</Typography>
-						<Typography color="text.secondary">Access the PHPEngine application</Typography>
+						<Typography color="text.secondary">Access the PHEngine application</Typography>
 					</Box>
 					{errorMessage && <Alert severity="error">{errorMessage}</Alert>}
 					<TextField

+ 1 - 1
ui/app/src/features/home/HomePage.jsx

@@ -15,7 +15,7 @@ function HomePage({ session }) {
 			<Paper elevation={0} className="rounded-2xl border border-slate-200 p-6 sm:p-8">
 				<Stack spacing={2}>
 					<Typography variant="overline" color="primary">
-						PHPEngine workspace
+						PHEngine workspace
 					</Typography>
 					<Typography variant="h3" component="h1">
 						Welcome, {username}

+ 3 - 3
ui/app/src/features/shell/AppShell.jsx

@@ -35,7 +35,7 @@ const NAVIGATION_ICONS = {
 	Demo: DashboardOutlinedIcon,
 	Admin: AdminPanelSettingsOutlinedIcon,
 	Roles: SecurityOutlinedIcon,
-	'PHPEngine Settings': TuneOutlinedIcon,
+	'PHEngine Settings': TuneOutlinedIcon,
 	Users: PeopleOutlinedIcon,
 	'Inventory Monitor': Inventory2OutlinedIcon,
 };
@@ -207,7 +207,7 @@ function AppShell({ session, onNavigate, onLogout, children }) {
 				</Box>
 				<Box>
 					<Typography sx={{ color: 'navigation.contrastText', fontSize: '0.9375rem', fontWeight: 700 }}>
-						PHPEngine
+						PHEngine
 					</Typography>
 					<Typography variant="overline" sx={{ color: 'navigation.muted', display: 'block', lineHeight: 1.3 }}>
 						Console
@@ -277,7 +277,7 @@ function AppShell({ session, onNavigate, onLogout, children }) {
 							{headerLabel}
 						</Typography>
 						<Typography variant="h6" component="div" noWrap>
-							{isMobile ? 'PHPEngine' : activeItem?.name ?? 'PHPEngine'}
+							{isMobile ? 'PHEngine' : activeItem?.name ?? 'PHEngine'}
 						</Typography>
 					</Box>
 					<NotificationMenu onNavigate={onNavigate} />

+ 4 - 4
ui/app/src/routes.jsx

@@ -19,7 +19,7 @@ const ROUTES = {
 	'/home': HomePage,
 	'/inventory': DemoPage,
 	'/admin': () => <RoutePlaceholder title="Administration" />,
-	'/admin/phpengine-settings': ConfigPage,
+	'/admin/phengine-settings': ConfigPage,
 	'/admin/users': UsersPage,
 	'/admin/roles': RolesPage,
 };
@@ -37,7 +37,7 @@ function RoutePlaceholder({ title }) {
 			<Paper elevation={0} className="rounded-2xl border border-slate-200 p-6 sm:p-8">
 				<Stack spacing={2}>
 					<Typography variant="overline" color="primary">
-						PHPEngine
+						PHEngine
 					</Typography>
 					<Typography variant="h3" component="h1">
 						{title}
@@ -214,8 +214,8 @@ function AppRoutes() {
 				<Route element={<RoleRoute session={session} roleId={ADMIN_ROLE_ID} />}>
 					<Route path="/admin" element={<RouteContent path="/admin" session={session} />} />
 					<Route
-						path="/admin/phpengine-settings"
-						element={<RouteContent path="/admin/phpengine-settings" session={session} />}
+						path="/admin/phengine-settings"
+						element={<RouteContent path="/admin/phengine-settings" session={session} />}
 					/>
 					<Route path="/admin/users" element={<RouteContent path="/admin/users" session={session} />} />
 					<Route path="/admin/roles" element={<RouteContent path="/admin/roles" session={session} />} />