← Pharos Data Ark

PHAROS DATA ARK · 2026-10-29-01024f5b59

Handbook contents

Developer Guide

Establish what is actually running

The appliance checkout is /opt/dataark. Inspect its Git branch, status, and content diffs before editing. File-mode-only differences can result from the SMB source share; do not treat them as unfinished feature content or reset unrelated files. The live API is the service registered in app/main.py, not necessarily every similarly named module in the repository.

Inspect systemctl cat dataark.service and the installed helper/service configuration when investigating deployment. The live web root is generated output, not the durable source. Source edits, root-helper installation, static publication, and API restart are separate steps.

Engineering rules

Change the right source

Dashboard structure belongs in app/templates/index.html; browser behavior and styling belong under app/static/assets. Collection metadata belongs in dataark.yaml. Document public behavior in docs and update the API description when adding routes. Refer to Architecture and Library management for component boundaries.

Verify a change

Run Python checks from the repository using venv/bin/python -m unittest discover -s tests -v. Tests use temporary fixtures and mocks for privileged mutations; inspect a new test before assuming it is safe against the live appliance.

Run JavaScript checks with node --test tests/*.test.js where a compatible Node runtime is available. Node may be run from the development machine against the checkout. A passing mocked test does not prove a real phone's captive portal or an external application's file compatibility.

For a focused change, run the affected suites and meaningful regressions. Exercise actual service startup when modifying a worker entry point: a helper-function test does not catch every startup error. Inspect stderr, service exit status, and updater status rather than relying only on a rendered page.

Publish

Troubleshoot

Use journalctl for the relevant systemd service. Library outcomes and detailed stages are in the common events stream; enable Debug for extra stages. Updater progress and a detailed failure reason are also in /var/lib/dataark/updates/status.json. A queued HTTP response means acceptance, not completion. Record which layer failed: authentication, helper invocation, publisher access, download, verification, reader activation, publication, or cleanup.

Recovery changes require extra care. An uncommitted removal journal should restore the original file/manifest; a committed journal finishes cleanup. Do not manually remove a journal to silence an error. Validate the recovery behavior with disposable fixtures and consult acceptance tests.