From 967446670ff82e02a32ede98f9867d50f5b23ad0 Mon Sep 17 00:00:00 2001 From: NONPLAY <76615486+NONPLAYT@users.noreply.github.com> Date: Wed, 1 Apr 2026 14:12:11 +0300 Subject: [PATCH 1/6] feat: vite --- .gitignore | 7 +- apps/website/Dockerfile | 40 - apps/website/app/app.css | 3 + apps/website/app/components/mdx.tsx | 15 + apps/website/app/lib/cn.ts | 1 + apps/website/app/lib/layout.shared.tsx | 17 + apps/website/app/lib/og.ts | 5 + apps/website/app/lib/source.ts | 15 + apps/website/app/root.tsx | 75 ++ apps/website/app/routes.ts | 10 + apps/website/app/routes/docs.tsx | 76 ++ apps/website/app/routes/home.tsx | 30 + apps/website/app/routes/not-found.tsx | 16 + apps/website/app/routes/og.docs.tsx | 23 + apps/website/app/routes/search.ts | 12 + apps/website/components.json | 21 - .../docs/divinemc/reference/configuration.mdx | 1 - .../ndailyrewards/configuration/config.mdx | 1 - apps/website/next.config.ts | 22 - apps/website/package.json | 62 +- apps/website/postcss.config.mjs | 5 - apps/website/public/favicon.ico | Bin 0 -> 15086 bytes apps/website/public/logo.png | Bin 5509 -> 0 bytes apps/website/react-router.config.ts | 30 + apps/website/source.config.ts | 34 +- apps/website/src/app/(home)/layout.tsx | 7 - apps/website/src/app/(home)/page.tsx | 15 - apps/website/src/app/api/search/route.ts | 5 - .../website/src/app/docs/[[...slug]]/page.tsx | 76 -- apps/website/src/app/docs/layout.tsx | 26 - .../src/app/downloads/[project]/not-found.tsx | 39 - .../src/app/downloads/[project]/page.tsx | 214 ---- apps/website/src/app/downloads/layout.tsx | 15 - apps/website/src/app/downloads/page.tsx | 212 ---- apps/website/src/app/favicon.ico | Bin 3663 -> 0 bytes apps/website/src/app/global.css | 63 - apps/website/src/app/layout.config.tsx | 84 -- apps/website/src/app/layout.tsx | 36 - apps/website/src/app/not-found.tsx | 35 - apps/website/src/app/resources/flags/page.tsx | 304 ----- apps/website/src/app/resources/layout.tsx | 15 - apps/website/src/app/resources/page.tsx | 50 - apps/website/src/app/robots.ts | 13 - apps/website/src/app/sitemap.ts | 26 - apps/website/src/app/team/layout.tsx | 16 - apps/website/src/app/team/page.tsx | 193 --- .../src/components/docs/config-viewer.tsx | 293 ----- apps/website/src/components/docs/wip.tsx | 21 - .../components/downloads/atlas-build-card.tsx | 94 -- .../downloads/atlas-builds-list.tsx | 166 --- .../components/downloads/version-selector.tsx | 161 --- apps/website/src/components/icons.tsx | 15 - .../src/components/sections/community.tsx | 67 - .../src/components/sections/footer.tsx | 143 --- apps/website/src/components/sections/hero.tsx | 67 - .../src/components/sections/projects.tsx | 112 -- apps/website/src/components/ui/avatar.tsx | 36 - apps/website/src/components/ui/button.tsx | 48 - apps/website/src/components/ui/card.tsx | 24 - apps/website/src/components/ui/checkbox.tsx | 36 - .../src/components/ui/gradient-background.tsx | 32 - apps/website/src/components/ui/input.tsx | 26 - apps/website/src/components/ui/label.tsx | 25 - apps/website/src/components/ui/pill.tsx | 41 - apps/website/src/components/ui/popover.tsx | 35 - .../website/src/components/ui/scroll-area.tsx | 51 - apps/website/src/components/ui/select.tsx | 146 --- apps/website/src/components/ui/slider.tsx | 57 - apps/website/src/components/ui/sonner.tsx | 25 - apps/website/src/config/site.ts | 15 - apps/website/src/lib/atlas.ts | 236 ---- apps/website/src/lib/flags/config.ts | 65 - .../lib/flags/environment/operatingSystem.ts | 225 ---- .../src/lib/flags/environment/serverType.ts | 61 - apps/website/src/lib/flags/flags.ts | 365 ------ apps/website/src/lib/flags/generateResult.ts | 80 -- .../environment/EnvironmentOption.ts | 6 - .../environment/EnvironmentOptions.ts | 5 - .../environment/OperatingSystemOption.ts | 14 - .../interface/environment/ServerTypeOption.ts | 14 - .../lib/flags/interface/generate/Generate.ts | 1 - .../generate/GenerateOperatingSystem.ts | 8 - apps/website/src/lib/flags/validate.ts | 55 - apps/website/src/lib/github.ts | 24 - apps/website/src/lib/source.ts | 14 - apps/website/src/lib/utils.ts | 6 - apps/website/tsconfig.json | 45 +- apps/website/vite.config.ts | 15 + bun.lock | 1109 ++++++++++------- 89 files changed, 1075 insertions(+), 4974 deletions(-) delete mode 100644 apps/website/Dockerfile create mode 100644 apps/website/app/app.css create mode 100644 apps/website/app/components/mdx.tsx create mode 100644 apps/website/app/lib/cn.ts create mode 100644 apps/website/app/lib/layout.shared.tsx create mode 100644 apps/website/app/lib/og.ts create mode 100644 apps/website/app/lib/source.ts create mode 100644 apps/website/app/root.tsx create mode 100644 apps/website/app/routes.ts create mode 100644 apps/website/app/routes/docs.tsx create mode 100644 apps/website/app/routes/home.tsx create mode 100644 apps/website/app/routes/not-found.tsx create mode 100644 apps/website/app/routes/og.docs.tsx create mode 100644 apps/website/app/routes/search.ts delete mode 100644 apps/website/components.json delete mode 100644 apps/website/next.config.ts delete mode 100644 apps/website/postcss.config.mjs create mode 100644 apps/website/public/favicon.ico delete mode 100644 apps/website/public/logo.png create mode 100644 apps/website/react-router.config.ts delete mode 100644 apps/website/src/app/(home)/layout.tsx delete mode 100644 apps/website/src/app/(home)/page.tsx delete mode 100644 apps/website/src/app/api/search/route.ts delete mode 100644 apps/website/src/app/docs/[[...slug]]/page.tsx delete mode 100644 apps/website/src/app/docs/layout.tsx delete mode 100644 apps/website/src/app/downloads/[project]/not-found.tsx delete mode 100644 apps/website/src/app/downloads/[project]/page.tsx delete mode 100644 apps/website/src/app/downloads/layout.tsx delete mode 100644 apps/website/src/app/downloads/page.tsx delete mode 100644 apps/website/src/app/favicon.ico delete mode 100644 apps/website/src/app/global.css delete mode 100644 apps/website/src/app/layout.config.tsx delete mode 100644 apps/website/src/app/layout.tsx delete mode 100644 apps/website/src/app/not-found.tsx delete mode 100644 apps/website/src/app/resources/flags/page.tsx delete mode 100644 apps/website/src/app/resources/layout.tsx delete mode 100644 apps/website/src/app/resources/page.tsx delete mode 100644 apps/website/src/app/robots.ts delete mode 100644 apps/website/src/app/sitemap.ts delete mode 100644 apps/website/src/app/team/layout.tsx delete mode 100644 apps/website/src/app/team/page.tsx delete mode 100644 apps/website/src/components/docs/config-viewer.tsx delete mode 100644 apps/website/src/components/docs/wip.tsx delete mode 100644 apps/website/src/components/downloads/atlas-build-card.tsx delete mode 100644 apps/website/src/components/downloads/atlas-builds-list.tsx delete mode 100644 apps/website/src/components/downloads/version-selector.tsx delete mode 100644 apps/website/src/components/icons.tsx delete mode 100644 apps/website/src/components/sections/community.tsx delete mode 100644 apps/website/src/components/sections/footer.tsx delete mode 100644 apps/website/src/components/sections/hero.tsx delete mode 100644 apps/website/src/components/sections/projects.tsx delete mode 100644 apps/website/src/components/ui/avatar.tsx delete mode 100644 apps/website/src/components/ui/button.tsx delete mode 100644 apps/website/src/components/ui/card.tsx delete mode 100644 apps/website/src/components/ui/checkbox.tsx delete mode 100644 apps/website/src/components/ui/gradient-background.tsx delete mode 100644 apps/website/src/components/ui/input.tsx delete mode 100644 apps/website/src/components/ui/label.tsx delete mode 100644 apps/website/src/components/ui/pill.tsx delete mode 100644 apps/website/src/components/ui/popover.tsx delete mode 100644 apps/website/src/components/ui/scroll-area.tsx delete mode 100644 apps/website/src/components/ui/select.tsx delete mode 100644 apps/website/src/components/ui/slider.tsx delete mode 100644 apps/website/src/components/ui/sonner.tsx delete mode 100644 apps/website/src/config/site.ts delete mode 100644 apps/website/src/lib/atlas.ts delete mode 100644 apps/website/src/lib/flags/config.ts delete mode 100644 apps/website/src/lib/flags/environment/operatingSystem.ts delete mode 100644 apps/website/src/lib/flags/environment/serverType.ts delete mode 100644 apps/website/src/lib/flags/flags.ts delete mode 100644 apps/website/src/lib/flags/generateResult.ts delete mode 100644 apps/website/src/lib/flags/interface/environment/EnvironmentOption.ts delete mode 100644 apps/website/src/lib/flags/interface/environment/EnvironmentOptions.ts delete mode 100644 apps/website/src/lib/flags/interface/environment/OperatingSystemOption.ts delete mode 100644 apps/website/src/lib/flags/interface/environment/ServerTypeOption.ts delete mode 100644 apps/website/src/lib/flags/interface/generate/Generate.ts delete mode 100644 apps/website/src/lib/flags/interface/generate/GenerateOperatingSystem.ts delete mode 100644 apps/website/src/lib/flags/validate.ts delete mode 100644 apps/website/src/lib/github.ts delete mode 100644 apps/website/src/lib/source.ts delete mode 100644 apps/website/src/lib/utils.ts create mode 100644 apps/website/vite.config.ts diff --git a/.gitignore b/.gitignore index d600c7a..d491acf 100644 --- a/.gitignore +++ b/.gitignore @@ -19,10 +19,9 @@ node_modules/ .env.production.local .env.local -# Next.js files -.next -out -next-env.d.ts +# Vite and React Router output +.react-router/ +build/ # Fumadocs files .source diff --git a/apps/website/Dockerfile b/apps/website/Dockerfile deleted file mode 100644 index 8894063..0000000 --- a/apps/website/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -# Build stage -FROM oven/bun:1 AS builder - -WORKDIR /app - -# Copy root package.json and workspace configuration -COPY package.json bun.lock ./ -COPY apps/website/package.json ./apps/website/ - -# Install dependencies -RUN bun install --filter @bx-team/website --ignore-scripts - -# Copy application source -COPY apps/website ./apps/website - -# Run postinstall scripts -WORKDIR /app/apps/website -RUN bun run postinstall - -# Build the application -RUN --mount=type=secret,id=github_token \ - GITHUB_TOKEN=$(cat /run/secrets/github_token) bun run build - -# Production stage -FROM oven/bun:1-slim - -WORKDIR /app - -ENV NODE_ENV=production -ENV PORT=3000 - -# Copy standalone build -COPY --from=builder /app/apps/website/.next/standalone ./ -COPY --from=builder /app/apps/website/.next/static ./apps/website/.next/static -COPY --from=builder /app/apps/website/public ./apps/website/public - -EXPOSE 3000 - -# Start the application -CMD ["bun", "apps/website/server.js"] diff --git a/apps/website/app/app.css b/apps/website/app/app.css new file mode 100644 index 0000000..50b3bc2 --- /dev/null +++ b/apps/website/app/app.css @@ -0,0 +1,3 @@ +@import 'tailwindcss'; +@import 'fumadocs-ui/css/neutral.css'; +@import 'fumadocs-ui/css/preset.css'; diff --git a/apps/website/app/components/mdx.tsx b/apps/website/app/components/mdx.tsx new file mode 100644 index 0000000..a640575 --- /dev/null +++ b/apps/website/app/components/mdx.tsx @@ -0,0 +1,15 @@ +import defaultMdxComponents from 'fumadocs-ui/mdx'; +import type { MDXComponents } from 'mdx/types'; + +export function getMDXComponents(components?: MDXComponents) { + return { + ...defaultMdxComponents, + ...components, + } satisfies MDXComponents; +} + +export const useMDXComponents = getMDXComponents; + +declare global { + type MDXProvidedComponents = ReturnType; +} diff --git a/apps/website/app/lib/cn.ts b/apps/website/app/lib/cn.ts new file mode 100644 index 0000000..ba66fd2 --- /dev/null +++ b/apps/website/app/lib/cn.ts @@ -0,0 +1 @@ +export { twMerge as cn } from 'tailwind-merge'; diff --git a/apps/website/app/lib/layout.shared.tsx b/apps/website/app/lib/layout.shared.tsx new file mode 100644 index 0000000..52e20ed --- /dev/null +++ b/apps/website/app/lib/layout.shared.tsx @@ -0,0 +1,17 @@ +import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared'; + +// fill this with your actual GitHub info, for example: +export const gitConfig = { + user: 'fuma-nama', + repo: 'fumadocs', + branch: 'main', +}; + +export function baseOptions(): BaseLayoutProps { + return { + nav: { + title: 'React Router', + }, + githubUrl: `https://github.com/${gitConfig.user}/${gitConfig.repo}`, + }; +} diff --git a/apps/website/app/lib/og.ts b/apps/website/app/lib/og.ts new file mode 100644 index 0000000..3207abc --- /dev/null +++ b/apps/website/app/lib/og.ts @@ -0,0 +1,5 @@ +export function getPageImagePath(slugs: string[]) { + const segments = [...slugs, 'image.webp']; + + return `/og/docs/${segments.join('/')}`; +} diff --git a/apps/website/app/lib/source.ts b/apps/website/app/lib/source.ts new file mode 100644 index 0000000..26e1747 --- /dev/null +++ b/apps/website/app/lib/source.ts @@ -0,0 +1,15 @@ +import { loader, type InferPageType } from 'fumadocs-core/source'; +import { docs } from 'collections/server'; + +export const source = loader({ + source: docs.toFumadocsSource(), + baseUrl: '/docs', +}); + +export async function getLLMText(page: InferPageType) { + const processed = await page.data.getText('processed'); + + return `# ${page.data.title} (${page.url}) + +${processed}`; +} diff --git a/apps/website/app/root.tsx b/apps/website/app/root.tsx new file mode 100644 index 0000000..7b36c48 --- /dev/null +++ b/apps/website/app/root.tsx @@ -0,0 +1,75 @@ +import { + isRouteErrorResponse, + Links, + Meta, + Outlet, + Scripts, + ScrollRestoration, +} from 'react-router'; +import { RootProvider } from 'fumadocs-ui/provider/react-router'; +import type { Route } from './+types/root'; +import './app.css'; +import { rewritePath } from 'fumadocs-core/negotiation'; +import NotFound from './routes/not-found'; + +export const links: Route.LinksFunction = () => [ + { rel: 'preconnect', href: 'https://fonts.googleapis.com' }, + { + rel: 'preconnect', + href: 'https://fonts.gstatic.com', + crossOrigin: 'anonymous', + }, + { + rel: 'stylesheet', + href: 'https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap', + }, +]; + +export function Layout({ children }: { children: React.ReactNode }) { + return ( + + + + + + + + + {children} + + + + + ); +} + +export default function App() { + return ; +} + +export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) { + let message = 'Oops!'; + let details = 'An unexpected error occurred.'; + let stack: string | undefined; + + if (isRouteErrorResponse(error)) { + if (error.status === 404) return ; + message = 'Error'; + details = error.statusText; + } else if (import.meta.env.DEV && error && error instanceof Error) { + details = error.message; + stack = error.stack; + } + + return ( +
+

