create-questpie 1.0.0 → 2.0.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/README.md +20 -12
- package/dist/index.mjs +10 -3
- package/package.json +21 -21
- package/templates/tanstack-start/AGENTS.md +371 -318
- package/templates/tanstack-start/CLAUDE.md +84 -52
- package/templates/tanstack-start/README.md +65 -52
- package/templates/tanstack-start/components.json +20 -20
- package/templates/tanstack-start/package.json +6 -0
- package/templates/tanstack-start/questpie.config.ts +7 -7
- package/templates/tanstack-start/src/lib/auth-client.ts +3 -3
- package/templates/tanstack-start/src/lib/client.ts +13 -0
- package/templates/tanstack-start/src/lib/env.ts +19 -22
- package/templates/tanstack-start/src/lib/query-client.ts +5 -5
- package/templates/tanstack-start/src/questpie/admin/.generated/client.ts +13 -0
- package/templates/tanstack-start/src/questpie/admin/admin.ts +8 -4
- package/templates/tanstack-start/src/questpie/admin/modules.ts +1 -0
- package/templates/tanstack-start/src/questpie/server/.generated/factories.ts +194 -0
- package/templates/tanstack-start/src/questpie/server/.generated/index.ts +201 -0
- package/templates/tanstack-start/src/questpie/server/app.ts +10 -52
- package/templates/tanstack-start/src/questpie/server/collections/posts.collection.ts +39 -53
- package/templates/tanstack-start/src/questpie/server/config/admin.ts +83 -0
- package/templates/tanstack-start/src/questpie/server/config/auth.ts +8 -0
- package/templates/tanstack-start/src/questpie/server/config/openapi.ts +10 -0
- package/templates/tanstack-start/src/questpie/server/globals/site-settings.global.ts +9 -14
- package/templates/tanstack-start/src/questpie/server/modules.ts +10 -0
- package/templates/tanstack-start/src/questpie/server/questpie.config.ts +20 -0
- package/templates/tanstack-start/src/router.tsx +6 -5
- package/templates/tanstack-start/src/routes/__root.tsx +11 -9
- package/templates/tanstack-start/src/routes/admin/$.tsx +14 -13
- package/templates/tanstack-start/src/routes/admin/index.tsx +11 -10
- package/templates/tanstack-start/src/routes/admin/login.tsx +11 -10
- package/templates/tanstack-start/src/routes/admin.tsx +53 -52
- package/templates/tanstack-start/src/routes/api/{cms/$.ts → $.ts} +6 -20
- package/templates/tanstack-start/src/styles.css +109 -109
- package/templates/tanstack-start/tsconfig.json +27 -25
- package/templates/tanstack-start/vite.config.ts +5 -3
- package/templates/tanstack-start/src/lib/cms-client.ts +0 -12
- package/templates/tanstack-start/src/migrations/index.ts +0 -8
- package/templates/tanstack-start/src/questpie/admin/builder.ts +0 -4
- package/templates/tanstack-start/src/questpie/server/builder.ts +0 -4
- package/templates/tanstack-start/src/questpie/server/dashboard.ts +0 -68
- package/templates/tanstack-start/src/questpie/server/rpc.ts +0 -4
- package/templates/tanstack-start/src/questpie/server/sidebar.ts +0 -26
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { iconifyPreload } from "@questpie/vite-plugin-iconify";
|
|
2
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
2
3
|
import { devtools } from "@tanstack/devtools-vite";
|
|
3
4
|
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
|
|
4
5
|
import viteReact from "@vitejs/plugin-react";
|
|
5
|
-
import viteTsConfigPaths from "vite-tsconfig-paths";
|
|
6
|
-
import tailwindcss from "@tailwindcss/vite";
|
|
7
6
|
import { nitro } from "nitro/vite";
|
|
7
|
+
import { defineConfig } from "vite";
|
|
8
|
+
import viteTsConfigPaths from "vite-tsconfig-paths";
|
|
8
9
|
|
|
9
10
|
export default defineConfig({
|
|
10
11
|
plugins: [
|
|
12
|
+
iconifyPreload(),
|
|
11
13
|
devtools(),
|
|
12
14
|
nitro({ preset: "bun" }) as any,
|
|
13
15
|
viteTsConfigPaths({ projects: ["./tsconfig.json"] }),
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createClient } from "questpie/client";
|
|
2
|
-
import type { AppCMS, AppRpc } from "@/questpie/server/app.js";
|
|
3
|
-
|
|
4
|
-
export const client = createClient<AppCMS, AppRpc>({
|
|
5
|
-
baseURL:
|
|
6
|
-
typeof window !== "undefined"
|
|
7
|
-
? window.location.origin
|
|
8
|
-
: process.env.APP_URL || "http://localhost:3000",
|
|
9
|
-
basePath: "/api/cms",
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export type CMSClient = typeof client;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
export function configureDashboard({ d }: any) {
|
|
2
|
-
return d.dashboard({
|
|
3
|
-
title: "Dashboard",
|
|
4
|
-
description: "Overview of your content",
|
|
5
|
-
columns: 4,
|
|
6
|
-
items: [
|
|
7
|
-
{
|
|
8
|
-
type: "section",
|
|
9
|
-
label: "Content",
|
|
10
|
-
layout: "grid",
|
|
11
|
-
columns: 2,
|
|
12
|
-
items: [
|
|
13
|
-
{
|
|
14
|
-
id: "total-posts",
|
|
15
|
-
type: "stats",
|
|
16
|
-
collection: "posts",
|
|
17
|
-
label: "Total Posts",
|
|
18
|
-
span: 1,
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
id: "published-posts",
|
|
22
|
-
type: "stats",
|
|
23
|
-
collection: "posts",
|
|
24
|
-
label: "Published",
|
|
25
|
-
filter: { published: true },
|
|
26
|
-
variant: "primary",
|
|
27
|
-
span: 1,
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
type: "section",
|
|
33
|
-
label: "Recent",
|
|
34
|
-
layout: "grid",
|
|
35
|
-
columns: 4,
|
|
36
|
-
items: [
|
|
37
|
-
{
|
|
38
|
-
id: "recent-posts",
|
|
39
|
-
type: "recentItems",
|
|
40
|
-
collection: "posts",
|
|
41
|
-
label: "Recent Posts",
|
|
42
|
-
limit: 5,
|
|
43
|
-
span: 2,
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
id: "quick-actions",
|
|
47
|
-
type: "quickActions",
|
|
48
|
-
label: "Quick Actions",
|
|
49
|
-
actions: [
|
|
50
|
-
{
|
|
51
|
-
label: "New Post",
|
|
52
|
-
action: { type: "create", collection: "posts" },
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
label: "Site Settings",
|
|
56
|
-
action: {
|
|
57
|
-
type: "link",
|
|
58
|
-
href: "/admin/globals/siteSettings",
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
span: 2,
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
});
|
|
68
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { qb } from "./builder.js";
|
|
2
|
-
|
|
3
|
-
type SidebarBuilder = Parameters<
|
|
4
|
-
Parameters<ReturnType<typeof qb.collection>["sidebar"]>[0]
|
|
5
|
-
>[0];
|
|
6
|
-
|
|
7
|
-
export function configureSidebar({ s, c }: any) {
|
|
8
|
-
return s.sidebar({
|
|
9
|
-
sections: [
|
|
10
|
-
s.section({
|
|
11
|
-
id: "main",
|
|
12
|
-
title: "Content",
|
|
13
|
-
items: [
|
|
14
|
-
{
|
|
15
|
-
type: "link",
|
|
16
|
-
label: "Dashboard",
|
|
17
|
-
href: "/admin",
|
|
18
|
-
icon: c.icon("ph:house"),
|
|
19
|
-
},
|
|
20
|
-
{ type: "collection", collection: "posts" },
|
|
21
|
-
{ type: "global", global: "siteSettings" },
|
|
22
|
-
],
|
|
23
|
-
}),
|
|
24
|
-
],
|
|
25
|
-
});
|
|
26
|
-
}
|