@augmenting-integrations/create-spoke 8.6.0 → 8.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,12 +11,16 @@ pnpm dlx @augmenting-integrations/create-spoke my-spoke --subdomain=foo --slug=b
11
11
 
12
12
  A Next.js 16 + Auth.js v5 app pre-wired for the augint tenant ecosystem:
13
13
 
14
+ - `app.manifest.json` at the repo root (slug, subdomain, displayName,
15
+ navOrder, access policy, feature enablement, data plane)
14
16
  - `loadTenantConfig({ role: "spoke" })` in `src/lib/auth.ts` (single env-var read)
15
17
  - `<TenantBootScript>` + `<TenantProvider>` mounted in the root layout
16
18
  - Library-owned route handlers for `/api/auth/me`, `/api/billing/*`,
17
- `/api/invitations/[token]`, and `/api/admin/users/[id]/impersonate`
18
- each is a 2-line re-export from `@augmenting-integrations/auth/server` or
19
- `@augmenting-integrations/billing/server`
19
+ `/api/invitations/[token]`, `/api/admin/users/[id]/impersonate`, and
20
+ `/api/settings/*` — each is a 2-line re-export from
21
+ `@augmenting-integrations/auth/server` or `/billing/server`
22
+ - `/api/apps` proxy to the tenant apex (the apex owns the canonical
23
+ roster; the spoke ships no roster file of its own)
20
24
  - Canonical Prisma fragments (`User`, `Invitation`, `PaymentMethod`,
21
25
  `CreditTransaction`, `ActivityLog`) in `prisma/schema.prisma` — your
22
26
  product models live below the marker comment
@@ -27,15 +31,16 @@ A Next.js 16 + Auth.js v5 app pre-wired for the augint tenant ecosystem:
27
31
 
28
32
  The generated app is portable; the AWS infra around it is per-tenant:
29
33
 
30
- - Provision your tenant's Cognito user pool, hosted zone, app registry
31
- table, secrets, GitHub OIDC role (copy `template.yaml` from an existing
32
- spoke in the same tenant — see `augint-example-leads-marketplace` for
33
- the reference).
34
- - Register this spoke in the apex's DynamoDB app registry (slug, subdomain,
35
- displayName, navOrder) so it shows up in every other spoke's AppShell.
34
+ - Provision your tenant's Cognito user pool, hosted zone, secrets,
35
+ GitHub OIDC role (copy `template.yaml` from an existing spoke in the
36
+ same tenant — see `augint-example-leads-marketplace` for the reference).
37
+ - Register this spoke in the tenant roster: add an entry to
38
+ `<tenant>-infra/config/apps.yaml` and the matching entry to the apex
39
+ repo's `config/apps.json`. `pnpm exec augint validate-app-roster`
40
+ enforces the two files agree. No DynamoDB; no Studio click.
36
41
 
37
42
  ## Bringing your product
38
43
 
39
- The kernel ships only auth/billing/admin route handlers. Product routes
40
- (`/api/leads`, `/api/quotes`, `/api/widgets`) are yours to design under
41
- `src/app/api/`.
44
+ The kernel ships only auth/billing/settings/admin/invitations route
45
+ handlers. Product routes (`/api/leads`, `/api/quotes`, `/api/widgets`)
46
+ are yours to design under `src/app/api/`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augmenting-integrations/create-spoke",
3
- "version": "8.6.0",
3
+ "version": "8.7.0",
4
4
  "description": "Scaffold a new product subdomain (spoke) for an augint-* tenant. Generates a Next 16 + Auth.js v5 app with TenantConfig wired up, library-owned route handlers, a Prisma canonical schema fragment, and a deployable template.yaml + GitHub workflow. Single command: pnpm dlx @augmenting-integrations/create-spoke my-spoke.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -0,0 +1,14 @@
1
+ // Auto-discovery endpoint consumed by @augmenting-integrations/ui's
2
+ // AppShell. The browser fetches this same-origin; we proxy server-side
3
+ // to the apex's /api/apps so the canonical tenant roster only lives in
4
+ // one place (<tenant>-infra/config/apps.yaml, mirrored to the apex's
5
+ // config/apps.json). Adding a new spoke does NOT require redeploying
6
+ // every existing spoke.
7
+
8
+ import { createAppsProxyRouteHandler } from "@augmenting-integrations/platform/server";
9
+ import { tenant } from "@/lib/auth";
10
+
11
+ export const runtime = "nodejs";
12
+ export const dynamic = "force-dynamic";
13
+
14
+ export const { GET } = createAppsProxyRouteHandler({ tenant });