{message}

+

{details}

+ {stack && ( +
+          {stack}
+        
+ )} +
+ ); +} diff --git a/apps/website/app/routes.ts b/apps/website/app/routes.ts new file mode 100644 index 0000000..205af2c --- /dev/null +++ b/apps/website/app/routes.ts @@ -0,0 +1,10 @@ +import { index, route, type RouteConfig } from '@react-router/dev/routes'; + +export default [ + index('routes/home.tsx'), + route('docs/*', 'routes/docs.tsx'), + route('api/search', 'routes/search.ts'), + route('og/docs/*', 'routes/og.docs.tsx'), + + route('*', 'routes/not-found.tsx'), +] satisfies RouteConfig; diff --git a/apps/website/app/routes/docs.tsx b/apps/website/app/routes/docs.tsx new file mode 100644 index 0000000..3b3e386 --- /dev/null +++ b/apps/website/app/routes/docs.tsx @@ -0,0 +1,76 @@ +import type { Route } from './+types/docs'; +import { DocsLayout } from 'fumadocs-ui/layouts/docs'; +import { + DocsBody, + DocsDescription, + DocsPage, + DocsTitle, + MarkdownCopyButton, + ViewOptionsPopover, +} from 'fumadocs-ui/layouts/docs/page'; +import { source } from '@/lib/source'; +import browserCollections from 'collections/browser'; +import { baseOptions, gitConfig } from '@/lib/layout.shared'; +import { useFumadocsLoader } from 'fumadocs-core/source/client'; +import { getPageImagePath } from '@/lib/og'; +import { useMDXComponents } from '@/components/mdx'; + +export async function loader({ params }: Route.LoaderArgs) { + const slugs = params['*'].split('/').filter((v) => v.length > 0); + const page = source.getPage(slugs); + if (!page) throw new Response('Not found', { status: 404 }); + + return { + slugs: page.slugs, + path: page.path, + pageTree: await source.serializePageTree(source.getPageTree()), + imagePath: getPageImagePath(slugs), + }; +} + +const clientLoader = browserCollections.docs.createClientLoader({ + component( + { toc, frontmatter, default: Mdx }, + // you can define props for the `` component + { + markdownUrl, + path, + imagePath, + }: { + markdownUrl: string; + path: string; + imagePath: string; + }, + ) { + return ( + + {frontmatter.title} + + + {frontmatter.title} + {frontmatter.description} +
+ + +
+ + + +
+ ); + }, +}); + +export default function Page({ loaderData }: Route.ComponentProps) { + const { slugs, path, pageTree, imagePath } = useFumadocsLoader(loaderData); + const markdownUrl = `/llms.mdx/docs/${slugs.join('/')}`; + + return ( + + {clientLoader.useContent(path, { markdownUrl, path, imagePath })} + + ); +} diff --git a/apps/website/app/routes/home.tsx b/apps/website/app/routes/home.tsx new file mode 100644 index 0000000..7f03ba9 --- /dev/null +++ b/apps/website/app/routes/home.tsx @@ -0,0 +1,30 @@ +import type { Route } from './+types/home'; +import { HomeLayout } from 'fumadocs-ui/layouts/home'; +import { Link } from 'react-router'; +import { baseOptions } from '@/lib/layout.shared'; + +export function meta({}: Route.MetaArgs) { + return [ + { title: 'New React Router App' }, + { name: 'description', content: 'Welcome to React Router!' }, + ]; +} + +export default function Home() { + return ( + +
+

Fumadocs on React Router.

+

+ The truly flexible docs framework on React.js. +

+ + Open Docs + +
+
+ ); +} diff --git a/apps/website/app/routes/not-found.tsx b/apps/website/app/routes/not-found.tsx new file mode 100644 index 0000000..dd6d44f --- /dev/null +++ b/apps/website/app/routes/not-found.tsx @@ -0,0 +1,16 @@ +import type { Route } from './+types/not-found'; +import { HomeLayout } from 'fumadocs-ui/layouts/home'; +import { baseOptions } from '@/lib/layout.shared'; +import { DefaultNotFound } from 'fumadocs-ui/layouts/home/not-found'; + +export function meta({}: Route.MetaArgs) { + return [{ title: 'Not Found' }]; +} + +export default function NotFound() { + return ( + + + + ); +} diff --git a/apps/website/app/routes/og.docs.tsx b/apps/website/app/routes/og.docs.tsx new file mode 100644 index 0000000..f5e21b0 --- /dev/null +++ b/apps/website/app/routes/og.docs.tsx @@ -0,0 +1,23 @@ +import { ImageResponse } from '@takumi-rs/image-response'; +import type { Route } from './+types/og.docs'; +import { generate as DefaultImage } from 'fumadocs-ui/og/takumi'; +import { source } from '@/lib/source'; + +export function loader({ params }: Route.LoaderArgs) { + const slugs = params['*'] + .split('/') + .filter((v) => v.length > 0) + .slice(0, -1); + const page = source.getPage(slugs); + + if (!page) throw new Response(undefined, { status: 404 }); + + return new ImageResponse( + , + { + width: 1200, + height: 630, + format: 'webp', + }, + ); +} diff --git a/apps/website/app/routes/search.ts b/apps/website/app/routes/search.ts new file mode 100644 index 0000000..9603c72 --- /dev/null +++ b/apps/website/app/routes/search.ts @@ -0,0 +1,12 @@ +import type { Route } from './+types/search'; +import { createFromSource } from 'fumadocs-core/search/server'; +import { source } from '@/lib/source'; + +const server = createFromSource(source, { + // https://docs.orama.com/docs/orama-js/supported-languages + language: 'english', +}); + +export async function loader({ request }: Route.LoaderArgs) { + return server.GET(request); +} diff --git a/apps/website/components.json b/apps/website/components.json deleted file mode 100644 index c6a3382..0000000 --- a/apps/website/components.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://ui.shadcn.com/schema.json", - "style": "new-york", - "rsc": true, - "tsx": true, - "tailwind": { - "config": "", - "css": "src/app/global.css", - "baseColor": "neutral", - "cssVariables": true, - "prefix": "" - }, - "aliases": { - "components": "@/components", - "utils": "@/lib/utils", - "ui": "@/components/ui", - "lib": "@/lib", - "hooks": "@/hooks" - }, - "iconLibrary": "lucide" -} diff --git a/apps/website/content/docs/divinemc/reference/configuration.mdx b/apps/website/content/docs/divinemc/reference/configuration.mdx index 351ae3c..dd508ba 100644 --- a/apps/website/content/docs/divinemc/reference/configuration.mdx +++ b/apps/website/content/docs/divinemc/reference/configuration.mdx @@ -4,7 +4,6 @@ title: Configuration description: This page details the various configuration settings exposed by Bukkit, Spigot and Paper. --- -import ConfigViewer from '@/components/docs/config-viewer'; This page details the various configuration settings exposed by Bukkit, Spigot and Paper. diff --git a/apps/website/content/docs/ndailyrewards/configuration/config.mdx b/apps/website/content/docs/ndailyrewards/configuration/config.mdx index 73e0c1b..c950195 100644 --- a/apps/website/content/docs/ndailyrewards/configuration/config.mdx +++ b/apps/website/content/docs/ndailyrewards/configuration/config.mdx @@ -4,7 +4,6 @@ title: Configuration description: This page details the various configuration settings exposed by NDailyRewards plugin. --- -import ConfigViewer from '@/components/docs/config-viewer'; :::warning diff --git a/apps/website/next.config.ts b/apps/website/next.config.ts deleted file mode 100644 index 8f33a57..0000000 --- a/apps/website/next.config.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { createMDX } from 'fumadocs-mdx/next'; -import type { NextConfig } from 'next'; - -const withMDX = createMDX(); - -const config: NextConfig = { - output: 'standalone', - reactStrictMode: true, - typescript: { - ignoreBuildErrors: true, - }, - images: { - remotePatterns: [ - { - protocol: 'https', - hostname: 'avatars.githubusercontent.com', - }, - ], - }, -}; - -export default withMDX(config); diff --git a/apps/website/package.json b/apps/website/package.json index 4ff64e6..2eadcc5 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -1,50 +1,38 @@ { "name": "@bx-team/website", "private": true, + "type": "module", "scripts": { - "build": "next build", - "dev": "next dev --turbopack", - "start": "next start", + "build": "react-router build", + "dev": "react-router dev", + "start": "react-router-serve ./build/server/index.js", "postinstall": "fumadocs-mdx" }, "dependencies": { - "@radix-ui/react-avatar": "^1.1.11", - "@radix-ui/react-checkbox": "^1.3.3", - "@radix-ui/react-label": "^2.1.8", - "@radix-ui/react-popover": "^1.1.15", - "@radix-ui/react-scroll-area": "^1.2.10", - "@radix-ui/react-select": "^2.2.6", - "@radix-ui/react-slider": "^1.3.6", - "@radix-ui/react-slot": "^1.2.4", - "@theguild/remark-mermaid": "^0.3.0", - "class-variance-authority": "^0.7.1", - "clsx": "^2.1.1", - "fumadocs-core": "16.7.4", + "@react-router/node": "^7.13.1", + "@react-router/serve": "^7.13.1", + "@takumi-rs/image-response": "^0.73.1", + "fumadocs-core": "16.7.5", "fumadocs-mdx": "14.2.11", - "fumadocs-ui": "16.7.4", - "lucide-react": "^0.503.0", - "next": "16.2.1", - "next-themes": "^0.4.6", - "react": "19.2.4", - "react-dom": "19.2.4", - "sonner": "^2.0.7", - "tailwind-merge": "^3.4.0", - "zod": "^4.3.6" + "fumadocs-ui": "16.7.5", + "isbot": "^5.1.36", + "lucide-react": "^0.577.0", + "react": "^19.2.4", + "react-dom": "^19.2.4", + "react-router": "^7.13.1", + "tailwind-merge": "^3.5.0" }, "devDependencies": { - "@fumadocs/cli": "^1.2.4", - "@tailwindcss/postcss": "^4.1.18", + "@react-router/dev": "^7.13.1", + "@tailwindcss/vite": "^4.2.2", "@types/mdx": "^2.0.13", - "@types/node": "22.14.0", - "@types/react": "19.2.7", - "@types/react-dom": "19.2.3", - "postcss": "^8.5.6", - "tailwindcss": "^4.1.18", - "tw-animate-css": "^1.4.0", - "typescript": "^5.9.3" - }, - "overrides": { - "@types/react": "19.2.7", - "@types/react-dom": "19.2.3" + "@types/node": "^25.5.0", + "@types/react": "^19.2.14", + "@types/react-dom": "^19.2.3", + "react-router-devtools": "^6.2.0", + "tailwindcss": "^4.2.2", + "typescript": "^5.9.3", + "vite": "^8.0.1", + "@biomejs/biome": "^2.4.8" } } diff --git a/apps/website/postcss.config.mjs b/apps/website/postcss.config.mjs deleted file mode 100644 index a34a3d5..0000000 --- a/apps/website/postcss.config.mjs +++ /dev/null @@ -1,5 +0,0 @@ -export default { - plugins: { - '@tailwindcss/postcss': {}, - }, -}; diff --git a/apps/website/public/favicon.ico b/apps/website/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..5dbdfcddcb14182535f6d32d1c900681321b1aa3 GIT binary patch literal 15086 zcmeI33v3ic7{|AFEmuJ-;v>ep_G*NPi6KM`qNryCe1PIJ8siIN1WZ(7qVa)RVtmC% z)Ch?tN+afMKm;5@rvorJk zcXnoOc4q51HBQnQH_jn!cAg&XI1?PlX>Kl^k8qq0;zkha`kY$Fxt#=KNJAE9CMdpW zqr4#g8`nTw191(+H4xW8Tmyru2I^3=J1G3emPxkPXA=3{vvuvse_WWSshqaqls^-m zgB7q8&Vk*aYRe?sn$n53dGH#%3y%^vxv{pL*-h0Z4bmb_(k6{FL7HWIz(V*HT#IcS z-wE{)+0x1U!RUPt3gB97%p}@oHxF4|6S*+Yw=_tLtxZ~`S=z6J?O^AfU>7qOX`JNBbV&8+bO0%@fhQitKIJ^O^ zpgIa__qD_y07t@DFlBJ)8SP_#^j{6jpaXt{U%=dx!qu=4u7^21lWEYHPPY5U3TcoQ zX_7W+lvZi>TapNk_X>k-KO%MC9iZp>1E`N34gHKd9tK&){jq2~7OsJ>!G0FzxQFw6G zm&Vb(2#-T|rM|n3>uAsG_hnbvUKFf3#ay@u4uTzia~NY%XgCHfx4^To4BDU@)HlV? z@EN=g^ymETa1sQK{kRwyE4Ax8?wT&GvaG@ASO}{&a17&^v`y z!oPdiSiia^oov(Z)QhG2&|FgE{M9_4hJROGbnj>#$~ZF$-G^|zPj*QApltKe?;u;uKHJ~-V!=VLkg7Kgct)l7u39f@%VG8e3f$N-B zAu3a4%ZGf)r+jPAYCSLt73m_J3}p>}6Tx0j(wg4vvKhP!DzgiWANiE;Ppvp}P2W@m z-VbYn+NXFF?6ngef5CfY6ZwKnWvNV4z6s^~yMXw2i5mv}jC$6$46g?G|CPAu{W5qF zDobS=zb2ILX9D827g*NtGe5w;>frjanY{f)hrBP_2ehBt1?`~ypvg_Ot4x1V+43P@Ve8>qd)9NX_jWdLo`Zfy zoeam9)@Dpym{4m@+LNxXBPjPKA7{3a&H+~xQvr>C_A;7=JrfK~$M2pCh>|xLz>W6SCs4qC|#V`)# z)0C|?$o>jzh<|-cpf

K7osU{Xp5PG4-K+L2G=)c3f&}H&M3wo7TlO_UJjQ-Oq&_ zjAc9=nNIYz{c3zxOiS5UfcE1}8#iI4@uy;$Q7>}u`j+OU0N<*Ezx$k{x_27+{s2Eg z`^=rhtIzCm!_UcJ?Db~Lh-=_))PT3{Q0{Mwdq;0>ZL%l3+;B&4!&xm#%HYAK|;b456Iv&&f$VQHf` z>$*K9w8T+paVwc7fLfMlhQ4)*zL_SG{~v4QR;IuX-(oRtYAhWOlh`NLoX0k$RUYMi z2Y!bqpdN}wz8q`-%>&Le@q|jFw92ErW-hma-le?S z-@OZt2EEUm4wLsuEMkt4zlyy29_3S50JAcQHTtgTC{P~%-mvCTzrjXOc|{}N`Cz`W zSj7CrXfa7lcsU0J(0uSX6G`54t^7}+OLM0n(|g4waOQ}bd3%!XLh?NX9|8G_|06Ie zD5F1)w5I~!et7lA{G^;uf7aqT`KE&2qx9|~O;s6t!gb`+zVLJyT2T)l*8l(j literal 0 HcmV?d00001 diff --git a/apps/website/public/logo.png b/apps/website/public/logo.png deleted file mode 100644 index 18a23b9946f526b19a51197dd5fb2a27e81f14ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5509 zcmeHL=UY=*x8Dg(L5(ONMS78e07_SgiP8j>Vncdp0Rbr@AT7zjD2j#N!GM6EU@Va) zA}E9Ojv&o|AP7Wi2qh%B$C>v}c<=pm&zHTQy`I(fYQKH%SzDUzUA)jjzcsK8fUu^y@u^FScJx*Nmnc>l;7Igy;1ZW}Sx8R%hLB&APlJ8#o|sy$Vax z)@mon+~5H{XMKvi@aP>m@_0nc_1w>VlO>x+cP_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lmZx(7t>QQof8o@YxEEA>fT>&q%NCl(a(NrxQA>r4?yEeb*mby79#<5@z_0> znmZ;FC6oS~2en@d|L(+V>OE^UR6Zk;4?UT_CM3LGMw8r&5 zLr!lVfAdJ-=?zT~qHj6UkD?^lT-_*G&hx392=r#8RFtqo_Q~&WABehE>8|?JT?C`J z-D$u7l?!RgXr({bYkSmUV2z-E@;I`tpXy|y_Bl?WDRTy{eHvINLGV+!_Td9zs-mbk zeMho(W|AZu9hr`jlswh2{3qLu9*8HoyBd$Fr=g$KbXus<}mh@dr`MonYu{0*1#>V^) DKcgrv diff --git a/apps/website/react-router.config.ts b/apps/website/react-router.config.ts new file mode 100644 index 0000000..5c68094 --- /dev/null +++ b/apps/website/react-router.config.ts @@ -0,0 +1,30 @@ +import type { Config } from '@react-router/dev/config'; +import { glob } from 'node:fs/promises'; +import { createGetUrl, getSlugs } from 'fumadocs-core/source'; +import { getPageImagePath } from './app/lib/og'; + +const getUrl = createGetUrl('/docs'); + +export default { + ssr: true, + future: { + v8_middleware: true, + }, + async prerender({ getStaticPaths }) { + const paths: string[] = []; + const excluded: string[] = ['/api/search']; + + for (const path of getStaticPaths()) { + if (!excluded.includes(path)) paths.push(path); + } + + for await (const entry of glob('**/*.mdx', { cwd: 'content/docs' })) { + const slugs = getSlugs(entry); + + paths.push(getUrl(slugs)); + paths.push(getPageImagePath(slugs)); + } + + return paths; + }, +} satisfies Config; diff --git a/apps/website/source.config.ts b/apps/website/source.config.ts index 36593eb..03cc679 100644 --- a/apps/website/source.config.ts +++ b/apps/website/source.config.ts @@ -1,36 +1,12 @@ -import { remarkMermaid } from '@theguild/remark-mermaid'; -import { remarkAdmonition } from 'fumadocs-core/mdx-plugins'; -import { defineConfig, defineDocs, frontmatterSchema, metaSchema } from 'fumadocs-mdx/config'; -import { z } from 'zod'; +import { defineConfig, defineDocs } from 'fumadocs-mdx/config'; export const docs = defineDocs({ dir: 'content/docs', docs: { - schema: frontmatterSchema.extend({ - preview: z.string().optional(), - index: z.boolean().default(false), - method: z.string().optional(), - }), - }, - meta: { - schema: metaSchema.extend({ - description: z.string().optional(), - }), - }, -}); - -export default defineConfig({ - mdxOptions: { - rehypeCodeOptions: { - lazy: true, - engine: 'oniguruma', - langs: ['ts', 'js', 'html', 'tsx', 'mdx'], - inline: 'tailing-curly-colon', - themes: { - light: 'catppuccin-latte', - dark: 'catppuccin-mocha', - }, + postprocess: { + includeProcessedMarkdown: true, }, - remarkPlugins: [remarkMermaid, remarkAdmonition], }, }); + +export default defineConfig(); diff --git a/apps/website/src/app/(home)/layout.tsx b/apps/website/src/app/(home)/layout.tsx deleted file mode 100644 index 47a990c..0000000 --- a/apps/website/src/app/(home)/layout.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { HomeLayout } from 'fumadocs-ui/layouts/home'; -import type { ReactNode } from 'react'; -import { baseOptions } from '@/app/layout.config'; - -export default function Layout({ children }: { children: ReactNode }) { - return {children}; -} diff --git a/apps/website/src/app/(home)/page.tsx b/apps/website/src/app/(home)/page.tsx deleted file mode 100644 index 3891551..0000000 --- a/apps/website/src/app/(home)/page.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { Community } from '@/components/sections/community'; -import { Footer } from '@/components/sections/footer'; -import { Hero } from '@/components/sections/hero'; -import { Projects } from '@/components/sections/projects'; - -export default function HomePage() { - return ( - <> - - - -