@augmenting-integrations/create-spoke 8.3.0 → 8.4.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Augmenting Integrations LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # @augmenting-integrations/create-spoke
2
+
3
+ Scaffold a new product subdomain (spoke) for an augint-\* tenant.
4
+
5
+ ```bash
6
+ pnpm dlx @augmenting-integrations/create-spoke my-spoke
7
+ pnpm dlx @augmenting-integrations/create-spoke my-spoke --subdomain=foo --slug=bar
8
+ ```
9
+
10
+ ## What gets generated
11
+
12
+ A Next.js 16 + Auth.js v5 app pre-wired for the augint tenant ecosystem:
13
+
14
+ - `loadTenantConfig({ role: "spoke" })` in `src/lib/auth.ts` (single env-var read)
15
+ - `<TenantBootScript>` + `<TenantProvider>` mounted in the root layout
16
+ - 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`
20
+ - Canonical Prisma fragments (`User`, `Invitation`, `PaymentMethod`,
21
+ `CreditTransaction`, `ActivityLog`) in `prisma/schema.prisma` — your
22
+ product models live below the marker comment
23
+ - `prisma/seed.mjs` with the `STAGE=staging` gate so seeds never fire
24
+ against a production database
25
+
26
+ ## What you still have to do per-tenant
27
+
28
+ The generated app is portable; the AWS infra around it is per-tenant:
29
+
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.
36
+
37
+ ## Bringing your product
38
+
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/`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augmenting-integrations/create-spoke",
3
- "version": "8.3.0",
3
+ "version": "8.4.1",
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": {
@@ -15,15 +15,15 @@
15
15
  "templates",
16
16
  "README.md"
17
17
  ],
18
- "scripts": {
19
- "build": "tsup",
20
- "clean": "rm -rf dist",
21
- "test": "vitest run --passWithNoTests"
22
- },
23
18
  "devDependencies": {
24
19
  "@types/node": "^22.0.0",
25
20
  "tsup": "^8.3.5",
26
21
  "typescript": "^5.7.2",
27
22
  "vitest": "^4.1.5"
23
+ },
24
+ "scripts": {
25
+ "build": "tsup",
26
+ "clean": "rm -rf dist",
27
+ "test": "vitest run --passWithNoTests"
28
28
  }
29
- }
29
+ }
@@ -1,25 +0,0 @@
1
- # Tenant identity (everything else flows from these)
2
- APP_DOMAIN=__SPOKE_SUBDOMAIN__.tenant.example.com
3
- APP_SLUG=__SPOKE_SLUG__
4
- APEX_DOMAIN=tenant.example.com
5
- AUTH_COOKIE_DOMAIN=.tenant.example.com
6
- AUTH_ALLOWED_PARENT_DOMAIN=.tenant.example.com
7
-
8
- # AWS resources (typically pulled from SSM in deployed Lambda; local dev only)
9
- AWS_REGION=us-east-1
10
- AUTH_SECRET_ARN=
11
- AUTH_COGNITO_ID=
12
- AUTH_COGNITO_ISSUER=
13
- DB_SECRET_ARN=
14
- DB_HOST=
15
- DB_NAME=
16
- APP_REGISTRY_TABLE=
17
- STRIPE_SECRET_ARN=
18
- STRIPE_WEBHOOK_SECRET_ARN=
19
-
20
- # Comma-separated emails auto-promoted to role=admin on first sign-in
21
- ADMIN_EMAILS=
22
-
23
- # Local-dev fallback for testing without Secrets Manager
24
- AUTH_SECRET=dev-only-fallback-not-for-prod
25
- NODE_ENV=development