create-bw-app 0.16.0 → 0.18.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-bw-app",
3
3
  "private": false,
4
- "version": "0.16.0",
4
+ "version": "0.18.0",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "create-bw-app": "bin/create-bw-app.mjs",
package/src/constants.mjs CHANGED
@@ -105,13 +105,17 @@ export const MODULE_STARTER_FILES = {
105
105
  "app/api/marketing/workflows/route.ts",
106
106
  ],
107
107
  projects: [
108
- "app/(shell)/projects/layout.tsx",
109
- "app/(shell)/projects/page.tsx",
110
- "app/(shell)/projects/projects-live-mounts.tsx",
111
- "app/(shell)/projects/projects-server-mounts.tsx",
112
- "app/(shell)/projects/[id]/page.tsx",
113
- "app/(shell)/projects/[id]/board/page.tsx",
114
- "app/(shell)/projects/[id]/tasks/page.tsx",
108
+ "app/(shell)/projetos/layout.tsx",
109
+ "app/(shell)/projetos/page.tsx",
110
+ "app/(shell)/projetos/projetos-live-mounts.tsx",
111
+ "app/(shell)/projetos/projetos-server-mounts.tsx",
112
+ "app/(shell)/projetos/[projectId]/page.tsx",
113
+ "app/(shell)/projetos/[projectId]/quadro/page.tsx",
114
+ "app/(shell)/projetos/[projectId]/tarefas/page.tsx",
115
+ "app/(shell)/account/projetos/page.tsx",
116
+ "app/(shell)/account/projetos/loading.tsx",
117
+ "app/(shell)/account/projetos/[projectId]/page.tsx",
118
+ "app/(shell)/account/projetos/[projectId]/loading.tsx",
115
119
  "app/api/projects/_handlers.ts",
116
120
  "app/api/projects/route.ts",
117
121
  "app/api/projects/stats/route.ts",
@@ -162,14 +166,14 @@ export const PLATFORM_STARTER_FILES = [
162
166
  ];
163
167
 
164
168
  export const APP_DEPENDENCY_DEFAULTS = {
165
- "@brightweblabs/app-shell": "^0.6.2",
169
+ "@brightweblabs/app-shell": "^0.7.0",
166
170
  "@brightweblabs/core-auth": "^0.7.0",
167
171
  "@brightweblabs/infra": "^0.4.0",
168
- "@brightweblabs/module-admin": "^0.5.5",
169
- "@brightweblabs/module-crm": "^0.8.5",
170
- "@brightweblabs/module-marketing": "^0.2.4",
171
- "@brightweblabs/module-orgs": "^0.3.5",
172
- "@brightweblabs/module-projects": "^0.7.0",
172
+ "@brightweblabs/module-admin": "^0.5.6",
173
+ "@brightweblabs/module-crm": "^0.9.1",
174
+ "@brightweblabs/module-marketing": "^0.2.5",
175
+ "@brightweblabs/module-orgs": "^0.3.6",
176
+ "@brightweblabs/module-projects": "^0.7.1",
173
177
  "@brightweblabs/theme": "^0.5.0",
174
178
  "@brightweblabs/ui": "^1.1.1",
175
179
  "geist": "1.7.2",
package/src/generator.mjs CHANGED
@@ -395,7 +395,7 @@ export function createPlatformModulesConfigFile(selectedModules) {
395
395
  ' description: "Project portfolio, detail routes, and work-management server logic.",',
396
396
  ` enabled: ${String(selected.has("projects"))},`,
397
397
  ' packageName: "@brightweblabs/module-projects",',
398
- ' routeHref: "/projects",',
398
+ ' routeHref: "/projetos",',
399
399
  ' placement: "primary",',
400
400
  " },",
401
401
  " {",
@@ -496,7 +496,7 @@ function getPlatformStarterRoutes(selectedModules) {
496
496
  ...selectedModules.flatMap((moduleKey) => {
497
497
  if (moduleKey === "crm") return ["/crm"];
498
498
  if (moduleKey === "marketing") return ["/marketing"];
499
- if (moduleKey === "projects") return ["/projects"];
499
+ if (moduleKey === "projects") return ["/projetos", "/account/projetos"];
500
500
  if (moduleKey === "admin") return ["/admin/users"];
501
501
  return [];
502
502
  }),
@@ -917,8 +917,8 @@ export function createShellConfig(selectedModules) {
917
917
  }
918
918
 
919
919
  if (selectedModules.includes("projects")) {
920
- importLines.push('import { projectsPreviewModuleRegistration } from "@brightweblabs/module-projects/registration";');
921
- registrationLines.push(' if (enabled.has("projects")) registrations.push(projectsPreviewModuleRegistration);');
920
+ importLines.push('import { projectsModuleRegistration } from "@brightweblabs/module-projects/registration";');
921
+ registrationLines.push(' if (enabled.has("projects")) registrations.push(projectsModuleRegistration);');
922
922
  }
923
923
 
924
924
  return [
@@ -2,16 +2,13 @@
2
2
 
3
3
  import { useMemo, type ReactNode } from "react";
4
4
  import { usePathname, useRouter } from "next/navigation";
5
- import { Users } from "lucide-react";
6
5
  import {
7
6
  AppHeader,
8
7
  AppShellFrame,
9
8
  DesktopSidebar,
10
9
  MobileNav,
11
10
  computeInitials,
12
- getShellNavGroup,
13
11
  useShellNavState,
14
- type NavGroupConfig,
15
12
  type ShellNavStateGroup,
16
13
  } from "@brightweblabs/app-shell";
17
14
  import { createAuthUiClient } from "@brightweblabs/core-auth/ui";
@@ -48,13 +45,6 @@ export function ShellLayoutClient({
48
45
  );
49
46
  const { isSidebarCollapsed, isGroupOpen, toggleGroup, toggleSidebar } =
50
47
  useShellNavState({ pathname, groups: shellGroups });
51
- const registeredCrmNavGroup = getShellNavGroup(config, "crm");
52
- const crmNavGroup = registeredCrmNavGroup ?? ({
53
- label: "CRM",
54
- icon: Users,
55
- children: [],
56
- } satisfies NavGroupConfig);
57
- const crmGroupKey = registeredCrmNavGroup?.key ?? "crm";
58
48
  const isAdminSurface = pathname === "/admin" || pathname.startsWith("/admin/");
59
49
  const isActive = (href: string) =>
60
50
  pathname === href || (isAdminSurface && pathname.startsWith(`${href}/`));
@@ -75,17 +65,16 @@ export function ShellLayoutClient({
75
65
  visiblePrimaryNav={config.primaryNav}
76
66
  adminNavItem={viewer.isAdmin ? config.adminNavItem : null}
77
67
  visibleToolNav={config.toolsSection.items}
78
- crmNavGroup={crmNavGroup}
79
- crmGroupExpanded={isGroupOpen(crmGroupKey)}
80
- isCrmGroupActive={crmNavGroup.children.some(
68
+ navGroups={config.moduleGroups}
69
+ isNavGroupExpanded={isGroupOpen}
70
+ isNavGroupActive={(group) => group.children.some(
81
71
  (item) => pathname === item.href || pathname.startsWith(`${item.href}/`),
82
72
  )}
83
73
  isNavItemActive={isActive}
84
74
  isToolLinkActive={isActive}
85
- isCrmChildActive={isActive}
86
75
  onToggleSidebar={toggleSidebar}
87
76
  onToggleTools={() => toggleGroup(config.toolsSection.key)}
88
- onToggleCrmGroup={() => toggleGroup(crmGroupKey)}
77
+ onToggleNavGroup={toggleGroup}
89
78
  account={{
90
79
  displayName,
91
80
  isStaff: viewer.isStaff,
@@ -0,0 +1 @@
1
+ export { ProjectDetailServerMount as default } from "../projetos-server-mounts";
@@ -0,0 +1 @@
1
+ export { ProjectBoardServerMount as default } from "../../projetos-server-mounts";
@@ -0,0 +1 @@
1
+ export { ProjectTasksServerMount as default } from "../../projetos-server-mounts";
@@ -0,0 +1 @@
1
+ export { ProjectsServerMount as default } from "./projetos-server-mounts";
@@ -8,12 +8,12 @@ import {
8
8
  ProjectDetailPageLiveMount,
9
9
  ProjectsPageLiveMount,
10
10
  ProjectTasksPageLiveMount,
11
- } from "./projects-live-mounts";
11
+ } from "./projetos-live-mounts";
12
12
 
13
13
  const navigation = {
14
- listHref: "/projects",
15
- detailHref: (id: string) => `/projects/${id}`,
16
- boardHref: (id: string) => `/projects/${id}/tasks`,
14
+ listHref: "/projetos",
15
+ detailHref: (id: string) => `/projetos/${id}`,
16
+ boardHref: (id: string) => `/projetos/${id}/tarefas`,
17
17
  };
18
18
 
19
19
  export async function ProjectsServerMount() {
@@ -35,20 +35,20 @@ export async function ProjectsServerMount() {
35
35
  );
36
36
  }
37
37
 
38
- async function getInitialProject(params: Promise<{ id: string }>) {
39
- const { id } = await params;
38
+ async function getInitialProject(params: Promise<{ projectId: string }>) {
39
+ const { projectId } = await params;
40
40
  const { supabase } = await requireServerPageAccess();
41
- return getProjectDashboard(supabase, id);
41
+ return getProjectDashboard(supabase, projectId);
42
42
  }
43
43
 
44
- export async function ProjectDetailServerMount({ params }: { params: Promise<{ id: string }> }) {
44
+ export async function ProjectDetailServerMount({ params }: { params: Promise<{ projectId: string }> }) {
45
45
  return <ProjectDetailPageLiveMount initialData={await getInitialProject(params)} navigation={navigation} />;
46
46
  }
47
47
 
48
- export async function ProjectBoardServerMount({ params }: { params: Promise<{ id: string }> }) {
48
+ export async function ProjectBoardServerMount({ params }: { params: Promise<{ projectId: string }> }) {
49
49
  return <ProjectBoardPageLiveMount initialData={await getInitialProject(params)} navigation={navigation} />;
50
50
  }
51
51
 
52
- export async function ProjectTasksServerMount({ params }: { params: Promise<{ id: string }> }) {
52
+ export async function ProjectTasksServerMount({ params }: { params: Promise<{ projectId: string }> }) {
53
53
  return <ProjectTasksPageLiveMount initialData={await getInitialProject(params)} navigation={navigation} />;
54
54
  }
@@ -1 +0,0 @@
1
- export { ProjectBoardServerMount as default } from "../../projects-server-mounts";
@@ -1 +0,0 @@
1
- export { ProjectDetailServerMount as default } from "../projects-server-mounts";
@@ -1 +0,0 @@
1
- export { ProjectTasksServerMount as default } from "../../projects-server-mounts";
@@ -1 +0,0 @@
1
- export { ProjectsServerMount as default } from "./projects-server-mounts";