AROYN SCRIPT HUB / TECHNICAL REFERENCE

Local development & self-hosting

Prepare an independent development environment using the original deployment guides.

Start with a frontend preview#

The repository’s apps/dashboard frontend can be previewed after installing its declared dependencies. A frontend preview is sufficient for public presentation; sign-in and runtime telemetry require backend services.

Public repository frontend preview
SHELL
cd apps/dashboard
npm install
npm run dev

The documented frontend default is http://127.0.0.1:4173. That is separate from this documentation preview on 4178 and the local expanded homepage on 4177.

Use resources owned by your deployment#

Backend development needs your own Discord OAuth application and Cloudflare account/resources. Copy the example Worker configs to local ignored wrangler.jsonc files, and local secret templates to .dev.vars. Replace example resource identifiers with your own. Keep signing and Discord secrets out of the frontend and version control.

ConfigurationRequirement
StorageBoth Workers must reference the same D1 database and runtime R2 bucket.
DiscordRegister the exact API callback URL ending /api/v2/auth/discord/callback.
OriginsSet API and live allowed origins plus the intended site origin.
CoordinatorsProvision the live and API Durable Object bindings described in current setup/account-data guides.
Deletion journalA separate private R2 bucket and controlled activation; do not reinitialize an existing activated journal.

Local backend scope#

The setup guide distinguishes an account-data-only coordinated Wrangler session from a full telemetry environment. Multi-Worker development exposes the primary API Worker, not automatically the separate live endpoint. Do not assume that two independently started processes verify the newer cross-Worker cache and mutation bindings.

The latest setup guide lists six additive D1 migrations (0001–0006). Older account-data provisioning text lists five and predates executor metadata. Preserve existing namespaces on upgrades; initial provisioning commands are not instructions to reset an existing service.

Preparing a configured frontend#

Use the repository’s tools/prepare-dashboard.mjs with explicit HTTPS API/live origins and an optional loader URL. It rejects unsafe endpoints and nonempty output. Uploading the unconfigured source config.js would preserve loopback defaults. Follow the original guide for the full command and required checks.