Explorar o código

removed references to psa project #2

Medowar hai 1 mes
pai
achega
f62663ef10

+ 1 - 4
README.md

@@ -67,12 +67,11 @@ keinen Zugriff auf dieses Repository braucht.
 
 Serverseitig, in `docs/`:
 
-- [ARCHITECTURE.md](docs/ARCHITECTURE.md) – Aufbau, Datenfluss, Speicherformate, Herkunft des Codes
+- [ARCHITECTURE.md](docs/ARCHITECTURE.md) – Aufbau, Datenfluss, Speicherformate
 - [SERVER_SETUP.md](docs/SERVER_SETUP.md) – Installation, Webserver, Limits, S3
 - [INSTANCE_MANAGEMENT.md](docs/INSTANCE_MANAGEMENT.md) – Instanzen, Tokens, Übergabe des Client-Pakets
 - [RELEASING.md](docs/RELEASING.md) – Pakete bauen und veröffentlichen
 - [CONFIG_REFERENCE.md](docs/CONFIG_REFERENCE.md) – alle Serverkonstanten
-- [MIGRATION_PSA.md](docs/MIGRATION_PSA.md) – was eine spätere Ablösung im PSA-Bestellsystem bedeuten würde
 
 Für Projekte, in `client-package/docs/`: Quickstart, Integration, Konfiguration,
 Funktions-API, Backup-Quellen, Paketbau, Post-Update-Hooks, Protokoll, Fehlersuche,
@@ -94,6 +93,4 @@ Im Browser lesbar über `docs/index.php` beziehungsweise `client-package/docs/in
 
 ## Hinweise
 
-- Das PSA-Bestellsystem wurde beim Herauslösen nicht verändert und läuft unverändert
-  gegen seine bisherigen Server weiter.
 - Kein automatisiertes Test-/CI-Setup vorgesehen.

+ 1 - 1
admin/instances.php

@@ -88,7 +88,7 @@ define("MANAGE_TOKEN",      "<?php echo manageEscape($newToken); ?>");</pre>
         <div class="form-group">
             <label for="new_instance">Kennung</label>
             <input type="text" id="new_instance" name="new_instance" required
-                   pattern="[A-Za-z0-9][A-Za-z0-9._\-]*" maxlength="120" placeholder="psa-prod">
+                   pattern="[A-Za-z0-9][A-Za-z0-9._\-]*" maxlength="120" placeholder="example-prod">
             <p class="hint">Buchstaben, Zahlen, Punkt, Unterstrich, Bindestrich.</p>
         </div>
         <div class="form-group">

+ 2 - 2
api/v1/manifest.php

@@ -5,8 +5,8 @@ declare(strict_types=1);
 // GET api/v1/manifest.php
 // Returns the release the calling instance should install.
 //
-// Unlike the PSA update server this endpoint requires a valid instance token;
-// release metadata is no longer public.
+// This endpoint requires a valid instance token; release metadata is not
+// public.
 
 require_once __DIR__ . "/../../includes/api.php";
 require_once __DIR__ . "/../../includes/releases.php";

+ 2 - 3
assets/css/style.css

@@ -1,8 +1,7 @@
 /*
  * Manage admin UI. Single hand-written stylesheet, no framework and no build
- * step, following the same custom-property approach as the PSA order system
- * (docs/STYLE_SYSTEM.md there). Neutral palette, because this is an operations
- * tool rather than a branded surface.
+ * step, built on custom properties. Neutral palette, because this is an
+ * operations tool rather than a branded surface.
  */
 
 :root {

+ 1 - 1
client-package/docs/03_CONFIG_REFERENCE.md

@@ -40,7 +40,7 @@ Konfigurationsfehler. Lokale Backups funktionieren trotzdem, sofern
 
 Zwei Varianten werden unterstützt.
 
-PHP-Datei mit Konstante (wie im PSA-Bestellsystem):
+PHP-Datei mit Konstante:
 
 ```php
 define("MANAGE_VERSION_FILE", MANAGE_APP_ROOT . "/includes/version.php");

