Server part for update and backup management
|
|
hai 1 mes | |
|---|---|---|
| admin | hai 1 mes | |
| api | hai 1 mes | |
| assets | hai 1 mes | |
| client-docs | hai 1 mes | |
| client-package | hai 1 mes | |
| docs | hai 1 mes | |
| includes | hai 1 mes | |
| scripts | hai 1 mes | |
| .gitignore | hai 1 mes | |
| .htaccess | hai 1 mes | |
| README.md | hai 1 mes | |
| config.sample.php | hai 1 mes | |
| index.php | hai 1 mes |
Update and backup server for PHP projects, plus a redistributable client package.
Multiple independent PHP projects need the same two things: a way to roll out
new versions, and regular backups of operational data. manage provides both
centrally instead of building them into each project again.
One installation serves one product with a manageable number of
instances. For another product, manage is deployed again.
.htaccess enabled, or nginx with the
equivalent locks set)storage/No database, no Composer, no build step, no external libraries.
config.php (from config.sample.php)admin/api/v1/includes/storage/ (not public)client-package/config.sample.php to config.php.MANAGE_ADMIN_PASSWORD_HASH:
php -r 'echo password_hash("…", PASSWORD_DEFAULT), PHP_EOL;'MANAGE_PUBLIC_URL to the absolute address of this installation.MANAGE_PRODUCT_NAME and MANAGE_PACKAGE_PREFIX to the product being
served.storage/ is writable.admin/login.php and check under Settings → Diagnostics that
everything essential checks out.Details: docs/SERVER_SETUP.md.
./scripts/build-client-package.sh --server-url https://manage.example.orgmanage-client/, create config.php, run
php manage-client/bin/manage-client.php status.The complete guide for this lives inside the package itself (client-package/README.md), so the receiving side needs no access to this repository.
Server-side, in docs/:
For projects, in client-package/docs/: quickstart, integration,
configuration, function API, backup sources, packaging, post-update hooks,
protocol, troubleshooting, security.
Readable in the browser via docs/index.php and
client-package/docs/index.php respectively (Markdown rendered with the
bundled marked).
client-docs/ publishes the content of client-package/ over HTTP: every
chapter and every source file as its own page, plus the interface as
OpenAPI. Unlike admin/ and api/v1/, this folder is reachable without
logging in — it exists to be handed out, so a project can be integrated
without shipping a ZIP first.
| Address | Content |
|---|---|
client-docs/ |
overview, from there a chapter or a source file |
client-docs/index.php?doc=01_QUICKSTART |
one chapter |
client-docs/index.php?code=manage-client/lib/updater.php |
one source file |
client-docs/api.php |
protocol v1 in Swagger UI |
client-docs/openapi.php |
the OpenAPI document alone, for code generators |
For programs, the same pages exist as plain Markdown under llms.php, with
llms.php?doc=… and llms.php?code=… alongside. client-docs/llms.php is
the index: it names every page with a one-sentence description and its size,
and for the usual tasks — integrate the client, backups only, updater only,
write your own client, troubleshooting — lists the short set of pages that
suffices. That is the point of the split: load only what is needed. This is
the address to hand to an LLM. Apache additionally answers llms.txt;
llms.php is canonical, because that works without mod_rewrite.
The pages for humans render their Markdown in the browser and carry a comment and an invisible element in the source that point to the Markdown version of the same page — a program that lands there by accident finds its way.
The content is read from client-package/ on every request; there is
nothing to build and nothing to regenerate. manage-client/config.php is
excluded from publication, so a locally created token never becomes public.
marked and Swagger UI live under client-docs/assets/ in the repository. No
external server is contacted, not even for fonts or icons.