create-bw-app 0.7.0 → 0.8.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
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
# create-bw-app
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Scaffold a new BrightWeb app from either the `platform` or `site` starter.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Workspace usage
|
|
6
6
|
|
|
7
7
|
From the BrightWeb platform repo root:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
pnpm create:client
|
|
11
|
+
pnpm create:client -- --help
|
|
11
12
|
pnpm create:client -- --template site
|
|
12
13
|
```
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
The workspace wrapper delegates to this package with `workspace:*` dependency wiring and BrightWeb-specific output rules.
|
|
16
|
+
|
|
17
|
+
## Published usage
|
|
15
18
|
|
|
16
19
|
Once this package is published to npm:
|
|
17
20
|
|
|
18
21
|
```bash
|
|
19
22
|
pnpm dlx create-bw-app
|
|
23
|
+
pnpm dlx create-bw-app --template site
|
|
20
24
|
npm create bw-app@latest
|
|
21
25
|
```
|
|
22
26
|
|
|
@@ -24,11 +28,30 @@ npm create bw-app@latest
|
|
|
24
28
|
|
|
25
29
|
- prompts for app type: `platform` or `site`
|
|
26
30
|
- prompts for project name
|
|
27
|
-
- prompts for optional modules
|
|
31
|
+
- prompts for optional platform modules: `admin`, `crm`, and `projects`
|
|
28
32
|
- prompts to install dependencies immediately
|
|
29
|
-
- copies a clean Next.js starter template
|
|
30
|
-
- platform apps include BrightWeb auth, shell, and optional
|
|
31
|
-
- site apps include Next.js, Tailwind CSS, and local
|
|
33
|
+
- copies a clean Next.js App Router starter template
|
|
34
|
+
- platform apps include BrightWeb auth, shell wiring, and optional module starter surfaces
|
|
35
|
+
- site apps include Next.js, Tailwind CSS v4, and local component primitives
|
|
32
36
|
- writes `package.json`, `next.config.ts`, `.gitignore`, and `README.md` for both templates
|
|
33
|
-
- platform apps also write `.env.example
|
|
37
|
+
- platform apps also write `.env.example`, generated config files, and module feature flags
|
|
34
38
|
- supports repo-local `workspace:*` wiring and future published dependency wiring
|
|
39
|
+
|
|
40
|
+
## Workspace mode extras
|
|
41
|
+
|
|
42
|
+
When this package runs in BrightWeb workspace mode, it can:
|
|
43
|
+
|
|
44
|
+
- write the new app under `apps/<slug>`
|
|
45
|
+
- keep internal dependencies on `workspace:*`
|
|
46
|
+
- create `supabase/clients/<slug>/stack.json`
|
|
47
|
+
- create a client-only migrations folder so database planning stays aligned with scaffolded modules
|
|
48
|
+
|
|
49
|
+
Platform mode always resolves to the `Core + Admin` database baseline. Selecting `admin` affects the Admin starter UI and package wiring, not whether the Admin database layer exists.
|
|
50
|
+
|
|
51
|
+
## Related references
|
|
52
|
+
|
|
53
|
+
- `packages/create-bw-app/src/generator.mjs`
|
|
54
|
+
- `packages/create-bw-app/src/constants.mjs`
|
|
55
|
+
- `packages/create-bw-app/template/base`
|
|
56
|
+
- `packages/create-bw-app/template/site/base`
|
|
57
|
+
- `packages/create-bw-app/template/modules`
|
package/package.json
CHANGED
package/src/generator.mjs
CHANGED
|
@@ -189,7 +189,7 @@ function createDbInstallPlan({ selectedModules, workspaceMode, registry }) {
|
|
|
189
189
|
const notes = [];
|
|
190
190
|
|
|
191
191
|
if (!selectedModules.includes("admin") && resolvedOrder.includes("admin")) {
|
|
192
|
-
notes.push("Admin
|
|
192
|
+
notes.push("Platform always resolves to the Core + Admin database baseline; selecting Admin only controls whether the Admin starter UI and package wiring are scaffolded.");
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
for (const moduleKey of resolvedOrder) {
|
|
@@ -363,12 +363,12 @@ function createPlatformReadme({
|
|
|
363
363
|
|
|
364
364
|
const localSteps = workspaceMode
|
|
365
365
|
? [
|
|
366
|
-
"1. Review `.env.example`, then
|
|
366
|
+
"1. Review `.env.example`, then copy it to `.env.local` and fill in real service credentials.",
|
|
367
367
|
"2. Run `pnpm install` from the BrightWeb workspace root.",
|
|
368
368
|
`3. Run \`pnpm --filter ${slug} dev\`.`,
|
|
369
369
|
]
|
|
370
370
|
: [
|
|
371
|
-
"1. Review `.env.example`, then
|
|
371
|
+
"1. Review `.env.example`, then copy it to `.env.local` and fill in real service credentials.",
|
|
372
372
|
`2. Run \`${packageManager} install\`.`,
|
|
373
373
|
`3. Run \`${packageManager} dev\`.`,
|
|
374
374
|
];
|
|
@@ -716,7 +716,7 @@ async function writeWorkspaceClientStack(workspaceRoot, slug, selectedModules) {
|
|
|
716
716
|
"Generated by create-bw-app in workspace mode.",
|
|
717
717
|
`Selected app modules: ${dbInstallPlan.selectedLabels.length > 0 ? dbInstallPlan.selectedLabels.join(", ") : "none"}.`,
|
|
718
718
|
`Resolved database stack: ${enabledModules.map((moduleKey) => getModuleLabel(moduleKey)).join(" -> ")}.`,
|
|
719
|
-
"Admin
|
|
719
|
+
"Platform always resolves to the Core + Admin database baseline; selecting Admin only controls whether the Admin starter UI and package wiring are scaffolded.",
|
|
720
720
|
"The database install order is resolved from supabase/module-registry.json.",
|
|
721
721
|
],
|
|
722
722
|
},
|
|
@@ -904,7 +904,6 @@ async function scaffoldPlatformProject({
|
|
|
904
904
|
const envFileContent = createEnvFileContent({ slug: answers.slug, brandValues, moduleFlags });
|
|
905
905
|
|
|
906
906
|
await fs.writeFile(path.join(targetDir, ".env.example"), envFileContent);
|
|
907
|
-
await fs.writeFile(path.join(targetDir, ".env.local"), envFileContent);
|
|
908
907
|
await fs.writeFile(path.join(targetDir, ".gitignore"), createGitignore());
|
|
909
908
|
await fs.writeFile(
|
|
910
909
|
path.join(targetDir, "README.md"),
|
|
@@ -115,7 +115,7 @@ export default function HomePage() {
|
|
|
115
115
|
<li>`config/brand.ts` for client identity and contact details.</li>
|
|
116
116
|
<li>`config/modules.ts` for enabled platform modules.</li>
|
|
117
117
|
<li>`config/env.ts` for infra requirements and readiness checks.</li>
|
|
118
|
-
<li>`.env.
|
|
118
|
+
<li>`.env.example` for starter defaults; copy it to `.env.local` for per-client secrets and flags.</li>
|
|
119
119
|
</ul>
|
|
120
120
|
</div>
|
|
121
121
|
</article>
|
|
@@ -69,7 +69,7 @@ export function getStarterBootstrapChecklist() {
|
|
|
69
69
|
{
|
|
70
70
|
label: "Create per-client environment variables",
|
|
71
71
|
done: config.envReadiness.allReady,
|
|
72
|
-
detail: "Copy `.env.example`
|
|
72
|
+
detail: "Copy `.env.example` to `.env.local` and fill the real values.",
|
|
73
73
|
},
|
|
74
74
|
],
|
|
75
75
|
};
|
|
@@ -20,7 +20,7 @@ export default async function AdminPlaygroundPage() {
|
|
|
20
20
|
<p className="eyebrow">Admin Module</p>
|
|
21
21
|
<h1>Admin users and roles playground</h1>
|
|
22
22
|
<p className="muted">
|
|
23
|
-
This route previews the shared admin governance module without relying on
|
|
23
|
+
This route previews the shared admin governance module without relying on any client-specific app.
|
|
24
24
|
</p>
|
|
25
25
|
</div>
|
|
26
26
|
</article>
|