- DevCraft Platform
- Documentation
- Operations
Using the platform
Operations
This page covers running a DevCraft Platform instance from day to day: system logs and their retention, XML record export and import, the metadata cache, the platform:* console commands, configuration in backend/config/platform.php, health checks and performance notes. It is written for administrators and developers who operate the Docker stack today. It also says plainly what does not exist yet: production deployment and backups.
Services and processes
The local stack is defined in compose.yaml at the repository root and started with docker compose up -d. PHP runs only inside these containers. See Getting started for the first start.
| Service | What it runs | Notes |
|---|---|---|
api | php artisan serve --host=0.0.0.0 --port=8000 --no-reload | The REST API on port 8000. PHP_CLI_SERVER_WORKERS=4, because a background script calls the API back while its own request is still open. --no-reload is needed for the worker setting; restart the container after changing backend/.env. |
scheduler | php artisan schedule:work | Fires the scheduled commands (log retention, preview and remote-set cleanup). See The scheduler. |
runner | The isolated script runner (Node) | Executes background scripts only. Read-only filesystem, memory and process limits. See Scripting and flows. |
pgsql | PostgreSQL 17 | The platform database. |
redis | Redis 7 | Cache store (including the metadata cache) and queue connection. |
mailpit | Local mail catcher | Web UI on http://localhost:8025; development only. |
Backend tests run only through scripts/backend-test.sh. It uses a dedicated devcraft_test database, a second pass on SQLite and test-only drivers. Plain php artisan test inside the container would run against the development database and the shared Redis cache, and would wipe your data.
System logging
Implemented System logs are operational diagnostics: errors, warnings, notable events. They are written by App\Platform\Logging\SystemLogger to two places at once:
- the Laravel log channel (files, stderr or JSON lines, whatever the deployment configured), for every event;
- the
syslogtable in PostgreSQL, for events at or abovePLATFORM_LOG_PERSIST_LEVEL(defaultinfo).
Why both: the table makes logs a platform object that any administrator can filter in the browser, correlated with users and records, without shell access. The channel keeps the deployment's own pipeline (container stderr, log shipping) and is the fallback when the database is the problem. SystemLogger never throws. A failed table write is reported once to the channel and swallowed, and the request continues.
Logs are not audit history
| Capability | Where it lives | Retention |
|---|---|---|
| System logs | syslog, written by SystemLogger | 7 days by default |
| Audit history (who changed which field) | sys_audit, written by AuditWriter inside the write transaction | Durable; never touched by log cleanup |
| Script execution output | sys_script_execution.logs | Kept with the execution history |
| Performance metrics | Not implemented | Planned |
Ordinary log events are never written to sys_audit.
Emitting events from backend code
Inject SystemLogger and name the component with withSource(). Do not call Log:: directly for platform events.
public function __construct(private readonly SystemLogger $logger) {}
$this->logger->withSource('transfer.import')->info('XML import applied on asset', ['table' => 'asset', 'summary' => $summary, 'duration_ms' => $elapsed]);
$this->logger->withSource('scripts.runner')->warning('Background script was not executed: runner unavailable', ['status' => 'unavailable']);
$this->logger->exception($e, 'Processing failed', ['record_id' => $id, 'table' => 'incident']);
$this->logger->forExecution($executionId, 'flows')->error('Step failed', ['step' => 'approve']);
Sources are dotted and lower-case, one per subsystem: http, auth, transfer, transfer.import, packaging, remote, scripts.runner, logging.retention. The default is platform.
Rules: a message is a short fixed sentence. Values that change per event go into the context, where they are searchable and redacted when sensitive. Never log request bodies, documents, passwords, tokens or e-mail addresses. Log once per event.
Reserved context keys
These keys map to their own columns and are removed from the stored JSON context. Everything else is sanitised and stored in context.
| Key | Column |
|---|---|
source | source (overrides withSource) |
execution_id | execution_id |
correlation_id | correlation_id |
table, record_id | table_name, record_id |
duration_ms | duration_ms |
http_status | http_status |
user_id | sys_created_by (otherwise the authenticated caller) |
exception (a Throwable) | exception_class, exception_message, exception_trace |
Levels
PSR-3 names, stored lower-case. alert and emergency are folded into critical.
| Level | Use it for | Persisted by default |
|---|---|---|
debug | Development detail, timings of ordinary steps, XML import previews | No (channel only) |
info | Notable expected operations: an import applied, logs pruned | Yes |
notice | Security-relevant but normal: a sign-in, an unauthenticated request, a rate limit, a refused document | Yes |
warning | Failed sign-in, forbidden request, runner unavailable, import rolled back | Yes |
error | An operation failed: unhandled exception (5xx), runner error | Yes |
critical | The platform cannot do its job | Yes |
Request and correlation ids
AssignRequestId is the first middleware of every request. It sets two ids, echoes both as response headers and stores them, with the HTTP method and path, in LogContext so every event of the request carries them:
X-Request-Ididentifies one request. A well-formed value from the caller (8 to 64 characters of[A-Za-z0-9._-]) is kept; otherwise a UUIDv7 is generated.X-Correlation-Ididentifies one client operation across several requests. Same format; when absent it equals the request id.
Error responses also carry the request id as requestId, so a user can quote it and an administrator can find the event with a filter on request_id. A background script run sets the execution id for its duration, so platform-side events of the run share it.
Sanitisation
ContextSanitizer runs on every event before it is stored or mirrored to the channel:
- Keys matching password, secret, token, authorization, cookie, session, api key, credential, private key, bearer, CSRF or XSRF (any depth, case-insensitive) are replaced by
[redacted]. - Values shaped like
Bearer …orBasic …are redacted. In exception messages and traces, bearer tokens andpassword=,token=,api_key=pairs are redacted, and the application base path is removed. - Bounds: strings and messages 2,000 characters, traces 16,000, depth 6, 200 entries per array. Longer values are truncated with a marker.
- Shape: only scalars and arrays are stored. Objects become a short description, invalid UTF-8 becomes
[binary N bytes], and control characters other than newline and tab are removed (log injection).
Never logged: request bodies, uploaded documents, passwords, tokens, session ids, e-mail addresses on failed sign-ins (the account id is logged when the account exists).
What is persisted today
| Event | Level, source | Emitted by |
|---|---|---|
| Unhandled exception rendered as a 5xx problem | error, http | ProblemDetails |
| Unauthenticated request (401) | notice, auth | ProblemDetails |
| Forbidden (403) | warning, auth | ProblemDetails |
| Account locked (423), rate limited (429) | warning, auth / notice, http | ProblemDetails |
Refused XML document (xml_invalid, xml_unsupported_version, transfer_too_large) | notice, transfer | ProblemDetails |
Refused update set package (package_*), failed remote operation (remote_*) | notice, packaging / remote | ProblemDetails |
| Sign-in failed / signed in | warning / notice, auth | AuthController |
XML import applied or rolled back (preview at debug) | info / warning, transfer.import | TransferController |
| Runner unavailable / runner error | warning / error, scripts.runner | ScriptRunner |
| Retention runs that deleted rows | info, logging.retention, packaging.retention, remote.retention | Console commands |
Not persisted on purpose: validation failures (422), not found (404), conflicts (409), invalid queries (400) and successful reads and writes. The audit trail covers writes.
Reading logs: the syslog table
syslog is an adopted physical table, seeded by SystemTablesSeeder::seedSyslog, with managed_by: system. Its core columns (time, level, message, source) follow the platform baseline. The other columns are DevCraft decisions, and every baseline table and field is traceable in the provenance analysis.
- In the browser: Administration → System Logs opens the generic list at
/syslog/list. It shows the newest first, 25 rows per page, with the normal filter builder, search (message, source, exception message), column personalisation and URL state, for example/syslog/list?q=level=error^source=http. A row opens the read-only form at/syslog/{id}. There is no separate log viewer. - Through the API:
GET /api/v1/table/syslogwith the usual list parameters.POST,PATCHandDELETEanswer 403, because the platform manages the rows. - Access: the table's role lists are empty, so only
admincan read it (deny by default).exception_traceandcontextalso carry field-level read access foradminonly.
Main columns: sys_created_at (UTC, millisecond precision), sys_created_by, level, source, message, environment, request_id, correlation_id, execution_id, http_method, route, http_status, duration_ms, exception_class, exception_message, exception_trace, context, table_name, record_id. B-tree indexes cover time, level, source and user (each with time), and the correlation identifiers.
Log retention and the scheduler
Retention is configuration only: PLATFORM_LOG_RETENTION_DAYS (default 7) for every row, and PLATFORM_LOG_DEBUG_RETENTION_DAYS (default 2, never longer than the general value) for persisted debug rows.
docker compose exec api php artisan platform:logs:prune
docker compose exec api php artisan platform:logs:prune --days=3 --batch=1000 --max-batches=50
- Deletes
syslogrows withsys_created_atstrictly beforenow() - retention(UTC), oldest first, in batches of at most--batchids (default 1,000, capped at 10,000). Each batch is its own short statement. - Stops after
--max-batches(default 50) and prints "more remain, run again". Running it repeatedly is safe: nothing newer than the cutoff is selected. Retention is at least one day. - Touches
syslogonly.sys_audit,sys_script_executionand every other table are left alone. - Writes one
infoevent (logging.retention) when it deleted something.
Schedule (backend/routes/console.php, all with withoutOverlapping):
| Command | When |
|---|---|
platform:logs:prune | Daily at 03:15 |
platform:packages:prune-previews | Hourly |
platform:remote-sets:prune | Daily at 03:45 |
The schedule only fires where a scheduler process runs. Locally that is the compose scheduler service (php artisan schedule:work); start it with docker compose up -d scheduler. In production it is either a cron entry that calls php artisan schedule:run once a minute, or a long-running container like the compose service. Check what is registered with:
docker compose exec api php artisan schedule:list
Growth: one persisted event is a few hundred bytes to a few kilobytes. The volume is driven by failed requests. A client that hits 403 at the rate limit (120 per minute) adds about 170,000 rows per day until fixed. Seven days of retention keeps that well below the point where partitioning would matter, so partitioning and archiving are deliberately absent.
XML record transfer
Implemented Records can be exported and imported as XML in DevCraft's own format, devcraft-record-xml 1.0 (backend App\Platform\Transfer, frontend src/components/transfer). Use it to move records between instances, keep reference data in source control or hand a record to a colleague. It carries record data only. Configuration travels in update sets; see Update sets.
Export
| What | Endpoint | In the UI |
|---|---|---|
| One record | GET /api/v1/table/{table}/{id}/export | Record form → menu → Export XML |
| Selected records | POST /api/v1/table/{table}/export with { "ids": [...] } | List → Export XML → Selected records |
| Records of a filter | POST /api/v1/table/{table}/export with { "filters": [...], "match": "and|or", "search": "..." } | List → Export XML → Records matching the current filter |
- Exports read through
TableController::resolveandRecordQuery, exactly like a list. Table access and the caller's field projection apply, so hidden fields are absent from the document and invisible ids are simply missing. - At most
TRANSFER_EXPORT_MAX_RECORDS(default 5,000) records per document. The count is checked before streaming; above it the answer is 413transfer_too_large. Export larger sets in parts. - Selections are read in pages of 500 and streamed with
XMLWriter. The response isapplication/xmlwithContent-Disposition: attachment,X-Content-Type-Options: nosniff,Cache-Control: no-storeand anX-Record-Countheader. - Output is deterministic: fields in name order, records in ascending id order, numbers and JSON in canonical form. Two exports of the same data differ only in
exported-at, so files diff cleanly. - A record exported through a parent table is written with its actual class and all its effective fields. A caller who may read the parent but not the class gets only the parent's fields and
partial="true".
The format
<?xml version="1.0" encoding="UTF-8"?>
<devcraft-records format="devcraft-record-xml" version="1.0" exported-at="2026-10-10T12:00:00Z" instance="DevCraft Platform 0.2.0-dev" count="1">
<record table="asset" id="0192f1a2-7d3e-7000-8000-000000000001" display="AST00001" version="2"
created-at="2026-10-10T10:00:00.000Z" updated-at="2026-10-10T11:30:00.000Z">
<field name="asset_tag" type="string">AST00001</field>
<field name="assigned_to" type="reference" table="sys_user" display="example.user">0192f1a2-7d3e-7000-8000-0000000000aa</field>
<field name="managed" type="boolean">false</field>
<field name="notes" type="text" null="true"/>
<field name="purchase_cost" type="decimal">1450.5</field>
<field name="state" type="choice">in_stock</field>
</record>
</devcraft-records>
record@table,record@id- The record's actual class and its UUID. The id is what records are matched by on import. A hand-written record without an id can only be inserted.
record@display,@version,@created-*,@updated-*- Informational only. Never applied on import; the receiving instance sets its own system fields.
field@type- The dictionary type at export time. On import a type that differs from the dictionary fails the record, which catches schema drift early.
field@null="true",field@protected="true"- A null value; a value the exporter withheld (today:
sys_property.valuewhen the property type ispassword). Protected fields are ignored on import with a notice.
Values use exactly the text the field types accept: true/false, digits, decimals without exponent, dates YYYY-MM-DD, date-times in UTC YYYY-MM-DDTHH:MM:SS.mmmZ, choice values (never labels), reference UUIDs, canonical JSON. Readers accept every 1.x document and refuse other major versions with xml_unsupported_version.
Import with dry-run preview
POST /api/v1/table/{table}/import?mode=insert|update|upsert&dryRun=1|0&atomic=1|0
Content-Type: application/xml (or multipart/form-data with the field "file")
modeis required.dryRundefaults to 1 andatomicdefaults to 1, so a call without flags only previews.- The UI (Import XML… in the list of a table you may write) always sends the file twice: first as a dry run that shows every record's planned outcome, then, after you confirm, for real with the same options. The server keeps no state between the two calls.
- The whole import is one database transaction. A dry run always rolls back. With
atomic=1one failed record rolls everything back (applied: false, every outcome still listed). Withatomic=0valid records are committed and failures reported. - Every value goes through
RecordWriter, so validation, mandatory and uniqueness checks, reference existence, field write access, defaults and the audit trail (sourceimport) are the same as for the Table API. - Document ids are preserved: a new record is created with the id from the document (
RecordWriter::create(..., $id)), provided the id is unused across the class hierarchy. References therefore survive the move. - Records are applied in document order; a parent must come before its children.
| Situation | insert | update | upsert |
|---|---|---|---|
| Id exists in the class | skipped exists | updated | updated |
| Id exists in another class of the hierarchy | failed class_mismatch | failed class_mismatch | failed class_mismatch |
| Id does not exist | created with that id | skipped missing | created with that id |
| No id in the document | created with a new id | skipped missing_id | created with a new id |
The answer is always 200 with one outcome per record; document-level problems use error codes (see below).
{
"table": "asset", "mode": "upsert", "dryRun": true, "atomic": true, "applied": false, "timedOut": false,
"document": { "version": "1.0", "exportedAt": "2026-10-10T12:00:00Z", "instance": "DevCraft Platform 0.2.0-dev", "records": 2 },
"summary": { "total": 2, "created": 1, "updated": 0, "skipped": 0, "failed": 1 },
"records": [
{ "index": 1, "table": "asset", "id": "0192…", "display": "AST00001", "outcome": "created", "reason": null,
"message": null, "errors": {}, "notices": [], "changes": ["asset_tag", "name"] },
{ "index": 2, "table": "asset", "id": "0192…", "display": "AST00002", "outcome": "failed", "reason": "invalid",
"message": "The record did not pass validation.", "errors": { "category": ["Category must be one of: …"] },
"notices": [], "changes": [] }
],
"elapsedMs": 41
}
outcome is created, updated, skipped or failed. reason is one of exists, missing, missing_id, unchanged, duplicate, invalid, invalid_id, class_mismatch, wrong_table, unknown_table, forbidden, database, time_limit.
Parser safety and limits
RecordXmlParserusesXMLReaderwith network access, entity substitution and DTD loading turned off. AnyDOCTYPEis refused before a record is read, and entity references in content are refused too. This closes external entities and entity expansion attacks. Nothing is deserialised into objects and nothing is executed.- Structure is validated strictly; field names must match
[a-z][a-z0-9_]{0,79}and are looked up in the metadata cache, so nothing from the document reaches SQL as an identifier. - Importing needs table read and write access on the target and on every class a record resolves to, plus the
table:writetoken ability. Tables withmanaged_bystay read-only, also for administrators.
Key in platform.transfer | Variable | Default | Error when exceeded |
|---|---|---|---|
export_max_records | TRANSFER_EXPORT_MAX_RECORDS | 5000 | 413 transfer_too_large |
import_max_bytes | TRANSFER_IMPORT_MAX_BYTES | 5242880 (5 MB) | 413 transfer_too_large |
import_max_records | TRANSFER_IMPORT_MAX_RECORDS | 2000 | 413 transfer_too_large |
import_time_limit_s | TRANSFER_IMPORT_TIME_LIMIT | 60 seconds | Remaining records skipped time_limit, nothing applied |
PHP's own post_max_size and upload_max_filesize still apply on top. Other document errors: 400 xml_invalid, 422 xml_unsupported_version, 422 validation_failed for a bad mode.
The metadata cache
App\Platform\Metadata\MetadataRepository is the only way runtime code gets a table or field definition. It returns the effective TableSchema (inherited fields, overrides, access, numbering) and caches each schema forever in the configured cache store (Redis in the Docker stack). Misses are not cached, because a table may be created a moment later.
Invalidation bumps a version key, meta:version, in the shared store, so every PHP process sees new definitions on its next lookup. MetadataWriter invalidates after every dictionary write and the platform metadata seeder invalidates when it finishes, so in normal operation you never clear the cache by hand.
Clear it when the database was reset underneath a running instance, for example after migrate:fresh while Redis kept the old dictionary:
docker compose exec api php artisan migrate:fresh
docker compose exec api php artisan platform:meta:cache-clear
# or seed, which also invalidates the cache
docker compose exec api php artisan db:seed
The command prints the new cache version. If the SPA still shows stale tables afterwards, check that CACHE_STORE and REDIS_HOST in backend/.env match the compose file (see Services and processes).
Platform console commands
All platform:* commands are defined as closures in backend/routes/console.php. Run them in the api container.
| Command | Options (defaults) | What it does | Scheduled |
|---|---|---|---|
platform:meta:cache-clear | none | Forgets every cached table definition by bumping meta:version. | No |
platform:logs:prune | --days (PLATFORM_LOG_RETENTION_DAYS), --debug-days, --batch=1000, --max-batches=50 | Deletes expired syslog rows in bounded batches. | Daily 03:15 |
platform:packages:prune-previews | --batch=200, --max-batches=50 | Deletes expired update set package previews (sys_package_preview*). A preview lives PACKAGE_PREVIEW_TTL_HOURS (24) hours. | Hourly |
platform:remote-sets:prune | --days (REMOTE_REJECTED_RETENTION_DAYS, 30), --batch=100 | Removes the stored package content of rejected remote update sets after the retention period. Metadata and assessment stay. | Daily 03:45 |
Each retention command writes one info system log event when it removed something. Other useful framework commands: schedule:list, migrate, db:seed (roles, platform metadata, the first administrator from PLATFORM_ADMIN_EMAIL and PLATFORM_ADMIN_PASSWORD in backend/.env when no administrator exists yet, and fictional demo records in local environments only).
Configuration: config/platform.php
Platform settings live in backend/config/platform.php and are read from environment variables. backend/.env.example is the reference; never commit .env. After changing backend/.env, restart the api container.
| Key | Variable | Default | Meaning |
|---|---|---|---|
version | PLATFORM_VERSION | 0.2.0-dev | Reported by the health endpoint. |
environment | PLATFORM_ENVIRONMENT | derived from APP_ENV | development, staging or production; shown in the SPA top bar and stored on log rows. |
workspace | PLATFORM_WORKSPACE | Enterprise Workspace | Workspace name in the session payload. |
lockout_attempts | PLATFORM_LOCKOUT_ATTEMPTS | 5 | Failed sign-ins before an account is locked; an administrator unlocks it. |
rate_limits.api | PLATFORM_RATE_LIMIT_API | 120 | Requests per minute per user or IP on throttle:api routes. |
rate_limits.login | PLATFORM_RATE_LIMIT_LOGIN | 5 | Sign-in attempts per minute per e-mail and IP. |
scripts.runner_url | SCRIPT_RUNNER_URL | empty | Without it, the Background Scripts page runs in prototype mode and nothing is executed. |
scripts.runner_secret | SCRIPT_RUNNER_SECRET | empty | Shared secret between API and runner. |
scripts.api_url | SCRIPT_RUNNER_API_URL | APP_URL + /api/v1 | How the runner calls the API back. |
scripts.timeout_ms, scripts.memory_mb | SCRIPT_TIMEOUT_MS, SCRIPT_MEMORY_MB | 30000, 256 | Limits of one script run. |
transfer.* | TRANSFER_* | see limits | XML export and import limits. |
packages.max_bytes | PACKAGE_MAX_BYTES | 10 MB | Size of one uploaded update set package. |
packages.max_changes | PACKAGE_MAX_CHANGES | 2000 | Changes per package. |
packages.max_payload_chars | PACKAGE_MAX_PAYLOAD_CHARS | 1,000,000 | Size of one change payload. |
packages.preview_ttl_hours | PACKAGE_PREVIEW_TTL_HOURS | 24 | Life of a package preview. |
packages.max_previews_per_user | PACKAGE_MAX_PREVIEWS_PER_USER | 20 | Older previews are removed when a new one arrives. |
remote.allow_local | REMOTE_ALLOW_LOCAL | false | Development escape hatch that allows plain http and private or loopback destinations. Never enable it in production. |
remote.connect_timeout_s, remote.timeout_s | REMOTE_CONNECT_TIMEOUT, REMOTE_TIMEOUT | 5, 20 | Outbound timeouts to remote instances. |
remote.max_json_bytes | REMOTE_MAX_JSON_BYTES | 1 MB | Largest JSON answer accepted from a remote instance. |
remote.rejected_retention_days | REMOTE_REJECTED_RETENTION_DAYS | 30 | Package content of rejected remote update sets. |
logging.enabled | PLATFORM_LOG_DATABASE | true | false turns the syslog table off; the channel keeps every event. |
logging.persist_level | PLATFORM_LOG_PERSIST_LEVEL | info | Lowest level written to syslog. |
logging.channel | PLATFORM_LOG_CHANNEL | application default | Laravel channel for the mirror. |
logging.retention_days, logging.debug_retention_days | PLATFORM_LOG_RETENTION_DAYS, PLATFORM_LOG_DEBUG_RETENTION_DAYS | 7, 2 | Retention of syslog rows. |
admin.email, admin.password, admin.user_name | PLATFORM_ADMIN_EMAIL, PLATFORM_ADMIN_PASSWORD, PLATFORM_ADMIN_USER_NAME | empty, empty, admin | First administrator created by db:seed. Leave empty outside local environments; without a password the seeder prints a generated one once. |
Other variables that matter for the SPA: APP_URL, SANCTUM_STATEFUL_DOMAINS (SPA origins that get cookie sessions), CORS_ALLOWED_ORIGINS (same origins, with scheme), SESSION_DOMAIN and LOG_CHANNEL (stack for development, stderr for containers with JSON lines).
Health checks
| Endpoint | Auth | What it checks |
|---|---|---|
GET /up | none | Laravel's built-in liveness probe: the application boots and answers. |
GET /api/v1/health | none | Liveness plus a database round trip (select 1). 200 when healthy, 503 when a check fails. |
curl -s http://localhost:8000/api/v1/health
{
"status": "ok",
"application": "DevCraft Platform",
"environment": "local",
"version": "0.2.0-dev",
"timestamp": "2026-10-11T09:00:00+00:00",
"checks": {
"database": { "status": "ok", "driver": "pgsql", "latencyMs": 0.84 }
}
}
When the database fails, status is degraded, the database check reports "status": "error" without details, and the exception is reported to the log. Use /up for container liveness and /api/v1/health for readiness. The health endpoint has no Redis or runner check; the Background Scripts runtime endpoint reports runner reachability to administrators.
Performance notes for operators
A startup performance audit (docs/analysis/PERFORMANCE_AUDIT.md, 2026-10-10) investigated a blank screen of several seconds when the SPA loads in development. The findings that matter for running an instance:
| Finding | Where it applies | What to do |
|---|---|---|
| The backend was served from a Windows drive bind-mounted into the Linux container. Reading the framework's source files through that share was about 500 times slower than from the container filesystem. Requests after a pause of two seconds or more cost 1 to 3 s because opcache re-checks file timestamps through the share. | Local development on Windows only | Keep the checkout inside the WSL 2 filesystem, or avoid serving PHP from a Windows-drive bind mount. See the Docker documentation on WSL 2. |
| The first request of each PHP worker takes about 2 s (class loading). The dev server runs four workers. | Development | Expect a few slow first requests after a start. |
| Config, routes and events were not cached. | Any deployment | In production run php artisan config:cache, route:cache and event:cache, and set opcache.validate_timestamps=0. See the Laravel deployment guide. |
The SPA draws nothing until GET /api/v1/auth/session has answered. | Development and production | A loading frame before the session answer is proposed in the audit and not yet implemented. |
GET /api/v1/meta/tables issues one query per table (33 in the measured instance, 258 ms in-process). | Generic list and form pages | Batching from the cached repository is proposed; not on the startup path. |
Checked and excluded: PostgreSQL (under 15 ms of SQL per request, indexes used), Redis, container resources and network. In production there is no bind mount, and the built SPA is served as bundled assets, so the server-side part of the delay does not apply. The audit proposes budgets (first visible frame within 1 s, session endpoint p95 under 100 ms in production). These are targets, not measured results.
Backups
Planned There is no backup tooling in the platform today. The security design describes the intended approach: a pg_dump of the database plus the attachment store (attachments do not exist yet), a documented restore procedure, backups encrypted by the operator, and a platform:backup:verify command that restores a dump into a scratch database in CI. All of this is scheduled for the 1.0 hardening milestone.
Until then, back up the PostgreSQL database with the standard tools (see the PostgreSQL documentation on SQL dumps) and keep backend/.env, in particular APP_KEY, in a safe place. Remote instance credentials are encrypted with the application key, so a restore without the same key cannot decrypt them.
Production status
In development The repository ships a development stack. The compose.yaml services run with APP_ENV: local, the PHP built-in server and local-only settings, and are not meant to face the internet.
If you run the scheduler outside the compose stack in the meantime, register the cron entry that calls php artisan schedule:run every minute, keep REMOTE_ALLOW_LOCAL off and PLATFORM_ENVIRONMENT set, and leave the PLATFORM_ADMIN_* variables empty once the first administrator exists.