create-user-hub 0.0.0-stage → 0.1.2
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 +26 -2
- package/index.js +192 -0
- package/package.json +12 -4
- package/template/.env.example +7 -0
- package/template/CLAUDE.md +24 -0
- package/template/README.md +28 -0
- package/template/biome.json +46 -0
- package/template/components.json +25 -0
- package/template/convex/_generated/api.ts +56 -0
- package/template/convex/_generated/dataModel.ts +60 -0
- package/template/convex/_generated/server.ts +175 -0
- package/template/convex/auth.config.ts +7 -0
- package/template/convex/hub.ts +2 -0
- package/template/convex/me.ts +18 -0
- package/template/convex/model/notes.ts +25 -0
- package/template/convex/notes.ts +41 -0
- package/template/convex/schema.ts +10 -0
- package/template/convex/tsconfig.json +26 -0
- package/template/convex.json +9 -0
- package/template/gitignore +11 -0
- package/template/package.json +41 -0
- package/template/scripts/setup.ts +167 -0
- package/template/server.ts +50 -0
- package/template/src/components/ui/badge.tsx +51 -0
- package/template/src/components/ui/button.tsx +55 -0
- package/template/src/components/ui/card.tsx +99 -0
- package/template/src/components/ui/empty.tsx +103 -0
- package/template/src/components/ui/field.tsx +236 -0
- package/template/src/components/ui/input.tsx +19 -0
- package/template/src/components/ui/item.tsx +201 -0
- package/template/src/components/ui/label.tsx +17 -0
- package/template/src/components/ui/separator.tsx +22 -0
- package/template/src/components/ui/skeleton.tsx +13 -0
- package/template/src/lib/utils.ts +1 -0
- package/template/src/routeTree.gen.ts +86 -0
- package/template/src/router.tsx +16 -0
- package/template/src/routes/__root.tsx +81 -0
- package/template/src/routes/facilitator.tsx +100 -0
- package/template/src/routes/index.tsx +142 -0
- package/template/src/styles.css +137 -0
- package/template/tsconfig.json +27 -0
- package/template/vite.config.ts +15 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRouter } from "@tanstack/react-router";
|
|
2
|
+
import { routeTree } from "./routeTree.gen";
|
|
3
|
+
|
|
4
|
+
export function getRouter() {
|
|
5
|
+
return createRouter({
|
|
6
|
+
routeTree,
|
|
7
|
+
scrollRestoration: true,
|
|
8
|
+
defaultPreload: "intent",
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module "@tanstack/react-router" {
|
|
13
|
+
interface Register {
|
|
14
|
+
router: ReturnType<typeof getRouter>;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { createRootRoute, HeadContent, Scripts } from "@tanstack/react-router";
|
|
2
|
+
import {
|
|
3
|
+
ConvexHubAuthProvider,
|
|
4
|
+
HubSignedIn,
|
|
5
|
+
} from "@user-hub/auth/convex-react";
|
|
6
|
+
import { ConvexReactClient } from "convex/react";
|
|
7
|
+
import {
|
|
8
|
+
Empty,
|
|
9
|
+
EmptyDescription,
|
|
10
|
+
EmptyHeader,
|
|
11
|
+
EmptyTitle,
|
|
12
|
+
} from "@/components/ui/empty";
|
|
13
|
+
import { Skeleton } from "@/components/ui/skeleton";
|
|
14
|
+
import appCss from "@/styles.css?url";
|
|
15
|
+
import { APP_KEY } from "../../convex/hub";
|
|
16
|
+
|
|
17
|
+
const CONVEX_URL = import.meta.env.VITE_CONVEX_URL;
|
|
18
|
+
if (!CONVEX_URL) {
|
|
19
|
+
throw new Error("Missing VITE_CONVEX_URL: run `bun run setup` first");
|
|
20
|
+
}
|
|
21
|
+
const convex = new ConvexReactClient(CONVEX_URL);
|
|
22
|
+
|
|
23
|
+
export const Route = createRootRoute({
|
|
24
|
+
head: () => ({
|
|
25
|
+
meta: [
|
|
26
|
+
{ charSet: "utf-8" },
|
|
27
|
+
{ name: "viewport", content: "width=device-width, initial-scale=1" },
|
|
28
|
+
{ title: "__APP_NAME__" },
|
|
29
|
+
],
|
|
30
|
+
links: [{ rel: "stylesheet", href: appCss }],
|
|
31
|
+
}),
|
|
32
|
+
shellComponent: RootDocument,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// The hub providers go inside <body>, never around <html>: they always render
|
|
36
|
+
// their children, and HubSignedIn decides what a visitor sees.
|
|
37
|
+
function RootDocument({ children }: { children: React.ReactNode }) {
|
|
38
|
+
return (
|
|
39
|
+
<html lang="en" className="dark">
|
|
40
|
+
<head>
|
|
41
|
+
<HeadContent />
|
|
42
|
+
</head>
|
|
43
|
+
<body>
|
|
44
|
+
<ConvexHubAuthProvider
|
|
45
|
+
client={convex}
|
|
46
|
+
app={APP_KEY}
|
|
47
|
+
hubUrl={import.meta.env.VITE_HUB_URL}
|
|
48
|
+
>
|
|
49
|
+
<HubSignedIn signedOut={<SignedOut />} loading={<Loading />}>
|
|
50
|
+
{children}
|
|
51
|
+
</HubSignedIn>
|
|
52
|
+
</ConvexHubAuthProvider>
|
|
53
|
+
<Scripts />
|
|
54
|
+
</body>
|
|
55
|
+
</html>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function SignedOut() {
|
|
60
|
+
return (
|
|
61
|
+
<main className="flex min-h-svh items-center justify-center p-4">
|
|
62
|
+
<Empty>
|
|
63
|
+
<EmptyHeader>
|
|
64
|
+
<EmptyTitle>Scan your badge to sign in</EmptyTitle>
|
|
65
|
+
<EmptyDescription>
|
|
66
|
+
Your badge's QR code brings you here, signed in.
|
|
67
|
+
</EmptyDescription>
|
|
68
|
+
</EmptyHeader>
|
|
69
|
+
</Empty>
|
|
70
|
+
</main>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function Loading() {
|
|
75
|
+
return (
|
|
76
|
+
<main className="mx-auto flex max-w-2xl flex-col gap-4 p-4">
|
|
77
|
+
<Skeleton className="h-32 w-full" />
|
|
78
|
+
<Skeleton className="h-48 w-full" />
|
|
79
|
+
</main>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { createFileRoute, Link } from "@tanstack/react-router";
|
|
2
|
+
import { useHubUser } from "@user-hub/auth/convex-react";
|
|
3
|
+
import { useQuery } from "convex/react";
|
|
4
|
+
import { ArrowLeftIcon } from "lucide-react";
|
|
5
|
+
import { Button } from "@/components/ui/button";
|
|
6
|
+
import {
|
|
7
|
+
Card,
|
|
8
|
+
CardContent,
|
|
9
|
+
CardDescription,
|
|
10
|
+
CardHeader,
|
|
11
|
+
CardTitle,
|
|
12
|
+
} from "@/components/ui/card";
|
|
13
|
+
import {
|
|
14
|
+
Empty,
|
|
15
|
+
EmptyDescription,
|
|
16
|
+
EmptyHeader,
|
|
17
|
+
EmptyTitle,
|
|
18
|
+
} from "@/components/ui/empty";
|
|
19
|
+
import {
|
|
20
|
+
Item,
|
|
21
|
+
ItemContent,
|
|
22
|
+
ItemDescription,
|
|
23
|
+
ItemGroup,
|
|
24
|
+
ItemTitle,
|
|
25
|
+
} from "@/components/ui/item";
|
|
26
|
+
import { api } from "../../convex/_generated/api";
|
|
27
|
+
|
|
28
|
+
export const Route = createFileRoute("/facilitator")({
|
|
29
|
+
component: Facilitator,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// Hidden from members in the UI; the real protection is requireFacilitator in
|
|
33
|
+
// convex/notes.ts, which refuses members on the server.
|
|
34
|
+
function Facilitator() {
|
|
35
|
+
const me = useHubUser();
|
|
36
|
+
|
|
37
|
+
if (me?.role !== "facilitator") {
|
|
38
|
+
return (
|
|
39
|
+
<main className="flex min-h-svh items-center justify-center p-4">
|
|
40
|
+
<Empty>
|
|
41
|
+
<EmptyHeader>
|
|
42
|
+
<EmptyTitle>This page is for facilitators</EmptyTitle>
|
|
43
|
+
<EmptyDescription>
|
|
44
|
+
<Link to="/">Back to your page</Link>
|
|
45
|
+
</EmptyDescription>
|
|
46
|
+
</EmptyHeader>
|
|
47
|
+
</Empty>
|
|
48
|
+
</main>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
return <AllNotes />;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function AllNotes() {
|
|
55
|
+
const notes = useQuery(api.notes.all);
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<main className="mx-auto flex max-w-2xl flex-col gap-4 p-4">
|
|
59
|
+
<Button
|
|
60
|
+
variant="ghost"
|
|
61
|
+
className="self-start"
|
|
62
|
+
nativeButton={false}
|
|
63
|
+
render={<Link to="/" />}
|
|
64
|
+
>
|
|
65
|
+
<ArrowLeftIcon data-icon="inline-start" />
|
|
66
|
+
Back
|
|
67
|
+
</Button>
|
|
68
|
+
<Card>
|
|
69
|
+
<CardHeader>
|
|
70
|
+
<CardTitle>Everyone's notes</CardTitle>
|
|
71
|
+
<CardDescription>Only facilitators can load these.</CardDescription>
|
|
72
|
+
</CardHeader>
|
|
73
|
+
<CardContent>
|
|
74
|
+
{notes?.length === 0 ? (
|
|
75
|
+
<Empty className="border">
|
|
76
|
+
<EmptyHeader>
|
|
77
|
+
<EmptyTitle>No notes yet</EmptyTitle>
|
|
78
|
+
</EmptyHeader>
|
|
79
|
+
</Empty>
|
|
80
|
+
) : (
|
|
81
|
+
<ItemGroup className="gap-2">
|
|
82
|
+
{notes?.map((note) => (
|
|
83
|
+
<Item key={note._id} variant="outline">
|
|
84
|
+
<ItemContent className="min-w-0">
|
|
85
|
+
<ItemTitle className="max-w-full">
|
|
86
|
+
<span className="truncate">{note.text}</span>
|
|
87
|
+
</ItemTitle>
|
|
88
|
+
<ItemDescription className="truncate">
|
|
89
|
+
{note.personId}
|
|
90
|
+
</ItemDescription>
|
|
91
|
+
</ItemContent>
|
|
92
|
+
</Item>
|
|
93
|
+
))}
|
|
94
|
+
</ItemGroup>
|
|
95
|
+
)}
|
|
96
|
+
</CardContent>
|
|
97
|
+
</Card>
|
|
98
|
+
</main>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { createFileRoute, Link } from "@tanstack/react-router";
|
|
2
|
+
import { useHubSignOut, useHubUser } from "@user-hub/auth/convex-react";
|
|
3
|
+
import { useMutation, useQuery } from "convex/react";
|
|
4
|
+
import { LogOutIcon, ShieldIcon } from "lucide-react";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { Badge } from "@/components/ui/badge";
|
|
7
|
+
import { Button } from "@/components/ui/button";
|
|
8
|
+
import {
|
|
9
|
+
Card,
|
|
10
|
+
CardAction,
|
|
11
|
+
CardContent,
|
|
12
|
+
CardDescription,
|
|
13
|
+
CardHeader,
|
|
14
|
+
CardTitle,
|
|
15
|
+
} from "@/components/ui/card";
|
|
16
|
+
import {
|
|
17
|
+
Empty,
|
|
18
|
+
EmptyDescription,
|
|
19
|
+
EmptyHeader,
|
|
20
|
+
EmptyTitle,
|
|
21
|
+
} from "@/components/ui/empty";
|
|
22
|
+
import { Field, FieldLabel } from "@/components/ui/field";
|
|
23
|
+
import { Input } from "@/components/ui/input";
|
|
24
|
+
import {
|
|
25
|
+
Item,
|
|
26
|
+
ItemContent,
|
|
27
|
+
ItemDescription,
|
|
28
|
+
ItemGroup,
|
|
29
|
+
ItemTitle,
|
|
30
|
+
} from "@/components/ui/item";
|
|
31
|
+
import { api } from "../../convex/_generated/api";
|
|
32
|
+
|
|
33
|
+
export const Route = createFileRoute("/")({ component: Home });
|
|
34
|
+
|
|
35
|
+
function Home() {
|
|
36
|
+
const me = useHubUser();
|
|
37
|
+
const signOut = useHubSignOut();
|
|
38
|
+
const server = useQuery(api.me.get);
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<main className="mx-auto flex max-w-2xl flex-col gap-4 p-4">
|
|
42
|
+
<Card>
|
|
43
|
+
<CardHeader>
|
|
44
|
+
<CardDescription>Signed in with your badge</CardDescription>
|
|
45
|
+
<CardTitle className="flex flex-wrap items-center gap-2 text-xl">
|
|
46
|
+
{me?.name}
|
|
47
|
+
{me?.role === "facilitator" && <Badge>Facilitator</Badge>}
|
|
48
|
+
</CardTitle>
|
|
49
|
+
<CardAction>
|
|
50
|
+
<Button variant="outline" size="sm" onClick={signOut}>
|
|
51
|
+
<LogOutIcon data-icon="inline-start" />
|
|
52
|
+
Sign out
|
|
53
|
+
</Button>
|
|
54
|
+
</CardAction>
|
|
55
|
+
</CardHeader>
|
|
56
|
+
<CardContent className="flex flex-col gap-3 text-sm text-muted-foreground">
|
|
57
|
+
<p>Team: {me?.team ?? "none"}</p>
|
|
58
|
+
<p>
|
|
59
|
+
Checked by the server:{" "}
|
|
60
|
+
{server === undefined
|
|
61
|
+
? "checking…"
|
|
62
|
+
: server
|
|
63
|
+
? `${server.name} (${server.role})`
|
|
64
|
+
: "not signed in"}
|
|
65
|
+
</p>
|
|
66
|
+
{me?.role === "facilitator" && (
|
|
67
|
+
<Button
|
|
68
|
+
variant="outline"
|
|
69
|
+
className="self-start"
|
|
70
|
+
nativeButton={false}
|
|
71
|
+
render={<Link to="/facilitator" />}
|
|
72
|
+
>
|
|
73
|
+
<ShieldIcon data-icon="inline-start" />
|
|
74
|
+
Facilitator page
|
|
75
|
+
</Button>
|
|
76
|
+
)}
|
|
77
|
+
</CardContent>
|
|
78
|
+
</Card>
|
|
79
|
+
<Notes />
|
|
80
|
+
</main>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function Notes() {
|
|
85
|
+
const notes = useQuery(api.notes.mine);
|
|
86
|
+
const add = useMutation(api.notes.add);
|
|
87
|
+
const [text, setText] = useState("");
|
|
88
|
+
|
|
89
|
+
async function submit(event: React.FormEvent) {
|
|
90
|
+
event.preventDefault();
|
|
91
|
+
if (!text.trim()) return;
|
|
92
|
+
await add({ text });
|
|
93
|
+
setText("");
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return (
|
|
97
|
+
<Card>
|
|
98
|
+
<CardHeader>
|
|
99
|
+
<CardTitle>My notes</CardTitle>
|
|
100
|
+
<CardDescription>
|
|
101
|
+
Saved under your hub id, so only you see them.
|
|
102
|
+
</CardDescription>
|
|
103
|
+
</CardHeader>
|
|
104
|
+
<CardContent className="flex flex-col gap-4">
|
|
105
|
+
<form onSubmit={submit} className="flex items-end gap-2">
|
|
106
|
+
<Field className="flex-1">
|
|
107
|
+
<FieldLabel htmlFor="note">New note</FieldLabel>
|
|
108
|
+
<Input
|
|
109
|
+
id="note"
|
|
110
|
+
value={text}
|
|
111
|
+
onChange={(event) => setText(event.target.value)}
|
|
112
|
+
/>
|
|
113
|
+
</Field>
|
|
114
|
+
<Button type="submit">Add</Button>
|
|
115
|
+
</form>
|
|
116
|
+
{notes?.length === 0 ? (
|
|
117
|
+
<Empty className="border">
|
|
118
|
+
<EmptyHeader>
|
|
119
|
+
<EmptyTitle>No notes yet</EmptyTitle>
|
|
120
|
+
<EmptyDescription>Add one above.</EmptyDescription>
|
|
121
|
+
</EmptyHeader>
|
|
122
|
+
</Empty>
|
|
123
|
+
) : (
|
|
124
|
+
<ItemGroup className="gap-2">
|
|
125
|
+
{notes?.map((note) => (
|
|
126
|
+
<Item key={note._id} variant="outline">
|
|
127
|
+
<ItemContent className="min-w-0">
|
|
128
|
+
<ItemTitle className="max-w-full">
|
|
129
|
+
<span className="truncate">{note.text}</span>
|
|
130
|
+
</ItemTitle>
|
|
131
|
+
<ItemDescription>
|
|
132
|
+
{new Date(note._creationTime).toLocaleString()}
|
|
133
|
+
</ItemDescription>
|
|
134
|
+
</ItemContent>
|
|
135
|
+
</Item>
|
|
136
|
+
))}
|
|
137
|
+
</ItemGroup>
|
|
138
|
+
)}
|
|
139
|
+
</CardContent>
|
|
140
|
+
</Card>
|
|
141
|
+
);
|
|
142
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "tw-animate-css";
|
|
3
|
+
@import "shadcn/tailwind.css";
|
|
4
|
+
@import "@fontsource-variable/oxanium";
|
|
5
|
+
|
|
6
|
+
@custom-variant dark (&:is(.dark *));
|
|
7
|
+
|
|
8
|
+
:root {
|
|
9
|
+
--background: oklch(1 0 0);
|
|
10
|
+
--foreground: oklch(0.145 0 0);
|
|
11
|
+
--card: oklch(1 0 0);
|
|
12
|
+
--card-foreground: oklch(0.145 0 0);
|
|
13
|
+
--popover: oklch(1 0 0);
|
|
14
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
15
|
+
--primary: oklch(0.553 0.195 38.402);
|
|
16
|
+
--primary-foreground: oklch(0.98 0.016 73.684);
|
|
17
|
+
--secondary: oklch(0.967 0.001 286.375);
|
|
18
|
+
--secondary-foreground: oklch(0.21 0.006 285.885);
|
|
19
|
+
--muted: oklch(0.97 0 0);
|
|
20
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
21
|
+
--accent: oklch(0.97 0 0);
|
|
22
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
23
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
24
|
+
--destructive-foreground: oklch(0.577 0.245 27.325);
|
|
25
|
+
--border: oklch(0.922 0 0);
|
|
26
|
+
--input: oklch(0.922 0 0);
|
|
27
|
+
--ring: oklch(0.708 0 0);
|
|
28
|
+
--chart-1: oklch(0.879 0.169 91.605);
|
|
29
|
+
--chart-2: oklch(0.769 0.188 70.08);
|
|
30
|
+
--chart-3: oklch(0.666 0.179 58.318);
|
|
31
|
+
--chart-4: oklch(0.555 0.163 48.998);
|
|
32
|
+
--chart-5: oklch(0.473 0.137 46.201);
|
|
33
|
+
--radius: 0.625rem;
|
|
34
|
+
--sidebar: oklch(0.985 0 0);
|
|
35
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
36
|
+
--sidebar-primary: oklch(0.646 0.222 41.116);
|
|
37
|
+
--sidebar-primary-foreground: oklch(0.98 0.016 73.684);
|
|
38
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
39
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
40
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
41
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.dark {
|
|
45
|
+
--background: oklch(0.145 0 0);
|
|
46
|
+
--foreground: oklch(0.985 0 0);
|
|
47
|
+
--card: oklch(0.205 0 0);
|
|
48
|
+
--card-foreground: oklch(0.985 0 0);
|
|
49
|
+
--popover: oklch(0.205 0 0);
|
|
50
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
51
|
+
--primary: oklch(0.47 0.157 37.304);
|
|
52
|
+
--primary-foreground: oklch(0.98 0.016 73.684);
|
|
53
|
+
--secondary: oklch(0.274 0.006 286.033);
|
|
54
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
55
|
+
--muted: oklch(0.269 0 0);
|
|
56
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
57
|
+
--accent: oklch(0.269 0 0);
|
|
58
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
59
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
60
|
+
--destructive-foreground: oklch(0.637 0.237 25.331);
|
|
61
|
+
--border: oklch(1 0 0 / 10%);
|
|
62
|
+
--input: oklch(1 0 0 / 15%);
|
|
63
|
+
--ring: oklch(0.556 0 0);
|
|
64
|
+
--chart-1: oklch(0.879 0.169 91.605);
|
|
65
|
+
--chart-2: oklch(0.769 0.188 70.08);
|
|
66
|
+
--chart-3: oklch(0.666 0.179 58.318);
|
|
67
|
+
--chart-4: oklch(0.555 0.163 48.998);
|
|
68
|
+
--chart-5: oklch(0.473 0.137 46.201);
|
|
69
|
+
--sidebar: oklch(0.205 0 0);
|
|
70
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
71
|
+
--sidebar-primary: oklch(0.705 0.213 47.604);
|
|
72
|
+
--sidebar-primary-foreground: oklch(0.98 0.016 73.684);
|
|
73
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
74
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
75
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
76
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@theme inline {
|
|
80
|
+
--font-sans: "Oxanium Variable", sans-serif;
|
|
81
|
+
--color-background: var(--background);
|
|
82
|
+
--color-foreground: var(--foreground);
|
|
83
|
+
--color-card: var(--card);
|
|
84
|
+
--color-card-foreground: var(--card-foreground);
|
|
85
|
+
--color-popover: var(--popover);
|
|
86
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
87
|
+
--color-primary: var(--primary);
|
|
88
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
89
|
+
--color-secondary: var(--secondary);
|
|
90
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
91
|
+
--color-muted: var(--muted);
|
|
92
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
93
|
+
--color-accent: var(--accent);
|
|
94
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
95
|
+
--color-destructive: var(--destructive);
|
|
96
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
97
|
+
--color-border: var(--border);
|
|
98
|
+
--color-input: var(--input);
|
|
99
|
+
--color-ring: var(--ring);
|
|
100
|
+
--color-chart-1: var(--chart-1);
|
|
101
|
+
--color-chart-2: var(--chart-2);
|
|
102
|
+
--color-chart-3: var(--chart-3);
|
|
103
|
+
--color-chart-4: var(--chart-4);
|
|
104
|
+
--color-chart-5: var(--chart-5);
|
|
105
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
106
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
107
|
+
--radius-lg: var(--radius);
|
|
108
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
109
|
+
--color-sidebar: var(--sidebar);
|
|
110
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
111
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
112
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
113
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
114
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
115
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
116
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
117
|
+
--font-heading: var(--font-sans);
|
|
118
|
+
--radius-2xl: calc(var(--radius) * 1.8);
|
|
119
|
+
--radius-3xl: calc(var(--radius) * 2.2);
|
|
120
|
+
--radius-4xl: calc(var(--radius) * 2.6);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@layer base {
|
|
124
|
+
* {
|
|
125
|
+
@apply border-border outline-ring/50;
|
|
126
|
+
}
|
|
127
|
+
body {
|
|
128
|
+
@apply bg-background text-foreground;
|
|
129
|
+
}
|
|
130
|
+
html {
|
|
131
|
+
@apply font-sans;
|
|
132
|
+
}
|
|
133
|
+
button:not(:disabled),
|
|
134
|
+
[role="button"]:not(:disabled) {
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"include": ["**/*.ts", "**/*.tsx"],
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"jsx": "react-jsx",
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"paths": {
|
|
8
|
+
"@/*": ["./src/*"]
|
|
9
|
+
},
|
|
10
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
11
|
+
"types": ["vite/client", "bun"],
|
|
12
|
+
|
|
13
|
+
/* Bundler mode */
|
|
14
|
+
"moduleResolution": "bundler",
|
|
15
|
+
"allowImportingTsExtensions": true,
|
|
16
|
+
"verbatimModuleSyntax": true,
|
|
17
|
+
"noEmit": true,
|
|
18
|
+
|
|
19
|
+
/* Linting */
|
|
20
|
+
"skipLibCheck": true,
|
|
21
|
+
"strict": true,
|
|
22
|
+
"noUnusedLocals": true,
|
|
23
|
+
"noUnusedParameters": true,
|
|
24
|
+
"noFallthroughCasesInSwitch": true,
|
|
25
|
+
"noUncheckedSideEffectImports": true
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import babel from "@rolldown/plugin-babel";
|
|
2
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
3
|
+
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
|
|
4
|
+
import viteReact, { reactCompilerPreset } from "@vitejs/plugin-react";
|
|
5
|
+
import { defineConfig } from "vite";
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
resolve: { tsconfigPaths: true },
|
|
9
|
+
plugins: [
|
|
10
|
+
tailwindcss(),
|
|
11
|
+
tanstackStart(),
|
|
12
|
+
viteReact(),
|
|
13
|
+
babel({ presets: [reactCompilerPreset()] }),
|
|
14
|
+
],
|
|
15
|
+
});
|