Skip to content

add-spa

Source

add-spa.ts

Usage

bash
npm exec saf-workflow kickoff add-spa <name>

To run this workflow automatically, tell the agent to:

  1. Navigate to the target package
  2. Run this command
  3. Follow the instructions until done

Checklist

When run, the workflow will:

  • Copy template files and rename placeholders.
  • Add @saflib/web-example-spa as a dependency in clients/spas/package.json, then run npm install from the root of the monorepo (not from the clients/spas directory).
  • Create index.html and main.ts files in clients/spas/example-spa similar to other SPAs already there.
  • Update clients/spas/vite.config.ts to add proxy and input properties for the new SPA.
  • Update all Caddyfiles in the repo; add the new SPA in a similar fashion with the subdomain example-spa.
  • Test the new SPA by running 'npm run build' from deploy/prod and make sure there are no errors.

Help Docs

bash
Usage: saf-workflow kickoff add-spa [options] <name>

Create a new SAF-powered frontend SPA using Vue, Vue-Router, and Tanstack Query

Arguments:
  name        Name of the new SPA (e.g. 'admin' for web-admin)

Options:
  -h, --help  display help for command