Skip to content

Run the local application stack

Last updated View as MarkdownAgent index

Run the existing application graph through its local gateway. For a new independent Worker, use Build your first Worker.

Prerequisites

Use Node.js 24, the checked-in package-manager pins, and an available port 8787. Dependency installation and the default weather backfill need network access. The normal local stack uses local identity state and preview email.

  1. From the repository root, start the stack.

    make dev

    The launcher installs missing dependencies, refreshes stale frontend builds, generates local configuration, applies local D1 migrations, and starts the bound Workers. Wait for its readiness output.

  2. Open http://stormtrust.localhost:8787. Enter a protected journey through the gateway. Create or sign into a local account and use the on-screen email preview for verification. Starting at the auth hostname alone does not test the complete return-to-application flow.

  3. Open http://app.stormtrust.localhost:8787 for the command center. The local hostnames preserve service boundaries without editing a hosts file. Production accounts and roles are separate from these local records.

  4. Inspect launcher and Worker output when a dependency is unavailable. The default launcher requests a bounded historical backfill; initial weather availability depends on those downloads and ingestion. A responding page does not prove that the backfill is complete.

  5. Stop the foreground launcher with Ctrl+C. Local state remains available for subsequent runs. Do not delete shared local state as a routine restart.

Choose a smaller development loop

Task Command Entry point
Author documentation make app-dev APP=developers /stormtrust/ on the printed Astro URL; configured port 1111
Work on shared UI make app-dev APP=ui Storybook on port 5173
Work on an independent Worker make app-dev APP=<APP> Address printed by the app's development server
Start the full stack without its automatic backfill request node scripts/apps/dev.mjs --no-backfill Local gateway on port 8787

Skipping automatic backfill does not make every dependency offline. App and gateway development commands use the shared stack. That stack's documentation Worker serves a bounded StormTrust bundle; use the Astro development server for live documentation authoring.

Turnstile, external identity providers, production Email Sending, Access, and monitoring integrations stay off in the normal local mode. Use Test email delivery locally only when you intend to send real email to a controlled inbox.