+ 2 - 2
client-package/docs/index.php

@@ -4,8 +4,8 @@ declare(strict_types=1);
 
 /**
  * Documentation viewer (Markdown -> HTML via the vendored marked.js).
- * Adapted from the PSA order system (docs/index.php). Self-contained: no build
- * step and no external requests, so it also works from an unpacked ZIP.
+ * Self-contained: no build step and no external requests, so it also works
+ * from an unpacked ZIP.
  */
 
 $docsDir = __DIR__;

+ 1 - 1
client-package/manage-client/config.sample.php

@@ -17,7 +17,7 @@ define("MANAGE_SERVER_URL", "https://manage.example.org");
 
 // Instance id and token, both shown when the instance is created on the server
 // (Instanzen -> Instanz anlegen). The token is displayed exactly once.
-define("MANAGE_INSTANCE", "psa-prod");
+define("MANAGE_INSTANCE", "example-prod");
 define("MANAGE_TOKEN", "");
 
 // Seconds per HTTP request. Package downloads and backup uploads use the long

+ 2 - 4
client-package/manage-client/lib/backup.php

@@ -5,10 +5,8 @@ declare(strict_types=1);
 // Client-side backup: collecting sources, writing the archive, local retention
 // and uploading to the manage server.
 //
-// Ported from the PSA order system (includes/backup.php). The one structural
-// change is that the source list is no longer hardcoded to data/*.json plus
-// data/uploads/**: it comes from MANAGE_BACKUP_SOURCES, plus an optional SQL
-// dump when MANAGE_BACKUP_DATABASE is configured.
+// The source list is not hardcoded: it comes from MANAGE_BACKUP_SOURCES, plus
+// an optional SQL dump when MANAGE_BACKUP_DATABASE is configured.
 
 function manageBackupDir(): string
 {

+ 1 - 1
client-package/manage-client/lib/mysql.php

@@ -9,7 +9,7 @@ declare(strict_types=1);
 // bounded by disk rather than memory_limit.
 //
 // Active only when MANAGE_BACKUP_DATABASE is configured. Projects without a
-// database (like the PSA order system) leave it at null and never touch this.
+// database leave it at null and never touch this.
 
 function manageDatabaseConfigured(): bool
 {

+ 3 - 4
client-package/manage-client/lib/remote.php

@@ -2,11 +2,10 @@
 
 declare(strict_types=1);
 
-// Extra backup destinations besides the manage server. Ported from the PSA
-// order system (includes/backup.php): s3, sftp and custom.
+// Extra backup destinations besides the manage server: s3, sftp and custom.
 //
-// The old "managed" target type is gone: uploading to the manage server is now
-// built in (manageBackupUpload) and configured through MANAGE_SERVER_URL /
+// There is no "managed" target type: uploading to the manage server is built
+// in (manageBackupUpload) and configured through MANAGE_SERVER_URL /
 // MANAGE_INSTANCE / MANAGE_TOKEN instead of a target entry.
 
 function manageRemoteTargets(): array

+ 4 - 5
client-package/manage-client/lib/updater.php

@@ -4,11 +4,10 @@ declare(strict_types=1);
 
 // Update pipeline: check, download, verify, extract, deploy, post-update hook.
 //
-// Ported from the PSA order system (admin/updater.php) with the HTML stripped
-// out and three hardcoded assumptions made configurable:
-//   - the version file (was includes/version.php with APP_VERSION)
-//   - the protected paths (was config.php, data/, .git/)
-//   - the package sanity marker (was index.php / admin/ / includes/)
+// Everything host-specific is configurable:
+//   - the version file (for example includes/version.php with APP_VERSION)
+//   - the protected paths (for example config.php, data/, .git/)
+//   - the package sanity marker (for example index.php / admin/ / includes/)
 //
 // Deployment is an overlay copy: every file in the package is written over the
 // application root, with each overwritten file copied aside first. Files that

+ 4 - 6
client-package/manage-client/lib/zip.php

@@ -2,13 +2,11 @@
 
 declare(strict_types=1);
 
-// Pure-PHP ZIP writer. Ported from the PSA order system (includes/backup.php),
-// which builds the archive with pack() rather than requiring ext-zip, exec or
-// a temp copy of the whole archive in memory.
+// Pure-PHP ZIP writer. Builds the archive with pack() rather than requiring
+// ext-zip, exec or a temp copy of the whole archive in memory.
 //
-// One addition against the original: optional deflate compression (method 8).
-// The original stored everything uncompressed, which is fine for JPEGs but
-// wasteful for the SQL dumps this client can now produce.
+// Deflate compression (method 8) is optional: storing everything uncompressed
+// is fine for JPEGs but wasteful for the SQL dumps this client can produce.
 //
 // Limits (no Zip64): 4 GB per entry, 4 GB per archive, 65535 entries.
 

+ 2 - 2
client-package/manage-client/ui/panel.php

@@ -5,8 +5,8 @@ declare(strict_types=1);
 // Drop-in admin page for the host application.
 //
 // The host is expected to have established its own session and authentication
-// BEFORE including this file. The default guard below matches the PSA order
-// system; adjust it to whatever the host project uses (see 02_INTEGRATION.md).
+// BEFORE including this file. Adjust the default guard below to whatever the
+// host project uses (see 02_INTEGRATION.md).
 //
 // Typical integration, as myproject/admin/manage.php:
 //

+ 2 - 2
config.sample.php

@@ -12,10 +12,10 @@
 // Product
 // ---------------------------------------------------------------------------
 // One manage deployment serves exactly one product. Deploy it again for another.
-define("MANAGE_PRODUCT_NAME", "PSA Orderform");
+define("MANAGE_PRODUCT_NAME", "Example Orderform");
 
 // Prefix for stored release packages: <prefix>-vX.Y.Z.zip
-define("MANAGE_PACKAGE_PREFIX", "psa-orderform");
+define("MANAGE_PACKAGE_PREFIX", "example-orderform");
 
 // ---------------------------------------------------------------------------
 // Public URL

+ 2 - 20
docs/ARCHITECTURE.md

@@ -58,7 +58,7 @@ und die vollständig fehlende Client-Identität des Update-Servers.
 {
     "instances": [
         {
-            "id": "psa-prod",
+            "id": "example-prod",
             "label": "Stadt Freising Produktiv",
             "enabled": true,
             "token_hash": "…",
@@ -95,7 +95,7 @@ daneben in `packages/`:
     "releases": {
         "v1.3.0": {
             "version": "v1.3.0",
-            "package": "packages/psa-orderform-v1.3.0.zip",
+            "package": "packages/example-orderform-v1.3.0.zip",
             "sha256": "…",
             "size": 2199,
             "published_at": "…"
@@ -161,24 +161,6 @@ Uploads wäre eine Sperre nötig.
 Die JSONL-Protokolle rotieren nach `MANAGE_LOG_MAX_BYTES` und werden nach
 `MANAGE_LOG_MAX_AGE_SECONDS` entfernt.
 
-## Herkunft
-
-Der Code stammt aus dem PSA-Bestellsystem und wurde beim Herauslösen
-verallgemeinert:
-
-| Hier | Ursprung |
-|---|---|
-| `includes/s3.php` | `backup-server/s3.php` |
-| `includes/backups.php` | `backup-server/lib.php` |
-| `includes/releases.php` | `update-server/manage.php`, `update-server/manifest.php` |
-| `includes/auth.php` | die Anmeldeteile beider Vorgänger-Oberflächen |
-| `includes/storage.php`, `log.php`, `ratelimit.php` | `includes/functions.php` |
-| `client-package/manage-client/lib/updater.php` | `admin/updater.php` |
-| `client-package/manage-client/lib/backup.php`, `zip.php`, `remote.php` | `includes/backup.php` |
-
-Das PSA-Bestellsystem wurde dabei nicht verändert und läuft unverändert gegen seine
-bisherigen Server weiter. Siehe [MIGRATION_PSA](MIGRATION_PSA.md).
-
 ## Weiter
 
 - [SERVER_SETUP](SERVER_SETUP.md) – Installation

+ 2 - 2
docs/CONFIG_REFERENCE.md

@@ -121,8 +121,8 @@ Bedarf von Hand gekürzt.
 ```php
 <?php
 
-define("MANAGE_PRODUCT_NAME", "PSA Orderform");
-define("MANAGE_PACKAGE_PREFIX", "psa-orderform");
+define("MANAGE_PRODUCT_NAME", "Example Orderform");
+define("MANAGE_PACKAGE_PREFIX", "example-orderform");
 define("MANAGE_PUBLIC_URL", "https://manage.example.org");
 define("MANAGE_ADMIN_PASSWORD_HASH", '$2y$12$…');
 ```

+ 2 - 2
docs/INSTANCE_MANAGEMENT.md

@@ -17,8 +17,8 @@ Alles dazu unter **Instanzen** in der Oberfläche.
 
 Kennungen dürfen Buchstaben, Zahlen, Punkt, Unterstrich und Bindestrich enthalten,
 müssen mit einem Buchstaben oder einer Zahl beginnen und höchstens 120 Zeichen lang
-sein. Sie erscheinen im Dateipfad der Backups; sprechende Namen wie `psa-prod` und
-`psa-test` zahlen sich aus.
+sein. Sie erscheinen im Dateipfad der Backups; sprechende Namen wie `example-prod` und
+`example-test` zahlen sich aus.
 
 ## Das Token
 

+ 2 - 2
docs/SERVER_SETUP.md

@@ -42,8 +42,8 @@ und ein Webserver. Kein Datenbankserver, kein Composer, kein Build-Schritt.
    gespeicherten Pakete und sollte zum Build-Skript des Projekts passen:
 
    ```php
-   define("MANAGE_PRODUCT_NAME", "PSA Orderform");
-   define("MANAGE_PACKAGE_PREFIX", "psa-orderform");
+   define("MANAGE_PRODUCT_NAME", "Example Orderform");
+   define("MANAGE_PACKAGE_PREFIX", "example-orderform");
    ```
 
 6. Schreibrechte auf `storage/` sicherstellen. Das Verzeichnis wird bei Bedarf

+ 2 - 2
docs/index.php

@@ -4,8 +4,8 @@ declare(strict_types=1);
 
 /**
  * Documentation viewer (Markdown -> HTML via the vendored marked.js).
- * Adapted from the PSA order system (docs/index.php). Self-contained: no build
- * step and no external requests, so it also works from an unpacked ZIP.
+ * Self-contained: no build step and no external requests, so it also works
+ * from an unpacked ZIP.
  */
 
 $docsDir = __DIR__;

+ 1 - 1
includes/api.php

@@ -7,7 +7,7 @@ declare(strict_types=1);
 // Protocol v1: every request carries the instance id and its secret token in
 // two headers. There is no session, no cookie and no shared password.
 //
-//   X-Manage-Instance: psa-prod
+//   X-Manage-Instance: example-prod
 //   X-Manage-Token:    <64 hex chars>
 
 require_once __DIR__ . "/bootstrap.php";

+ 2 - 3
includes/auth.php

@@ -2,9 +2,8 @@
 
 declare(strict_types=1);
 
-// Admin session, password check and CSRF for the management UI. Merges the two
-// near-identical login halves of the PSA update-server/manage.php and
-// backup-server/manage.php into one implementation.
+// Admin session, password check and CSRF for the management UI. One shared
+// implementation for the release and backup areas.
 
 require_once __DIR__ . "/bootstrap.php";
 

+ 1 - 2
includes/backups.php

@@ -3,8 +3,7 @@
 declare(strict_types=1);
 
 // Server-side backup storage: receiving, indexing, S3 archiving and the two
-// retention tiers. Ported from the PSA order system (backup-server/lib.php),
-// with the instance allowlist replaced by the token-authenticated registry in
+// retention tiers. Instances are authenticated against the token registry in
 // includes/instances.php.
 
 require_once __DIR__ . "/bootstrap.php";

+ 1 - 2
includes/log.php

@@ -2,8 +2,7 @@
 
 declare(strict_types=1);
 
-// JSONL logging with size-based rotation. Ported from the PSA order system
-// (includes/functions.php logError/logAccess/rotateLogFileIfNeeded).
+// JSONL logging with size-based rotation.
 
 function manageErrorLogFile(): string
 {

+ 1 - 2
includes/ratelimit.php

@@ -2,8 +2,7 @@
 
 declare(strict_types=1);
 
-// File-based per-IP rate limiting for hosting without Redis. Ported from the
-// PSA order system (includes/functions.php rateLimitEvaluate). State lives
+// File-based per-IP rate limiting for hosting without Redis. State lives
 // under storage/ratelimit/ and is therefore not web-readable.
 
 function manageRateLimitClientIp(): string

+ 2 - 3
includes/releases.php

@@ -2,10 +2,9 @@
 
 declare(strict_types=1);
 
-// Release storage and manifest handling. Ported from the PSA order system
-// (update-server/manage.php and update-server/manifest.php).
+// Release storage and manifest handling.
 //
-// Two deliberate changes against the original:
+// Two deliberate design decisions:
 //  - the package filename prefix is configurable (MANAGE_PACKAGE_PREFIX)
 //  - the package download URL is built from MANAGE_PUBLIC_URL instead of the
 //    client-controlled Host header

+ 2 - 3
includes/s3.php

@@ -3,9 +3,8 @@
 declare(strict_types=1);
 
 // Dependency-free client for S3-compatible object storage (AWS Signature V4).
-// Ported from the PSA order system (backup-server/s3.php) with the constant
-// prefix changed to MANAGE_S3_*. No SDK and no cURL are required; plain PHP
-// HTTPS streams are enough.
+// Configured through the MANAGE_S3_* constants. No SDK and no cURL are
+// required; plain PHP HTTPS streams are enough.
 
 require_once __DIR__ . "/bootstrap.php";
 

+ 2 - 4
includes/storage.php

@@ -2,10 +2,8 @@
 
 declare(strict_types=1);
 
-// Flat-file storage primitives. Ported from the PSA order system
-// (includes/functions.php readJsonFile/writeJsonFile): atomic writes via a
-// temp file plus rename, so a crashed request can never leave a half-written
-// index behind.
+// Flat-file storage primitives: atomic writes via a temp file plus rename, so
+// a crashed request can never leave a half-written index behind.
 
 function manageEnsureDirectory(string $dir): void
 {

+ 3 - 4
scripts/create-release-zip.sh

@@ -2,9 +2,8 @@
 #
 # Builds a release package for a managed project.
 #
-# Generalized from the PSA order system (scripts/create-update-zip.sh): the
-# product name, the version file and the exclude list are variables at the top
-# instead of hardcoded paths.
+# The product name, the version file and the exclude list are variables at the
+# top instead of hardcoded paths.
 #
 # Copy this script into the project it builds, adjust the CONFIGURATION block,
 # and run it from the project root:
@@ -20,7 +19,7 @@ set -euo pipefail
 # --- CONFIGURATION ----------------------------------------------------------
 
 # Package name prefix. Must match MANAGE_PACKAGE_PREFIX on the manage server.
-PRODUCT="psa-orderform"
+PRODUCT="example-orderform"
 
 # File holding the installed version, relative to the project root.
 VERSION_FILE="includes/version.php"