@augmenting-integrations/create-tenant 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,42 @@
1
+ # @augmenting-integrations/create-tenant
2
+
3
+ Scaffold a new tenant apex app for an augint deployment.
4
+
5
+ ```bash
6
+ pnpm dlx @augmenting-integrations/create-tenant acme --apex=acme.com
7
+ ```
8
+
9
+ ## What gets generated
10
+
11
+ The Next.js 16 apex for a new tenant — the single OAuth broker and the
12
+ home of the app registry:
13
+
14
+ - `/api/auth/[...nextauth]` — the ONLY Cognito callback in the tenant
15
+ ecosystem; sets the parent-domain session cookie
16
+ - `/api/apps` — registry auto-discovery handler that every spoke's AppShell
17
+ fetches to render cross-app navigation
18
+ - `/login` — Cognito sign-in entry point (spokes redirect here)
19
+ - `loadTenantConfig({ role: "apex" })` + `<TenantBootScript>` +
20
+ `<TenantProvider>` so spokes see the same tenant struct
21
+
22
+ ## What you still have to do per-tenant
23
+
24
+ The generated app is portable; the AWS infra is not:
25
+
26
+ 1. AWS account (staging + prod, separate)
27
+ 2. Cognito user pool + one App Client with ONE callback URL:
28
+ `https://<your-apex>/api/auth/callback/cognito`
29
+ 3. Hosted zone + cert for `<your-apex>` and `*.<your-apex>`
30
+ 4. App registry DynamoDB table (PK = `slug`); set `APP_REGISTRY_TABLE`
31
+ 5. Secrets Manager rows for `AUTH_SECRET`, `AUTH_COGNITO_SECRET`
32
+ 6. GitHub OIDC role in each AWS account
33
+ 7. SAM `template.yaml` (copy from an existing apex like
34
+ `augint-example-web` and adapt)
35
+
36
+ ## Adding spokes after the apex exists
37
+
38
+ ```bash
39
+ pnpm dlx @augmenting-integrations/create-spoke my-product-spoke
40
+ ```
41
+
42
+ Then register the spoke in this apex's DynamoDB app registry table.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augmenting-integrations/create-tenant",
3
- "version": "8.3.0",
3
+ "version": "8.4.1",
4
4
  "description": "Scaffold a new tenant apex app for an augint deployment. Generates a Next 16 + Auth.js v5 + Cognito apex with TenantConfig wired up, library-owned /api/apps registry handler, and /studio admin. Single command: pnpm dlx @augmenting-integrations/create-tenant my-tenant.",
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,22 +0,0 @@
1
- APP_DOMAIN=__TENANT_APEX__
2
- APEX_DOMAIN=__TENANT_APEX__
3
- AUTH_COOKIE_DOMAIN=__TENANT_PARENT__
4
- AUTH_ALLOWED_PARENT_DOMAIN=__TENANT_PARENT__
5
-
6
- # Cognito (apex-only; from your tenant infra stack)
7
- AUTH_SECRET_ARN=
8
- AUTH_COGNITO_SECRET_ARN=
9
- AUTH_COGNITO_ID=
10
- AUTH_COGNITO_ISSUER=
11
-
12
- # App registry DynamoDB table (apex owns CRUD; spokes read)
13
- APP_REGISTRY_TABLE=
14
- TENANT_SLUG=__TENANT_NAME__
15
- STAGE=staging
16
-
17
- AWS_REGION=us-east-1
18
- ADMIN_EMAILS=
19
-
20
- # Local-dev fallbacks
21
- AUTH_SECRET=dev-only-fallback-not-for-prod
22
- NODE_ENV=development