Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,41 @@
"dev": "vite",
"build": "tsc -b && vite build",
"check-types": "tsc -b",
"sync-preset": "node ./scripts/sync-preset.mjs",
"test": "bun test",
"preview": "vite preview"
"test": "vitest run",
"preview": "vite preview",
"preset:sync": "node ./scripts/sync-preset.mjs"
},
"dependencies": {
"@base-ui-components/react": "^1.0.0-rc.0",
"@base-ui/react": "^1.3.0",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/modifiers": "^9.0.0",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@fontsource-variable/inter": "^5.2.8",
"@fontsource/geist-mono": "^5.2.7",
"@fontsource/instrument-serif": "^5.2.8",
"@fontsource/manrope": "^5.2.8",
"@fontsource/nunito": "^5.2.7",
"@hugeicons/core-free-icons": "^4.0.0",
"@hugeicons/react": "^1.1.6",
"@nivo/bar": "^0.99.0",
"@nivo/core": "^0.99.0",
"@orpc/client": "latest",
"@orpc/contract": "latest",
"@orpc/tanstack-query": "latest",
"@rudel/api-routes": "workspace:*",
"@tabler/icons-react": "^3.40.0",
"@tanstack/react-query": "^5.80.0",
"@tanstack/react-table": "^8.21.3",
"better-auth": "^1.5.4",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"date-fns": "^4.1.0",
"dialkit": "^1.1.0",
"html-to-image": "^1.11.13",
"lucide-react": "^0.564.0",
"motion": "^12.38.0",
"next-themes": "^0.4.6",
"posthog-js": "^1.292.0",
"radix-ui": "^1.4.3",
Expand All @@ -39,22 +54,29 @@
"recharts": "^3.7.0",
"remark-gfm": "^4.0.1",
"sonner": "^2.0.7",
"tailwind-merge": "^3.4.1",
"tailwind-merge": "^3.5.0",
"vaul": "^1.1.2",
"zod": "^3.25.0"
},
"devDependencies": {
"@rudel/typescript-config": "workspace:*",
"@tailwindcss/vite": "^4.1.0",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.3.0",
"@testing-library/user-event": "14.6.1",
"@types/node": "^22.0.0",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"@types/react-syntax-highlighter": "^15.5.13",
"@vitejs/plugin-react": "^5.1.1",
"agentation": "^2.3.3",
"bun-types": "latest",
"shadcn": "^3.8.5",
"jsdom": "26.1.0",
"shadcn": "^4.1.0",
"tailwindcss": "^4.1.0",
"tw-animate-css": "^1.4.0",
"typescript": "~5.9.3",
"vite": "^7.3.1"
"vite": "^7.3.1",
"vitest": "3.2.4"
}
}
6 changes: 6 additions & 0 deletions apps/web/public/shell/team-lineup-stats-panel-noise.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 9 additions & 28 deletions apps/web/scripts/sync-preset.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ const registryComponents = [

const managedPackages = {
dependencies: [
"@base-ui/react",
"@fontsource/geist-mono",
"@fontsource/nunito",
"@fontsource-variable/inter",
"@hugeicons/core-free-icons",
"@hugeicons/react",
"class-variance-authority",
"clsx",
"tailwind-merge",
Expand Down Expand Up @@ -91,20 +91,10 @@ async function syncComponentsJson(sourcePath, destinationPath) {

async function syncIndexCss(sourcePath, destinationPath) {
let content = await fs.readFile(sourcePath, "utf8");

if (!content.includes('@import "./app/preset-extensions.css";')) {
content = content.replace(
'@import "shadcn/tailwind.css";\n',
'@import "shadcn/tailwind.css";\n@import "./app/preset-extensions.css";\n',
);
}

if (!content.includes('@import "./app/luma.css";')) {
content = content.replace(
'@import "./app/preset-extensions.css";\n',
'@import "./app/preset-extensions.css";\n@import "./app/luma.css";\n',
);
}
content = content.replace(
'@import "@fontsource-variable/inter";\n',
'@import "@fontsource-variable/inter";\n@import "./app/preset-extensions.css";\n',
);
await fs.writeFile(destinationPath, content, "utf8");
}

Expand Down Expand Up @@ -237,10 +227,7 @@ async function main() {
const sourcePath = path.join(scaffoldRoot, "src", "app", "luma.css");
try {
await fs.access(sourcePath);
await copyFileWithNormalization(
sourcePath,
path.join(appRoot, managedFile),
);
await copyFileWithNormalization(sourcePath, path.join(appRoot, managedFile));
syncedFiles.push(managedFile);
} catch {
skippedFiles.push(`${managedFile} (not generated by preset)`);
Expand All @@ -249,13 +236,7 @@ async function main() {
}

const fileName = path.basename(managedFile);
const sourcePath = path.join(
scaffoldRoot,
"src",
"components",
"ui",
fileName,
);
const sourcePath = path.join(scaffoldRoot, "src", "components", "ui", fileName);
const destinationPath = path.join(appRoot, managedFile);

try {
Expand Down
45 changes: 11 additions & 34 deletions apps/web/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { useLocation } from "react-router-dom";
import { AppLoadingScreen } from "@/app/bootstrap/AppLoadingScreen";
import { ProductAnalyticsSessionSync } from "@/features/analytics/tracking/ProductAnalyticsSessionSync";
import { DeviceAuthorizationApp } from "@/features/auth/DeviceAuthorizationApp";
import { AuthenticatedApp } from "@/features/auth/AuthenticatedApp";
import { GuestApp } from "@/features/auth/GuestApp";
import {
getDeviceUserCode,
getValidRedirect,
isResetPasswordPath,
} from "@/features/auth/auth-route-utils";
import { DeviceAuthorizationApp } from "@/features/auth/DeviceAuthorizationApp";
import { GuestApp } from "@/features/auth/GuestApp";
import { ResetPasswordApp } from "@/features/auth/ResetPasswordApp";
import { ProductAnalyticsSessionSync } from "@/features/analytics/tracking/ProductAnalyticsSessionSync";
import { authClient } from "./lib/auth-client";

function App() {
Expand All @@ -27,41 +25,20 @@ function App() {
);
}

if (deviceUserCode) {
return (
<>
<ProductAnalyticsSessionSync session={session} />
return (
<>
<ProductAnalyticsSessionSync session={session} />
{deviceUserCode ? (
<DeviceAuthorizationApp
key={deviceUserCode}
deviceUserCode={deviceUserCode}
session={session ?? null}
/>
</>
);
}

if (session) {
return (
<>
<ProductAnalyticsSessionSync session={session} />
) : session ? (
<AuthenticatedApp rootRedirectTarget={rootRedirectTarget} />
</>
);
}

if (isResetPasswordPath(location.pathname)) {
return (
<>
<ProductAnalyticsSessionSync session={session} />
<ResetPasswordApp />
</>
);
}

return (
<>
<ProductAnalyticsSessionSync session={session} />
<GuestApp />
) : (
<GuestApp />
)}
</>
);
}
Expand Down
5 changes: 5 additions & 0 deletions apps/web/src/DevTools.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Agentation } from "agentation";

export function DevTools() {
return <Agentation />;
}
Loading
Loading