[{"data":1,"prerenderedAt":5},["ShallowReactive",2],{"$fWKQFzWF5IJkaklNfGXqz-rTwgxXAXhkGunwuRij6g3A":3},{"content":4},"# Install: Customer Portal into `apps/\u003Cname>/`\n\nA customer portal with auth-gated pages and account management. Fits customers who need self-service support and account administration on top of App-Agent core.\n\n## Prerequisites\n\n- Working directory: the root of the customer's forked core repo\n- `apps/` folder exists (or is empty)\n- `bun` on PATH (1.2.15 or later)\n- `GITHUB_TOKEN` set in env — required to fetch the private templates repo\n\n## Steps\n\n1. **Fetch template files**\n\n   ```bash\n   GIGET_AUTH=$GITHUB_TOKEN npx giget@latest github:app-agent-io/templates/portal ./apps/\u003Cname>\n   ```\n\n2. **Rewire the core extends**\n\n   In `./apps/\u003Cname>/nuxt.config.ts`, change:\n\n   ```\n   extends: ['gh:app-agent-io/core/core']\n   ```\n\n   to:\n\n   ```\n   extends: ['../../core']\n   ```\n\n3. **Rename package**\n\n   In `./apps/\u003Cname>/package.json`, change `\"name\"` from `\"@template/portal\"` to `\"@app/\u003Cname>\"`.\n\n4. **Register in workspace**\n\n   Check root `package.json` for a `\"workspaces\"` field (or `pnpm-workspace.yaml`). If neither `apps/*` nor `apps/\u003Cname>` is already listed, add `\"apps/*\"` to the workspaces array.\n\n5. **Install and prepare**\n\n   From the root:\n\n   ```bash\n   bun install\n   bun run --filter=@app/\u003Cname> prepare\n   ```\n\n6. **Commit**\n\n   ```bash\n   git add ./apps/\u003Cname> package.json bun.lock\n   git commit -m \"chore: add \u003Cname> from portal template\"\n   ```\n\n## Verify\n\nRun `bun run --filter=@app/\u003Cname> dev`. The app should start on a port in the 3002–3009 range (per core's port allocation). Visit `http://localhost:\u003Cport>/` — you should see the Customer Portal login page.\n\n## What auto-happens next\n\nIf the customer's `deploy.yml` follows core convention (detect-changes over `apps/*` with `cloudflare-pages` preset), the next push auto-detects the new app and deploys it. No workflow edits needed.\n\n## Rollback\n\n```bash\ngit reset HEAD~1\nrm -rf ./apps/\u003Cname>\nbun install\n```\n",1785378248798]