create-aron-app 0.1.5 → 0.1.7
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 +73 -38
- package/dist/index.js +50 -115
- package/package.json +5 -2
- package/templates/{_base/.cursor → .cursor}/rules/api_architecture.mdc +27 -33
- package/templates/{_base/.cursor → .cursor}/rules/coding_standards.mdc +1 -1
- package/templates/{_base/.cursor → .cursor}/rules/convex_rules.mdc +78 -422
- package/templates/.cursor/rules/frontend_architecture_core.mdc +495 -0
- package/templates/.cursor/rules/frontend_architecture_nextjs.mdc +458 -0
- package/templates/.cursor/rules/frontend_architecture_reactrouter.mdc +473 -0
- package/templates/apps/api/_generated/api.d.ts +57 -0
- package/templates/apps/api/_generated/api.js +23 -0
- package/templates/apps/api/_generated/dataModel.d.ts +60 -0
- package/templates/apps/api/_generated/server.d.ts +143 -0
- package/templates/apps/api/_generated/server.js +93 -0
- package/templates/apps/api/http.ts +16 -0
- package/templates/apps/nextjs/.env.example +10 -0
- package/templates/{nextjs → apps/nextjs}/project.json +5 -5
- package/templates/{nextjs → apps/nextjs}/src/app/(auth)/not-allowed/page.tsx +1 -0
- package/templates/apps/nextjs/src/app/(dashboard)/layout.tsx +22 -0
- package/templates/apps/nextjs/src/app/(dashboard)/page.tsx +12 -0
- package/templates/{nextjs → apps/nextjs}/src/app/(dashboard)/todos/[id]/page.tsx +5 -2
- package/templates/apps/nextjs/src/app/(dashboard)/todos/page.tsx +19 -0
- package/templates/apps/nextjs/src/middleware.ts +18 -0
- package/templates/apps/nextjs/src/surfaces/home/bootstrap.ts +9 -0
- package/templates/apps/nextjs/src/surfaces/home/home.tsx +27 -0
- package/templates/apps/nextjs/src/surfaces/home/install.tsx +17 -0
- package/templates/apps/nextjs/src/surfaces/home/layout.tsx +44 -0
- package/templates/apps/nextjs/src/surfaces/home/main/create.tsx +34 -0
- package/templates/apps/nextjs/src/surfaces/sidebar/install.tsx +23 -0
- package/templates/apps/nextjs/src/surfaces/sidebar/layout.tsx +118 -0
- package/templates/apps/nextjs/src/surfaces/sidebar/nav_main/create.tsx +19 -0
- package/templates/apps/nextjs/src/surfaces/sidebar/nav_main/nav_config.ts +22 -0
- package/templates/apps/nextjs/src/surfaces/sidebar/nav_main/nav_main.tsx +25 -0
- package/templates/apps/nextjs/src/surfaces/sidebar/nav_secondary/create.tsx +21 -0
- package/templates/apps/nextjs/src/surfaces/sidebar/nav_secondary/nav_secondary.tsx +33 -0
- package/templates/apps/nextjs/src/surfaces/sidebar/sidebar.tsx +23 -0
- package/templates/{nextjs/src/ui/sidebar/nav_link.tsx → apps/nextjs/src/surfaces/sidebar/ui/sidebar_nav_link.tsx} +13 -10
- package/templates/apps/nextjs/src/surfaces/sidebar/user_menu/create.tsx +28 -0
- package/templates/apps/nextjs/src/surfaces/sidebar/user_menu/user_menu.tsx +42 -0
- package/templates/apps/nextjs/src/surfaces/todos/all_todos/all_todos.tsx +29 -0
- package/templates/apps/nextjs/src/surfaces/todos/all_todos/all_todos_controller.ts +61 -0
- package/templates/apps/nextjs/src/surfaces/todos/all_todos/bootstrap.ts +21 -0
- package/templates/apps/nextjs/src/surfaces/todos/all_todos/header/create.tsx +23 -0
- package/templates/apps/nextjs/src/surfaces/todos/all_todos/install.tsx +23 -0
- package/templates/apps/nextjs/src/surfaces/todos/all_todos/layout.tsx +44 -0
- package/templates/apps/nextjs/src/surfaces/todos/all_todos/main/create.tsx +49 -0
- package/templates/apps/nextjs/src/surfaces/todos/all_todos/main/main.tsx +70 -0
- package/templates/apps/nextjs/src/surfaces/todos/all_todos/main/new_todo_sheet/create.tsx +56 -0
- package/templates/apps/nextjs/src/surfaces/todos/all_todos/main/new_todo_sheet/new_todo_sheet.tsx +99 -0
- package/templates/apps/nextjs/src/surfaces/todos/all_todos/main/new_todo_sheet/schema.ts +11 -0
- package/templates/apps/nextjs/src/surfaces/todos/single_todo/bootstrap.ts +32 -0
- package/templates/apps/nextjs/src/surfaces/todos/single_todo/header/create.tsx +26 -0
- package/templates/apps/nextjs/src/surfaces/todos/single_todo/header/header.tsx +22 -0
- package/templates/apps/nextjs/src/surfaces/todos/single_todo/install.tsx +27 -0
- package/templates/apps/nextjs/src/surfaces/todos/single_todo/layout.tsx +55 -0
- package/templates/apps/nextjs/src/surfaces/todos/single_todo/main/create.tsx +38 -0
- package/templates/apps/nextjs/src/surfaces/todos/single_todo/main/main.tsx +49 -0
- package/templates/apps/nextjs/src/surfaces/todos/single_todo/single_todo.tsx +29 -0
- package/templates/apps/nextjs/src/surfaces/todos/single_todo/single_todo_controller.ts +13 -0
- package/templates/apps/nextjs/src/utils/auth.ts +18 -0
- package/templates/apps/react-router/.env.example +10 -0
- package/templates/apps/react-router/.react-router/types/+future.ts +9 -0
- package/templates/apps/react-router/.react-router/types/+routes.ts +71 -0
- package/templates/apps/react-router/.react-router/types/+server-build.d.ts +18 -0
- package/templates/apps/react-router/.react-router/types/src/+types/root.ts +59 -0
- package/templates/apps/react-router/.react-router/types/src/routes/(auth)/+types/layout.ts +62 -0
- package/templates/apps/react-router/.react-router/types/src/routes/(auth)/sign-in/+types/index.ts +65 -0
- package/templates/apps/react-router/.react-router/types/src/routes/(dashboard)/+types/index.ts +65 -0
- package/templates/apps/react-router/.react-router/types/src/routes/(dashboard)/+types/layout.ts +62 -0
- package/templates/apps/react-router/.react-router/types/src/routes/(dashboard)/todos/+types/[id].ts +65 -0
- package/templates/apps/react-router/.react-router/types/src/routes/(dashboard)/todos/+types/index.ts +65 -0
- package/templates/{react-router → apps/react-router}/project.json +4 -4
- package/templates/apps/react-router/src/app.css +3 -0
- package/templates/{react-router → apps/react-router}/src/components/error_boundary.tsx +1 -1
- package/templates/{react-router → apps/react-router}/src/providers/api_auth_provider.tsx +2 -0
- package/templates/{react-router/src/routes/auth → apps/react-router/src/routes/(auth)}/layout.tsx +1 -1
- package/templates/apps/react-router/src/routes/(dashboard)/index.tsx +19 -0
- package/templates/apps/react-router/src/routes/(dashboard)/layout.tsx +37 -0
- package/templates/apps/react-router/src/routes/(dashboard)/todos/[id].tsx +19 -0
- package/templates/apps/react-router/src/routes/(dashboard)/todos/index.tsx +19 -0
- package/templates/apps/react-router/src/routes.ts +12 -0
- package/templates/apps/react-router/src/surfaces/home/bootstrap.ts +9 -0
- package/templates/apps/react-router/src/surfaces/home/home.tsx +25 -0
- package/templates/apps/react-router/src/surfaces/home/install.tsx +17 -0
- package/templates/apps/react-router/src/surfaces/home/layout.tsx +35 -0
- package/templates/apps/react-router/src/surfaces/home/main/create.tsx +32 -0
- package/templates/apps/react-router/src/surfaces/sidebar/install.tsx +23 -0
- package/templates/apps/react-router/src/surfaces/sidebar/layout.tsx +110 -0
- package/templates/apps/react-router/src/surfaces/sidebar/nav_main/create.tsx +31 -0
- package/templates/apps/react-router/src/surfaces/sidebar/nav_main/nav_main.tsx +42 -0
- package/templates/apps/react-router/src/surfaces/sidebar/nav_secondary/create.tsx +21 -0
- package/templates/apps/react-router/src/surfaces/sidebar/nav_secondary/nav_secondary.tsx +31 -0
- package/templates/apps/react-router/src/surfaces/sidebar/sidebar.tsx +18 -0
- package/templates/apps/react-router/src/surfaces/sidebar/user_menu/create.tsx +26 -0
- package/templates/{react-router/src/layouts/sidebar/sidebar_aside → apps/react-router/src/surfaces/sidebar/user_menu}/user_menu.tsx +13 -9
- package/templates/apps/react-router/src/surfaces/todos/all_todos/all_todos.tsx +25 -0
- package/templates/apps/react-router/src/surfaces/todos/all_todos/all_todos_controller.ts +47 -0
- package/templates/apps/react-router/src/surfaces/todos/all_todos/bootstrap.ts +18 -0
- package/templates/apps/react-router/src/surfaces/todos/all_todos/header/create.tsx +21 -0
- package/templates/apps/react-router/src/surfaces/todos/all_todos/install.tsx +20 -0
- package/templates/apps/react-router/src/surfaces/todos/all_todos/layout.tsx +35 -0
- package/templates/apps/react-router/src/surfaces/todos/all_todos/main/create.tsx +47 -0
- package/templates/apps/react-router/src/surfaces/todos/all_todos/main/main.tsx +68 -0
- package/templates/apps/react-router/src/surfaces/todos/all_todos/main/new_todo_sheet/create.tsx +54 -0
- package/templates/apps/react-router/src/surfaces/todos/all_todos/main/new_todo_sheet/new_todo_sheet.tsx +97 -0
- package/templates/apps/react-router/src/surfaces/todos/all_todos/main/new_todo_sheet/schema.ts +11 -0
- package/templates/apps/react-router/src/surfaces/todos/single_todo/bootstrap.ts +36 -0
- package/templates/apps/react-router/src/surfaces/todos/single_todo/header/create.tsx +32 -0
- package/templates/apps/react-router/src/surfaces/todos/single_todo/header/header.tsx +25 -0
- package/templates/apps/react-router/src/surfaces/todos/single_todo/install.tsx +27 -0
- package/templates/apps/react-router/src/surfaces/todos/single_todo/layout.tsx +45 -0
- package/templates/apps/react-router/src/surfaces/todos/single_todo/main/create.tsx +35 -0
- package/templates/apps/react-router/src/surfaces/todos/single_todo/main/main.tsx +47 -0
- package/templates/apps/react-router/src/surfaces/todos/single_todo/single_todo.tsx +27 -0
- package/templates/apps/react-router/src/surfaces/todos/single_todo/single_todo_controller.ts +16 -0
- package/templates/{react-router → apps/react-router}/vite.config.ts +27 -3
- package/templates/{_base/biome.json → biome.json} +7 -0
- package/templates/bun.lock +3187 -0
- package/templates/{_base/emails → emails}/project.json +1 -1
- package/templates/{_base/nx.json → nx.json} +11 -0
- package/templates/package.json +92 -0
- package/templates/{_base/tsconfig.base.json → tsconfig.base.json} +4 -1
- package/templates/_base/.cursor/rules/frontend_rules.mdc +0 -268
- package/templates/_base/.env.convex.example +0 -3
- package/templates/_base/_gitignore +0 -58
- package/templates/_base/package.json +0 -73
- package/templates/nextjs/.env.example +0 -8
- package/templates/nextjs/src/app/(dashboard)/layout.tsx +0 -27
- package/templates/nextjs/src/app/(dashboard)/page.tsx +0 -5
- package/templates/nextjs/src/app/(dashboard)/todos/page.tsx +0 -16
- package/templates/nextjs/src/middleware.ts +0 -18
- package/templates/nextjs/src/surfaces/home_surface.tsx +0 -22
- package/templates/nextjs/src/surfaces/todos/all_todos_surface.tsx +0 -97
- package/templates/nextjs/src/surfaces/todos/create_todo_sheet.tsx +0 -107
- package/templates/nextjs/src/surfaces/todos/single_todo_surface.tsx +0 -90
- package/templates/nextjs/src/ui/sidebar/sidebar.tsx +0 -125
- package/templates/react-router/.env.example +0 -8
- package/templates/react-router/src/app.css +0 -3
- package/templates/react-router/src/layouts/sidebar/sidebar_aside/sidebar_aside.tsx +0 -76
- package/templates/react-router/src/layouts/sidebar/sidebar_layout.tsx +0 -22
- package/templates/react-router/src/routes/index.tsx +0 -9
- package/templates/react-router/src/routes/layout.tsx +0 -26
- package/templates/react-router/src/routes/todos/[id].tsx +0 -22
- package/templates/react-router/src/routes/todos/index.tsx +0 -13
- package/templates/react-router/src/routes.ts +0 -12
- package/templates/react-router/src/surfaces/home_surface.tsx +0 -20
- package/templates/react-router/src/surfaces/todos/all_todos_surface.tsx +0 -87
- package/templates/react-router/src/surfaces/todos/create_todo_sheet.tsx +0 -102
- package/templates/react-router/src/surfaces/todos/single_todo_surface.tsx +0 -81
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/SKILL.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-backend-api/SKILL.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-backend-api/scripts/api-specs-context.sh +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-backend-api/scripts/execute-request.sh +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-backend-api/scripts/extract-endpoint-detail.sh +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-backend-api/scripts/extract-tag-endpoints.sh +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-backend-api/scripts/extract-tags.js +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-custom-ui/SKILL.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-custom-ui/core-2/custom-sign-in.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-custom-ui/core-2/custom-sign-up.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-custom-ui/core-3/custom-sign-in.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-custom-ui/core-3/custom-sign-up.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-custom-ui/core-3/show-component.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-nextjs-patterns/SKILL.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-nextjs-patterns/references/api-routes.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-nextjs-patterns/references/caching-auth.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-nextjs-patterns/references/middleware-strategies.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-nextjs-patterns/references/server-actions.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-nextjs-patterns/references/server-vs-client.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/clerk/clerk-webhooks/SKILL.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/shadcn/SKILL.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/shadcn/agents/openai.yml +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/shadcn/assets/shadcn-small.png +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/shadcn/assets/shadcn.png +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/shadcn/cli.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/shadcn/customization.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/shadcn/evals/evals.json +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/shadcn/mcp.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/shadcn/rules/base-vs-radix.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/shadcn/rules/composition.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/shadcn/rules/forms.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/shadcn/rules/icons.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/agents/skills/shadcn/rules/styling.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/commands/builder.md +0 -0
- /package/templates/{_base/.cursor → .cursor}/commands/pr.md +0 -0
- /package/templates/{_base/.github → .github}/workflows/ci.yml +0 -0
- /package/templates/{_base/.nvmrc → .nvmrc} +0 -0
- /package/templates/{_base/.vscode → .vscode}/settings.json +0 -0
- /package/templates/{_base/apps → apps}/api/auth.config.ts +0 -0
- /package/templates/{_base/apps → apps}/api/functions.ts +0 -0
- /package/templates/{_base/apps → apps}/api/project.json +0 -0
- /package/templates/{_base/apps → apps}/api/schema.ts +0 -0
- /package/templates/{_base/apps → apps}/api/todos/crud.ts +0 -0
- /package/templates/{_base/apps → apps}/api/todos/schema.ts +0 -0
- /package/templates/{_base/apps → apps}/api/todos/types.ts +0 -0
- /package/templates/{_base/apps → apps}/api/tsconfig.json +0 -0
- /package/templates/{_base/apps → apps}/api/types.ts +0 -0
- /package/templates/{nextjs → apps/nextjs}/index.d.ts +0 -0
- /package/templates/{nextjs → apps/nextjs}/next-env.d.ts +0 -0
- /package/templates/{nextjs → apps/nextjs}/next.config.js +0 -0
- /package/templates/{nextjs → apps/nextjs}/postcss.config.js +0 -0
- /package/templates/{nextjs → apps/nextjs}/src/app/(auth)/layout.tsx +0 -0
- /package/templates/{nextjs → apps/nextjs}/src/app/(auth)/sign-in/[[...sign-in]]/page.tsx +0 -0
- /package/templates/{nextjs → apps/nextjs}/src/app/app.css +0 -0
- /package/templates/{nextjs → apps/nextjs}/src/app/layout.tsx +0 -0
- /package/templates/{nextjs → apps/nextjs}/src/providers/convex_provider.tsx +0 -0
- /package/templates/{nextjs/src → apps/nextjs/src/utils}/convex.ts +0 -0
- /package/templates/{nextjs → apps/nextjs}/src/utils/font.ts +0 -0
- /package/templates/{nextjs → apps/nextjs}/tsconfig.json +0 -0
- /package/templates/{react-router → apps/react-router}/postcss.config.js +0 -0
- /package/templates/{react-router → apps/react-router}/public/favicon.ico +0 -0
- /package/templates/{react-router → apps/react-router}/react-router.config.ts +0 -0
- /package/templates/{react-router → apps/react-router}/src/root.tsx +0 -0
- /package/templates/{react-router/src/routes/auth/sign-in.tsx → apps/react-router/src/routes/(auth)/sign-in/index.tsx} +0 -0
- /package/templates/{react-router → apps/react-router}/tsconfig.json +0 -0
- /package/templates/{_base/convex.json → convex.json} +0 -0
- /package/templates/{_base/emails → emails}/tsconfig.json +0 -0
- /package/templates/{_base/emails → emails}/welcome_email.tsx +0 -0
- /package/templates/{_base/scripts → scripts}/sync_convex_env.ts +0 -0
- /package/templates/{_base/shared → shared}/assets/image.d.ts +0 -0
- /package/templates/{_base/shared → shared}/assets/src/styles/global.css +0 -0
- /package/templates/{_base/shared → shared}/assets/tsconfig.json +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/alert_dialog.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/badge.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/basic_data_table.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/button.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/button_group.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/card.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/checkbox.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/command.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/dialog.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/dropdown_menu.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/form.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/input.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/label.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/popover.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/radio_group.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/resizable.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/scroll_area.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/select.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/separator.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/sheet.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/side_bar.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/skeleton.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/spinner.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/switch.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/table.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/text_area.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/tooltip.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/base/utils.ts +0 -0
- /package/templates/{_base/shared → shared}/ui/src/hooks/use_keyboard_press.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/hooks/use_keyboard_release.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/hooks/use_mobile.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/hooks/use_mouse_click.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/hooks/use_mouse_location.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/hooks/use_outside_click.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/src/hooks/use_query_params.tsx +0 -0
- /package/templates/{_base/shared → shared}/ui/tsconfig.json +0 -0
- /package/templates/{_base/shared → shared}/utils/src/convex.ts +0 -0
- /package/templates/{_base/shared → shared}/utils/src/time.ts +0 -0
- /package/templates/{_base/shared → shared}/utils/tsconfig.json +0 -0
- /package/templates/{_base/skills-lock.json → skills-lock.json} +0 -0
package/templates/apps/react-router/.react-router/types/src/routes/(auth)/sign-in/+types/index.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Generated by React Router
|
|
2
|
+
|
|
3
|
+
import type { GetInfo, GetAnnotations } from "react-router/internal";
|
|
4
|
+
|
|
5
|
+
type Module = typeof import("../index.js")
|
|
6
|
+
|
|
7
|
+
type Info = GetInfo<{
|
|
8
|
+
file: "./routes/(auth)/sign-in/index.tsx",
|
|
9
|
+
module: Module
|
|
10
|
+
}>
|
|
11
|
+
|
|
12
|
+
type Matches = [{
|
|
13
|
+
id: "root";
|
|
14
|
+
module: typeof import("../../../../root.js");
|
|
15
|
+
}, {
|
|
16
|
+
id: "routes/(auth)/layout";
|
|
17
|
+
module: typeof import("../../layout.js");
|
|
18
|
+
}, {
|
|
19
|
+
id: "routes/(auth)/sign-in/index";
|
|
20
|
+
module: typeof import("../index.js");
|
|
21
|
+
}];
|
|
22
|
+
|
|
23
|
+
type Annotations = GetAnnotations<Info & { module: Module, matches: Matches }, false>;
|
|
24
|
+
|
|
25
|
+
export namespace Route {
|
|
26
|
+
// links
|
|
27
|
+
export type LinkDescriptors = Annotations["LinkDescriptors"];
|
|
28
|
+
export type LinksFunction = Annotations["LinksFunction"];
|
|
29
|
+
|
|
30
|
+
// meta
|
|
31
|
+
export type MetaArgs = Annotations["MetaArgs"];
|
|
32
|
+
export type MetaDescriptors = Annotations["MetaDescriptors"];
|
|
33
|
+
export type MetaFunction = Annotations["MetaFunction"];
|
|
34
|
+
|
|
35
|
+
// headers
|
|
36
|
+
export type HeadersArgs = Annotations["HeadersArgs"];
|
|
37
|
+
export type HeadersFunction = Annotations["HeadersFunction"];
|
|
38
|
+
|
|
39
|
+
// middleware
|
|
40
|
+
export type MiddlewareFunction = Annotations["MiddlewareFunction"];
|
|
41
|
+
|
|
42
|
+
// clientMiddleware
|
|
43
|
+
export type ClientMiddlewareFunction = Annotations["ClientMiddlewareFunction"];
|
|
44
|
+
|
|
45
|
+
// loader
|
|
46
|
+
export type LoaderArgs = Annotations["LoaderArgs"];
|
|
47
|
+
|
|
48
|
+
// clientLoader
|
|
49
|
+
export type ClientLoaderArgs = Annotations["ClientLoaderArgs"];
|
|
50
|
+
|
|
51
|
+
// action
|
|
52
|
+
export type ActionArgs = Annotations["ActionArgs"];
|
|
53
|
+
|
|
54
|
+
// clientAction
|
|
55
|
+
export type ClientActionArgs = Annotations["ClientActionArgs"];
|
|
56
|
+
|
|
57
|
+
// HydrateFallback
|
|
58
|
+
export type HydrateFallbackProps = Annotations["HydrateFallbackProps"];
|
|
59
|
+
|
|
60
|
+
// Component
|
|
61
|
+
export type ComponentProps = Annotations["ComponentProps"];
|
|
62
|
+
|
|
63
|
+
// ErrorBoundary
|
|
64
|
+
export type ErrorBoundaryProps = Annotations["ErrorBoundaryProps"];
|
|
65
|
+
}
|
package/templates/apps/react-router/.react-router/types/src/routes/(dashboard)/+types/index.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Generated by React Router
|
|
2
|
+
|
|
3
|
+
import type { GetInfo, GetAnnotations } from "react-router/internal";
|
|
4
|
+
|
|
5
|
+
type Module = typeof import("../index.js")
|
|
6
|
+
|
|
7
|
+
type Info = GetInfo<{
|
|
8
|
+
file: "./routes/(dashboard)/index.tsx",
|
|
9
|
+
module: Module
|
|
10
|
+
}>
|
|
11
|
+
|
|
12
|
+
type Matches = [{
|
|
13
|
+
id: "root";
|
|
14
|
+
module: typeof import("../../../root.js");
|
|
15
|
+
}, {
|
|
16
|
+
id: "routes/(dashboard)/layout";
|
|
17
|
+
module: typeof import("../layout.js");
|
|
18
|
+
}, {
|
|
19
|
+
id: "routes/(dashboard)/index";
|
|
20
|
+
module: typeof import("../index.js");
|
|
21
|
+
}];
|
|
22
|
+
|
|
23
|
+
type Annotations = GetAnnotations<Info & { module: Module, matches: Matches }, false>;
|
|
24
|
+
|
|
25
|
+
export namespace Route {
|
|
26
|
+
// links
|
|
27
|
+
export type LinkDescriptors = Annotations["LinkDescriptors"];
|
|
28
|
+
export type LinksFunction = Annotations["LinksFunction"];
|
|
29
|
+
|
|
30
|
+
// meta
|
|
31
|
+
export type MetaArgs = Annotations["MetaArgs"];
|
|
32
|
+
export type MetaDescriptors = Annotations["MetaDescriptors"];
|
|
33
|
+
export type MetaFunction = Annotations["MetaFunction"];
|
|
34
|
+
|
|
35
|
+
// headers
|
|
36
|
+
export type HeadersArgs = Annotations["HeadersArgs"];
|
|
37
|
+
export type HeadersFunction = Annotations["HeadersFunction"];
|
|
38
|
+
|
|
39
|
+
// middleware
|
|
40
|
+
export type MiddlewareFunction = Annotations["MiddlewareFunction"];
|
|
41
|
+
|
|
42
|
+
// clientMiddleware
|
|
43
|
+
export type ClientMiddlewareFunction = Annotations["ClientMiddlewareFunction"];
|
|
44
|
+
|
|
45
|
+
// loader
|
|
46
|
+
export type LoaderArgs = Annotations["LoaderArgs"];
|
|
47
|
+
|
|
48
|
+
// clientLoader
|
|
49
|
+
export type ClientLoaderArgs = Annotations["ClientLoaderArgs"];
|
|
50
|
+
|
|
51
|
+
// action
|
|
52
|
+
export type ActionArgs = Annotations["ActionArgs"];
|
|
53
|
+
|
|
54
|
+
// clientAction
|
|
55
|
+
export type ClientActionArgs = Annotations["ClientActionArgs"];
|
|
56
|
+
|
|
57
|
+
// HydrateFallback
|
|
58
|
+
export type HydrateFallbackProps = Annotations["HydrateFallbackProps"];
|
|
59
|
+
|
|
60
|
+
// Component
|
|
61
|
+
export type ComponentProps = Annotations["ComponentProps"];
|
|
62
|
+
|
|
63
|
+
// ErrorBoundary
|
|
64
|
+
export type ErrorBoundaryProps = Annotations["ErrorBoundaryProps"];
|
|
65
|
+
}
|
package/templates/apps/react-router/.react-router/types/src/routes/(dashboard)/+types/layout.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// Generated by React Router
|
|
2
|
+
|
|
3
|
+
import type { GetInfo, GetAnnotations } from "react-router/internal";
|
|
4
|
+
|
|
5
|
+
type Module = typeof import("../layout.js")
|
|
6
|
+
|
|
7
|
+
type Info = GetInfo<{
|
|
8
|
+
file: "./routes/(dashboard)/layout.tsx",
|
|
9
|
+
module: Module
|
|
10
|
+
}>
|
|
11
|
+
|
|
12
|
+
type Matches = [{
|
|
13
|
+
id: "root";
|
|
14
|
+
module: typeof import("../../../root.js");
|
|
15
|
+
}, {
|
|
16
|
+
id: "routes/(dashboard)/layout";
|
|
17
|
+
module: typeof import("../layout.js");
|
|
18
|
+
}];
|
|
19
|
+
|
|
20
|
+
type Annotations = GetAnnotations<Info & { module: Module, matches: Matches }, false>;
|
|
21
|
+
|
|
22
|
+
export namespace Route {
|
|
23
|
+
// links
|
|
24
|
+
export type LinkDescriptors = Annotations["LinkDescriptors"];
|
|
25
|
+
export type LinksFunction = Annotations["LinksFunction"];
|
|
26
|
+
|
|
27
|
+
// meta
|
|
28
|
+
export type MetaArgs = Annotations["MetaArgs"];
|
|
29
|
+
export type MetaDescriptors = Annotations["MetaDescriptors"];
|
|
30
|
+
export type MetaFunction = Annotations["MetaFunction"];
|
|
31
|
+
|
|
32
|
+
// headers
|
|
33
|
+
export type HeadersArgs = Annotations["HeadersArgs"];
|
|
34
|
+
export type HeadersFunction = Annotations["HeadersFunction"];
|
|
35
|
+
|
|
36
|
+
// middleware
|
|
37
|
+
export type MiddlewareFunction = Annotations["MiddlewareFunction"];
|
|
38
|
+
|
|
39
|
+
// clientMiddleware
|
|
40
|
+
export type ClientMiddlewareFunction = Annotations["ClientMiddlewareFunction"];
|
|
41
|
+
|
|
42
|
+
// loader
|
|
43
|
+
export type LoaderArgs = Annotations["LoaderArgs"];
|
|
44
|
+
|
|
45
|
+
// clientLoader
|
|
46
|
+
export type ClientLoaderArgs = Annotations["ClientLoaderArgs"];
|
|
47
|
+
|
|
48
|
+
// action
|
|
49
|
+
export type ActionArgs = Annotations["ActionArgs"];
|
|
50
|
+
|
|
51
|
+
// clientAction
|
|
52
|
+
export type ClientActionArgs = Annotations["ClientActionArgs"];
|
|
53
|
+
|
|
54
|
+
// HydrateFallback
|
|
55
|
+
export type HydrateFallbackProps = Annotations["HydrateFallbackProps"];
|
|
56
|
+
|
|
57
|
+
// Component
|
|
58
|
+
export type ComponentProps = Annotations["ComponentProps"];
|
|
59
|
+
|
|
60
|
+
// ErrorBoundary
|
|
61
|
+
export type ErrorBoundaryProps = Annotations["ErrorBoundaryProps"];
|
|
62
|
+
}
|
package/templates/apps/react-router/.react-router/types/src/routes/(dashboard)/todos/+types/[id].ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Generated by React Router
|
|
2
|
+
|
|
3
|
+
import type { GetInfo, GetAnnotations } from "react-router/internal";
|
|
4
|
+
|
|
5
|
+
type Module = typeof import("../[id].js")
|
|
6
|
+
|
|
7
|
+
type Info = GetInfo<{
|
|
8
|
+
file: "./routes/(dashboard)/todos/[id].tsx",
|
|
9
|
+
module: Module
|
|
10
|
+
}>
|
|
11
|
+
|
|
12
|
+
type Matches = [{
|
|
13
|
+
id: "root";
|
|
14
|
+
module: typeof import("../../../../root.js");
|
|
15
|
+
}, {
|
|
16
|
+
id: "routes/(dashboard)/layout";
|
|
17
|
+
module: typeof import("../../layout.js");
|
|
18
|
+
}, {
|
|
19
|
+
id: "routes/(dashboard)/todos/[id]";
|
|
20
|
+
module: typeof import("../[id].js");
|
|
21
|
+
}];
|
|
22
|
+
|
|
23
|
+
type Annotations = GetAnnotations<Info & { module: Module, matches: Matches }, false>;
|
|
24
|
+
|
|
25
|
+
export namespace Route {
|
|
26
|
+
// links
|
|
27
|
+
export type LinkDescriptors = Annotations["LinkDescriptors"];
|
|
28
|
+
export type LinksFunction = Annotations["LinksFunction"];
|
|
29
|
+
|
|
30
|
+
// meta
|
|
31
|
+
export type MetaArgs = Annotations["MetaArgs"];
|
|
32
|
+
export type MetaDescriptors = Annotations["MetaDescriptors"];
|
|
33
|
+
export type MetaFunction = Annotations["MetaFunction"];
|
|
34
|
+
|
|
35
|
+
// headers
|
|
36
|
+
export type HeadersArgs = Annotations["HeadersArgs"];
|
|
37
|
+
export type HeadersFunction = Annotations["HeadersFunction"];
|
|
38
|
+
|
|
39
|
+
// middleware
|
|
40
|
+
export type MiddlewareFunction = Annotations["MiddlewareFunction"];
|
|
41
|
+
|
|
42
|
+
// clientMiddleware
|
|
43
|
+
export type ClientMiddlewareFunction = Annotations["ClientMiddlewareFunction"];
|
|
44
|
+
|
|
45
|
+
// loader
|
|
46
|
+
export type LoaderArgs = Annotations["LoaderArgs"];
|
|
47
|
+
|
|
48
|
+
// clientLoader
|
|
49
|
+
export type ClientLoaderArgs = Annotations["ClientLoaderArgs"];
|
|
50
|
+
|
|
51
|
+
// action
|
|
52
|
+
export type ActionArgs = Annotations["ActionArgs"];
|
|
53
|
+
|
|
54
|
+
// clientAction
|
|
55
|
+
export type ClientActionArgs = Annotations["ClientActionArgs"];
|
|
56
|
+
|
|
57
|
+
// HydrateFallback
|
|
58
|
+
export type HydrateFallbackProps = Annotations["HydrateFallbackProps"];
|
|
59
|
+
|
|
60
|
+
// Component
|
|
61
|
+
export type ComponentProps = Annotations["ComponentProps"];
|
|
62
|
+
|
|
63
|
+
// ErrorBoundary
|
|
64
|
+
export type ErrorBoundaryProps = Annotations["ErrorBoundaryProps"];
|
|
65
|
+
}
|
package/templates/apps/react-router/.react-router/types/src/routes/(dashboard)/todos/+types/index.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Generated by React Router
|
|
2
|
+
|
|
3
|
+
import type { GetInfo, GetAnnotations } from "react-router/internal";
|
|
4
|
+
|
|
5
|
+
type Module = typeof import("../index.js")
|
|
6
|
+
|
|
7
|
+
type Info = GetInfo<{
|
|
8
|
+
file: "./routes/(dashboard)/todos/index.tsx",
|
|
9
|
+
module: Module
|
|
10
|
+
}>
|
|
11
|
+
|
|
12
|
+
type Matches = [{
|
|
13
|
+
id: "root";
|
|
14
|
+
module: typeof import("../../../../root.js");
|
|
15
|
+
}, {
|
|
16
|
+
id: "routes/(dashboard)/layout";
|
|
17
|
+
module: typeof import("../../layout.js");
|
|
18
|
+
}, {
|
|
19
|
+
id: "routes/(dashboard)/todos/index";
|
|
20
|
+
module: typeof import("../index.js");
|
|
21
|
+
}];
|
|
22
|
+
|
|
23
|
+
type Annotations = GetAnnotations<Info & { module: Module, matches: Matches }, false>;
|
|
24
|
+
|
|
25
|
+
export namespace Route {
|
|
26
|
+
// links
|
|
27
|
+
export type LinkDescriptors = Annotations["LinkDescriptors"];
|
|
28
|
+
export type LinksFunction = Annotations["LinksFunction"];
|
|
29
|
+
|
|
30
|
+
// meta
|
|
31
|
+
export type MetaArgs = Annotations["MetaArgs"];
|
|
32
|
+
export type MetaDescriptors = Annotations["MetaDescriptors"];
|
|
33
|
+
export type MetaFunction = Annotations["MetaFunction"];
|
|
34
|
+
|
|
35
|
+
// headers
|
|
36
|
+
export type HeadersArgs = Annotations["HeadersArgs"];
|
|
37
|
+
export type HeadersFunction = Annotations["HeadersFunction"];
|
|
38
|
+
|
|
39
|
+
// middleware
|
|
40
|
+
export type MiddlewareFunction = Annotations["MiddlewareFunction"];
|
|
41
|
+
|
|
42
|
+
// clientMiddleware
|
|
43
|
+
export type ClientMiddlewareFunction = Annotations["ClientMiddlewareFunction"];
|
|
44
|
+
|
|
45
|
+
// loader
|
|
46
|
+
export type LoaderArgs = Annotations["LoaderArgs"];
|
|
47
|
+
|
|
48
|
+
// clientLoader
|
|
49
|
+
export type ClientLoaderArgs = Annotations["ClientLoaderArgs"];
|
|
50
|
+
|
|
51
|
+
// action
|
|
52
|
+
export type ActionArgs = Annotations["ActionArgs"];
|
|
53
|
+
|
|
54
|
+
// clientAction
|
|
55
|
+
export type ClientActionArgs = Annotations["ClientActionArgs"];
|
|
56
|
+
|
|
57
|
+
// HydrateFallback
|
|
58
|
+
export type HydrateFallbackProps = Annotations["HydrateFallbackProps"];
|
|
59
|
+
|
|
60
|
+
// Component
|
|
61
|
+
export type ComponentProps = Annotations["ComponentProps"];
|
|
62
|
+
|
|
63
|
+
// ErrorBoundary
|
|
64
|
+
export type ErrorBoundaryProps = Annotations["ErrorBoundaryProps"];
|
|
65
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "react-router",
|
|
3
3
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
-
"sourceRoot": "
|
|
4
|
+
"sourceRoot": "apps/react-router",
|
|
5
5
|
"projectType": "application",
|
|
6
6
|
"tags": [],
|
|
7
7
|
"targets": {
|
|
8
8
|
"dev": {
|
|
9
9
|
"executor": "nx:run-commands",
|
|
10
10
|
"options": {
|
|
11
|
-
"cwd": "apps/
|
|
11
|
+
"cwd": "apps/react-router",
|
|
12
12
|
"command": "bunx react-router dev --port 3000"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"build": {
|
|
16
16
|
"executor": "nx:run-commands",
|
|
17
17
|
"options": {
|
|
18
|
-
"cwd": "apps/
|
|
18
|
+
"cwd": "apps/react-router",
|
|
19
19
|
"command": "bunx react-router build"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) SalesStar Limited 2026.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import type { Route } from "
|
|
5
|
+
import type { Route } from "../+types/root";
|
|
6
6
|
import { isRouteErrorResponse } from "react-router";
|
|
7
7
|
|
|
8
8
|
export const ErrorBoundary = ({ error }: Route.ErrorBoundaryProps) => {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Aron Weston 2026.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { Route } from "./+types/index";
|
|
6
|
+
import { Home } from "../../surfaces/home/home";
|
|
7
|
+
import { bootstrapHome } from "../../surfaces/home/bootstrap";
|
|
8
|
+
|
|
9
|
+
export async function clientLoader(_args: Route.ClientLoaderArgs) {
|
|
10
|
+
return bootstrapHome();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function meta({ loaderData: bootstrap }: Route.MetaArgs) {
|
|
14
|
+
return [{ title: "Home" }, { name: "description", content: "Home" }];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default function HomePage({ loaderData: bootstrap }: Route.ComponentProps) {
|
|
18
|
+
return <Home bootstrap={bootstrap} />;
|
|
19
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Aron Weston 2026.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { convexQuery } from "@convex-dev/react-query";
|
|
6
|
+
import type { CSSProperties } from "react";
|
|
7
|
+
import { Outlet, redirect } from "react-router";
|
|
8
|
+
|
|
9
|
+
import { api } from "@/api/_generated/api";
|
|
10
|
+
import { SidebarInset, SidebarProvider } from "@/ui/base/side_bar";
|
|
11
|
+
import { queryClient } from "@/web/providers/api_auth_provider";
|
|
12
|
+
import { Sidebar } from "@/web/surfaces/sidebar/sidebar";
|
|
13
|
+
|
|
14
|
+
import type { Route } from "./+types/layout";
|
|
15
|
+
|
|
16
|
+
export async function clientLoader(_args: Route.ClientLoaderArgs) {
|
|
17
|
+
try {
|
|
18
|
+
await queryClient.ensureQueryData(convexQuery(api.todos.crud.listTodos, {}));
|
|
19
|
+
} catch {
|
|
20
|
+
return redirect("/sign-in");
|
|
21
|
+
}
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default function DashboardLayout() {
|
|
26
|
+
return (
|
|
27
|
+
<SidebarProvider
|
|
28
|
+
style={{ "--sidebar-width": "265px" } as CSSProperties}
|
|
29
|
+
defaultOpen={true}
|
|
30
|
+
>
|
|
31
|
+
<Sidebar />
|
|
32
|
+
<SidebarInset>
|
|
33
|
+
<Outlet />
|
|
34
|
+
</SidebarInset>
|
|
35
|
+
</SidebarProvider>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Aron Weston 2026.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { Route } from "@/router/src/routes/(dashboard)/+types";
|
|
6
|
+
import { bootstrapSingleTodo } from "@/web/surfaces/todos/single_todo/bootstrap";
|
|
7
|
+
import { SingleTodo } from "@/web/surfaces/todos/single_todo/single_todo";
|
|
8
|
+
|
|
9
|
+
export async function clientLoader({ params }: Route.ClientLoaderArgs) {
|
|
10
|
+
return bootstrapSingleTodo({ params });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function meta({ loaderData: bootstrap }: Route.MetaArgs) {
|
|
14
|
+
return [{ title: bootstrap?.todo?.title ?? "Todo" }, { name: "description", content: "Todo" }];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default function TodoPage({ loaderData: bootstrap }: Route.ComponentProps) {
|
|
18
|
+
return <SingleTodo bootstrap={bootstrap} />;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Aron Weston 2026.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { Route } from "./+types/index";
|
|
6
|
+
import { AllTodos } from "../../../surfaces/todos/all_todos/all_todos";
|
|
7
|
+
import { bootstrapAllTodos } from "../../../surfaces/todos/all_todos/bootstrap";
|
|
8
|
+
|
|
9
|
+
export async function clientLoader(_args: Route.ClientLoaderArgs) {
|
|
10
|
+
return bootstrapAllTodos();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function meta({ loaderData: bootstrap }: Route.MetaArgs) {
|
|
14
|
+
return [{ title: "Todos" }, { name: "description", content: "Todos" }];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default function TodosPage({ loaderData: bootstrap }: Route.ComponentProps) {
|
|
18
|
+
return <AllTodos bootstrap={bootstrap} />;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { index, layout, prefix, type RouteConfig, route } from "@react-router/dev/routes";
|
|
2
|
+
|
|
3
|
+
export default [
|
|
4
|
+
layout("./routes/(auth)/layout.tsx", [route("/sign-in/*", "./routes/(auth)/sign-in/index.tsx")]),
|
|
5
|
+
layout("./routes/(dashboard)/layout.tsx", [
|
|
6
|
+
index("./routes/(dashboard)/index.tsx"),
|
|
7
|
+
...prefix("todos", [
|
|
8
|
+
index("./routes/(dashboard)/todos/index.tsx"),
|
|
9
|
+
route(":id", "./routes/(dashboard)/todos/[id].tsx"),
|
|
10
|
+
]),
|
|
11
|
+
]),
|
|
12
|
+
] satisfies RouteConfig;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Aron Weston 2026.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { useMemo, useRef } from "react";
|
|
6
|
+
|
|
7
|
+
import type { HomeBootstrap } from "@/web/surfaces/home/bootstrap";
|
|
8
|
+
import { installHome } from "@/web/surfaces/home/install";
|
|
9
|
+
import { createLayout } from "@/web/surfaces/home/layout";
|
|
10
|
+
|
|
11
|
+
export type HomeProps = {
|
|
12
|
+
bootstrap: HomeBootstrap;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const Home = ({ bootstrap }: HomeProps) => {
|
|
16
|
+
const { layout, Layout } = useMemo(() => createLayout(), []);
|
|
17
|
+
const installed = useRef(false);
|
|
18
|
+
|
|
19
|
+
if (!installed.current) {
|
|
20
|
+
installed.current = true;
|
|
21
|
+
installHome({ layout, bootstrap });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return <Layout />;
|
|
25
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Aron Weston 2026.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { HomeBootstrap } from "@/web/surfaces/home/bootstrap";
|
|
6
|
+
import type { HomeLayoutController } from "@/web/surfaces/home/layout";
|
|
7
|
+
|
|
8
|
+
export type InstallHomeOpts = {
|
|
9
|
+
layout: HomeLayoutController;
|
|
10
|
+
bootstrap: HomeBootstrap;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const installHome = ({ layout, bootstrap }: InstallHomeOpts) => {
|
|
14
|
+
import("@/web/surfaces/home/main/create").then(({ createMain }) => {
|
|
15
|
+
layout.setMain(createMain({ bootstrap }));
|
|
16
|
+
});
|
|
17
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Aron Weston 2026.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { action, observable } from "mobx";
|
|
6
|
+
import { observer } from "mobx-react-lite";
|
|
7
|
+
import type { ComponentType } from "react";
|
|
8
|
+
|
|
9
|
+
import { Skeleton } from "@/ui/base/skeleton";
|
|
10
|
+
|
|
11
|
+
export class HomeLayoutController {
|
|
12
|
+
@observable.ref
|
|
13
|
+
accessor Main: ComponentType | undefined = undefined;
|
|
14
|
+
|
|
15
|
+
@action
|
|
16
|
+
setMain(Main: ComponentType) {
|
|
17
|
+
this.Main = Main;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const createLayout = () => {
|
|
22
|
+
const layout = new HomeLayoutController();
|
|
23
|
+
return {
|
|
24
|
+
layout,
|
|
25
|
+
Layout: observer(() => {
|
|
26
|
+
const Main = layout.Main;
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<div className="flex w-full flex-1 flex-col">
|
|
30
|
+
{Main ? <Main /> : <Skeleton className="h-64 w-full rounded-md" />}
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}),
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Aron Weston 2026.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { useUser } from "@clerk/react-router";
|
|
6
|
+
import { observer } from "mobx-react-lite";
|
|
7
|
+
import { Link } from "react-router";
|
|
8
|
+
|
|
9
|
+
import { Button } from "@/ui/base/button";
|
|
10
|
+
import type { HomeBootstrap } from "@/web/surfaces/home/bootstrap";
|
|
11
|
+
|
|
12
|
+
export type CreateHomeMainOpts = {
|
|
13
|
+
bootstrap: HomeBootstrap;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const createMain = ({ bootstrap: _bootstrap }: CreateHomeMainOpts) => {
|
|
17
|
+
return observer(() => {
|
|
18
|
+
const { user } = useUser();
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<main className="flex flex-1 flex-col items-center justify-center gap-4 p-8">
|
|
22
|
+
<h1 className="text-3xl font-bold">
|
|
23
|
+
Welcome{user?.firstName ? `, ${user.firstName}` : ""}
|
|
24
|
+
</h1>
|
|
25
|
+
<p className="text-muted-foreground">Get started by managing your todos.</p>
|
|
26
|
+
<Button asChild>
|
|
27
|
+
<Link to="/todos">View Todos</Link>
|
|
28
|
+
</Button>
|
|
29
|
+
</main>
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Aron Weston 2026.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SidebarLayoutController } from "@/web/surfaces/sidebar/layout";
|
|
6
|
+
|
|
7
|
+
type InstallSidebarOpts = {
|
|
8
|
+
layout: SidebarLayoutController;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const installSidebar = ({ layout }: InstallSidebarOpts) => {
|
|
12
|
+
import("@/web/surfaces/sidebar/nav_main/create").then(({ createNavMain }) => {
|
|
13
|
+
layout.setNavMain(createNavMain());
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
import("@/web/surfaces/sidebar/nav_secondary/create").then(({ createNavSecondary }) => {
|
|
17
|
+
layout.setNavSecondary(createNavSecondary());
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
import("@/web/surfaces/sidebar/user_menu/create").then(({ createUserMenu }) => {
|
|
21
|
+
layout.setUserMenu(createUserMenu());
|
|
22
|
+
});
|
|
23
|
+
};
|