Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
feat(web): add use-cases content pipeline with welcome page (MUL-2349) (#2795)
Naiyuan Qing5f1f08e4669a
diff --git a/apps/web/.gitignore b/apps/web/.gitignoreindex e985853ed8..6f91e0c835 100644--- a/apps/web/.gitignore+++ b/apps/web/.gitignore@@ -1 +1,2 @@.vercel+.source/diff --git a/apps/web/app/(landing)/layout.tsx b/apps/web/app/(landing)/layout.tsxindex 97a6b0608b..7132026c53 100644--- a/apps/web/app/(landing)/layout.tsx+++ b/apps/web/app/(landing)/layout.tsx@@ -1,8 +1,6 @@-import { cookies, headers } from "next/headers";import { Instrument_Serif, Noto_Serif_SC } from "next/font/google";-import { LOCALE_COOKIE } from "@multica/core/i18n";import { LocaleProvider } from "@/features/landing/i18n";-import type { Locale } from "@/features/landing/i18n";+import { getRequestLocale } from "@/lib/request-locale";const instrumentSerif = Instrument_Serif({subsets: ["latin"],@@ -41,26 +39,12 @@ const jsonLd = {],};-async function getInitialLocale(): Promise<Locale> {- // 1. User's explicit preference (cookie set when they switch language)- const cookieStore = await cookies();- const stored = cookieStore.get(LOCALE_COOKIE)?.value;- if (stored === "en" || stored === "zh") return stored;-- // 2. Detect from Accept-Language header- const headersList = await headers();- const acceptLang = headersList.get("accept-language") ?? "";- if (acceptLang.includes("zh")) return "zh";-- return "en";-}-export default async function LandingLayout({children,}: {children: React.ReactNode;}) {- const initialLocale = await getInitialLocale();+ const initialLocale = await getRequestLocale();return (<>diff --git a/apps/web/app/(landing)/usecases/[slug]/page.tsx b/apps/web/app/(landing)/usecases/[slug]/page.tsxnew file mode 100644index 0000000000..3345dd0099--- /dev/null+++ b/apps/web/app/(landing)/usecases/[slug]/page.tsx@@ -0,0 +1,277 @@+import type { Metadata } from "next";+import type { ComponentPropsWithoutRef, ReactNode } from "react";+import Link from "next/link";+import { notFound } from "next/navigation";+import { cn } from "@multica/ui/lib/utils";+import { LandingHeader } from "@/features/landing/components/landing-header";+import { LandingFooter } from "@/features/landing/components/landing-footer";+import { Screenshot } from "@/features/landing/components/mdx/screenshot";+import {+ getUseCaseLangForLocale,+ useCasesSource,+} from "@/lib/use-cases-source";+import {+ docsHrefForLocale,+ getUseCaseLocale,+ useCaseText,+} from "@/lib/use-cases-i18n";+import type { SupportedLocale } from "@multica/core/i18n";++type Params = { slug: string };++type TocItem = { title: ReactNode; url: string; depth: number };++export async function generateMetadata(props: {+ params: Promise<Params>;+}): Promise<Metadata> {+ const { slug } = await props.params;+ const locale = await getUseCaseLocale();+ const page = useCasesSource.getPage([slug], getUseCaseLangForLocale(locale));+ if (!page) return {};++ return {+ title: page.data.title,+ description: page.data.description,+ openGraph: {+ title: page.data.title,+ description: page.data.description,+ url: `/usecases/${slug}`,+ },+ alternates: {+ canonical: `/usecases/${slug}`,+ },+ };+}++function nodeToString(node: ReactNode): string {+ if (typeof node === "string") return node;+ if (typeof node === "number") return String(node);+ if (Array.isArray(node)) return node.map(nodeToString).join("");+ return "";+}++function PlaceholderImage({ label }: { label: string }) {+ return (+ <figure className="my-10 -mx-4 sm:mx-0">+ <div+ className={cn(+ "flex aspect-[16/9] items-center justify-center rounded-lg",+ "border-2 border-dashed border-[#0a0d12]/15 bg-[#fafafa]",+ "px-6 text-center text-[13px] italic leading-relaxed text-[#0a0d12]/55",+ )}+ >+ {label}+ </div>+ </figure>+ );+}++function MDXCTA({+ label,+ variant,+ href,+}: {+ label: string;+ variant: "primary" | "secondary";+ href: string;+}) {+ return (+ <Link+ href={href}+ className={cn(+ "inline-flex items-center gap-2 rounded-[12px] px-5 py-3 text-[14px] font-semibold not-italic transition-colors",+ variant === "primary"+ ? "bg-[#0a0d12] text-white hover:bg-[#0a0d12]/88"+ : "border border-[#0a0d12]/15 text-[#0a0d12] hover:bg-[#0a0d12]/[0.04]",+ )}+ >+ {label}+ </Link>+ );+}++// Marker patterns accept both half-width (`:`) and full-width (`:`) colons so+// content authors can type either without breaking the placeholder rendering.+// `副 ` is the Chinese marker for the secondary CTA and `Secondary ` is the+// English equivalent — either works in either language's mdx file.+const PLACEHOLDER_IMAGE_PREFIX = /^\[占位图[::]\s*/;+const CTA_SECONDARY_PREFIX = "(?:副 |Secondary )";+const CTA_BLOCK_TRIGGER = new RegExp(`^\\[${CTA_SECONDARY_PREFIX}?CTA[::]`);+const CTA_LABEL_STRIP = new RegExp(`^${CTA_SECONDARY_PREFIX}?CTA[::]\\s*`);+const CTA_PRIMARY = /^CTA[::]/;++function createSmartParagraph(locale: SupportedLocale) {+ const secondaryHref = docsHrefForLocale(locale);+ return function SmartParagraph(props: ComponentPropsWithoutRef<"p">) {+ const text = nodeToString(props.children).trim();++ if (text.startsWith("[占位图")) {+ const label = text+ .replace(PLACEHOLDER_IMAGE_PREFIX, "")+ .replace(/\]$/, "");+ return <PlaceholderImage label={label} />;+ }++ if (CTA_BLOCK_TRIGGER.test(text)) {+ const items = Array.from(text.matchAll(/\[([^\]]+)\]/g)).map(+ (m) => m[1]!,+ );+ return (+ <div className="my-8 flex flex-wrap items-center gap-3">+ {items.map((item, i) => {+ const isPrimary = CTA_PRIMARY.test(item);+ const label = item.replace(CTA_LABEL_STRIP, "");+ return (+ <MDXCTA+ key={i}+ label={label}+ variant={isPrimary ? "primary" : "secondary"}+ href={isPrimary ? "/" : secondaryHref}+ />+ );+ })}+ </div>+ );+ }++ return <p {...props} />;+ };+}++function createMdxComponents(locale: SupportedLocale) {+ const SmartParagraph = createSmartParagraph(locale);+ return {+ Screenshot,+ h2: (props: ComponentPropsWithoutRef<"h2">) => (+ <h2+ className="mt-16 mb-4 scroll-mt-[100px] text-[1.5rem] font-semibold tracking-tight text-[#0a0d12] sm:text-[1.75rem]"+ {...props}+ />+ ),+ h3: (props: ComponentPropsWithoutRef<"h3">) => (+ <h3+ className="mt-10 mb-3 scroll-mt-[100px] text-[1.1rem] font-semibold tracking-tight text-[#0a0d12] sm:text-[1.2rem]"+ {...props}+ />+ ),+ p: SmartParagraph,+ strong: (props: ComponentPropsWithoutRef<"strong">) => (+ <strong className="font-semibold text-[#0a0d12]" {...props} />+ ),+ hr: (props: ComponentPropsWithoutRef<"hr">) => (+ <hr className="my-12 border-[#0a0d12]/8" {...props} />+ ),+ blockquote: (props: ComponentPropsWithoutRef<"blockquote">) => (+ <blockquote+ className="my-6 border-l-2 border-[#0a0d12]/15 pl-5 text-[#0a0d12]/65 italic"+ {...props}+ />+ ),+ ul: (props: ComponentPropsWithoutRef<"ul">) => (+ <ul+ className="my-4 list-disc space-y-2 pl-6 marker:text-[#0a0d12]/30"+ {...props}+ />+ ),+ ol: (props: ComponentPropsWithoutRef<"ol">) => (+ <ol+ className="my-4 list-decimal space-y-2 pl-6 marker:text-[#0a0d12]/40"+ {...props}+ />+ ),+ li: (props: ComponentPropsWithoutRef<"li">) => (+ <li className="pl-1" {...props} />+ ),+ a: ({ href, ...props }: ComponentPropsWithoutRef<"a">) => {+ const className =+ "underline decoration-[#0a0d12]/25 underline-offset-4 transition-colors hover:text-[#0a0d12] hover:decoration-[#0a0d12]/70";+ // Internal links should keep SPA navigation (next/link); external links+ // (mailto:, https://, etc.) stay as native anchors.+ if (href && href.startsWith("/")) {+ return <Link href={href} className={className} {...props} />;+ }+ return <a href={href} className={className} {...props} />;+ },+ code: (props: ComponentPropsWithoutRef<"code">) => (+ <code+ className="rounded bg-[#0a0d12]/[0.06] px-1.5 py-0.5 font-mono text-[0.88em] text-[#0a0d12]"+ {...props}+ />+ ),+ pre: (props: ComponentPropsWithoutRef<"pre">) => (+ <pre+ className="my-6 overflow-x-auto rounded-lg bg-[#0a0d12]/[0.04] p-4 text-[13px] leading-[1.65]"+ {...props}+ />+ ),+ };+}++export default async function UseCasePage(props: { params: Promise<Params> }) {+ const { slug } = await props.params;+ const locale = await getUseCaseLocale();+ const text = useCaseText[locale];+ const page = useCasesSource.getPage([slug], getUseCaseLangForLocale(locale));+ if (!page) notFound();++ const MDX = page.data.body;+ const toc = ((page.data as { toc?: TocItem[] }).toc ?? []).filter(+ (item) => item.depth === 2 || item.depth === 3,+ );+ const mdxComponents = createMdxComponents(locale);++ return (+ <>+ <div className="sticky top-0 z-40 bg-white">+ <LandingHeader variant="light" />+ </div>+ <main className="bg-white text-[#0a0d12]">+ <div+ className={cn(+ "mx-auto max-w-[720px] px-4 py-16 sm:px-6 sm:py-20",+ "lg:max-w-[1100px] lg:py-24",+ "lg:grid lg:grid-cols-[minmax(0,720px)_220px] lg:gap-x-20",+ )}+ >+ <article>+ <h1 className="font-[family-name:var(--font-serif)] text-[2.6rem] leading-[1.05] tracking-[-0.03em] sm:text-[3.4rem]">+ {page.data.title}+ </h1>+ <div className="mt-10 text-[16px] leading-[1.85] text-[#0a0d12]/72 [&>:first-child]:mt-0 [&>p]:my-5 sm:text-[17px]">+ <MDX components={mdxComponents} />+ </div>+ </article>++ {toc.length > 0 ? (+ <aside className="hidden lg:block">+ <nav className="sticky top-[100px] max-h-[calc(100vh-120px)] overflow-y-auto">+ <div className="mb-3 text-[11px] font-medium uppercase tracking-[0.14em] text-[#0a0d12]/40">+ {text.tableOfContents}+ </div>+ <ul className="border-l border-[#0a0d12]/8">+ {toc.map((item, i) => (+ <li key={i}>+ <a+ href={item.url}+ className={cn(+ "-ml-px block border-l border-transparent py-1.5 pl-4 text-[13px] leading-snug transition-colors",+ "hover:border-[#0a0d12]/40 hover:text-[#0a0d12]",+ item.depth === 2+ ? "font-medium text-[#0a0d12]/70"+ : "pl-7 text-[12px] text-[#0a0d12]/50",+ )}+ >+ {item.title}+ </a>+ </li>+ ))}+ </ul>+ </nav>+ </aside>+ ) : null}+ </div>+ </main>+ <LandingFooter />+ </>+ );+}diff --git a/apps/web/app/(landing)/usecases/page.tsx b/apps/web/app/(landing)/usecases/page.tsxnew file mode 100644index 0000000000..6bedae1948--- /dev/null+++ b/apps/web/app/(landing)/usecases/page.tsx@@ -0,0 +1,117 @@+import type { Metadata } from "next";+import Link from "next/link";+import Image from "next/image";+import { LandingHeader } from "@/features/landing/components/landing-header";+import { LandingFooter } from "@/features/landing/components/landing-footer";+import {+ getUseCaseLangForLocale,+ useCasesSource,+} from "@/lib/use-cases-source";+import { getUseCaseLocale, useCaseText } from "@/lib/use-cases-i18n";++type ExtraFrontmatter = {+ category?: string;+ updated_at?: string;+ hero_image?: string;+};++export async function generateMetadata(): Promise<Metadata> {+ const locale = await getUseCaseLocale();+ const text = useCaseText[locale];+ return {+ title: text.indexMetadataTitle,+ description: text.indexMetadataDescription,+ openGraph: {+ title: text.indexMetadataTitle,+ description: text.indexMetadataDescription,+ url: "/usecases",+ },+ alternates: {+ canonical: "/usecases",+ },+ };+}++export default async function UseCasesIndexPage() {+ const locale = await getUseCaseLocale();+ const text = useCaseText[locale];+ const pages = useCasesSource+ .getPages(getUseCaseLangForLocale(locale))+ .slice()+ .sort((a, b) => {+ // Sort descending by updated_at. Missing dates fall to the bottom by+ // comparing against the epoch placeholder rather than the empty string+ // (which would make ordering undefined when multiple entries omit it).+ const da = (a.data as ExtraFrontmatter).updated_at ?? "1900-01-01";+ const db = (b.data as ExtraFrontmatter).updated_at ?? "1900-01-01";+ return db.localeCompare(da);+ });++ return (+ <>+ <div className="relative">+ <LandingHeader variant="dark" />+ <section className="relative overflow-hidden bg-[#05070b] text-white">+ <div className="relative z-10 mx-auto max-w-[1120px] px-4 pb-20 pt-32 text-center sm:px-6 sm:pt-40 lg:px-8 lg:pb-24">+ <h1 className="mx-auto max-w-[880px] font-[family-name:var(--font-serif)] text-[3rem] leading-[1.02] tracking-[-0.035em] drop-shadow-[0_10px_34px_rgba(0,0,0,0.32)] sm:text-[4rem] lg:text-[5rem]">+ {text.indexTitle}+ </h1>+ <p className="mx-auto mt-6 max-w-[620px] text-[15px] leading-7 text-white/84 sm:text-[17px]">+ {text.indexSubtitle}+ </p>+ </div>+ </section>+ </div>++ <section className="bg-white py-20 text-[#0a0d12] sm:py-24">+ <div className="mx-auto max-w-[1120px] px-4 sm:px-6 lg:px-8">+ <div className="grid grid-cols-1 gap-x-6 gap-y-14 sm:grid-cols-2 lg:grid-cols-3">+ {pages.map((page) => {+ const extra = page.data as ExtraFrontmatter;+ const heroImage = extra.hero_image;+ const category = extra.category;+ // Construct the URL from the page slug rather than `page.url`.+ // Fumadocs may prefix locale-specific URLs, but our public+ // route stays prefix-free and resolves locale from the request.+ const href = `/usecases/${page.slugs.join("/")}`;++ return (+ <Link key={href} href={href} className="group flex flex-col">+ <div className="relative aspect-[4/3] overflow-hidden rounded-lg bg-[#f5f5f5]">+ {heroImage ? (+ <Image+ src={heroImage}+ alt=""+ fill+ sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 360px"+ className="object-cover transition-transform duration-300 group-hover:scale-[1.02]"+ />+ ) : null}+ </div>+ {category ? (+ <div className="mt-5 text-[12px] uppercase tracking-[0.14em] text-[#0a0d12]/50">+ {category}+ </div>+ ) : null}+ <h3 className="mt-2 text-[18px] font-semibold leading-[1.35] text-[#0a0d12] sm:text-[20px]">+ {page.data.title}+ </h3>+ {page.data.description ? (+ <p className="mt-2 text-[14px] leading-[1.6] text-[#0a0d12]/60">+ {page.data.description}+ </p>+ ) : null}+ <span className="mt-3 text-[13px] text-[#0a0d12]/70 transition-colors group-hover:text-[#0a0d12]">+ {text.cardReadMore}+ </span>+ </Link>+ );+ })}+ </div>+ </div>+ </section>++ <LandingFooter />+ </>+ );+}diff --git a/apps/web/app/[workspaceSlug]/(dashboard)/settings/page.tsx b/apps/web/app/[workspaceSlug]/(dashboard)/settings/page.tsxindex e8e62d0f0d..039c485d36 100644--- a/apps/web/app/[workspaceSlug]/(dashboard)/settings/page.tsx+++ b/apps/web/app/[workspaceSlug]/(dashboard)/settings/page.tsx@@ -1 +1,5 @@-export { SettingsPage as default } from "@multica/views/settings";+import { SettingsPage } from "@multica/views/settings";++export default function Page() {+ return <SettingsPage />;+}diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsxindex d7cb63e7a0..ff09ae783a 100644--- a/apps/web/app/layout.tsx+++ b/apps/web/app/layout.tsx@@ -1,16 +1,12 @@import type { Metadata, Viewport } from "next";-import { headers } from "next/headers";import { Inter, Geist_Mono, Source_Serif_4 } from "next/font/google";import { ThemeProvider } from "@/components/theme-provider";import { Toaster } from "@multica/ui/components/ui/sonner";import { cn } from "@multica/ui/lib/utils";import { WebProviders } from "@/components/web-providers";-import {- DEFAULT_LOCALE,- SUPPORTED_LOCALES,- type SupportedLocale,-} from "@multica/core/i18n";+import type { SupportedLocale } from "@multica/core/i18n";import { RESOURCES } from "@multica/views/locales";+import { getRequestLocale } from "@/lib/request-locale";import "./globals.css";// Font stack: Inter for Latin UI text + system Chinese fonts for zh content.@@ -103,10 +99,6 @@ export const metadata: Metadata = {},};-function isSupportedLocale(value: string | null): value is SupportedLocale {- return value !== null && (SUPPORTED_LOCALES as readonly string[]).includes(value);-}-// HTML lang attribute uses BCP-47 region tags that screen readers and font// stacks recognize widely. i18next keeps `zh-Hans` as its internal locale// (script subtag is what we actually translate against), but the html element@@ -121,11 +113,7 @@ export default async function RootLayout({}: {children: React.ReactNode;}) {- const h = await headers();- const headerLocale = h.get("x-multica-locale");- const locale: SupportedLocale = isSupportedLocale(headerLocale)- ? headerLocale- : DEFAULT_LOCALE;+ const locale = await getRequestLocale();const resources = { [locale]: RESOURCES[locale] };return (diff --git a/apps/web/content/use-cases/auto-data-analysis.en.mdx b/apps/web/content/use-cases/auto-data-analysis.en.mdxnew file mode 100644index 0000000000..1326dedf94--- /dev/null+++ b/apps/web/content/use-cases/auto-data-analysis.en.mdx@@ -0,0 +1,102 @@+---+title: How we put a 24/7 senior data analyst into Multica+description: db-boy is our workspace's 24/7 senior data analyst — auto-posts the weekly metrics every Monday, answers ad-hoc questions in minutes, and assigns its own tracking PRs to the frontend agent when data is missing.+category: Automated analytics+updated_at: 2026-05-22+hero_image: /usecases/auto-data-analysis/hero.png+---++db-boy is a 24/7 senior data analyst inside our workspace.++Every Monday at 9 AM he turns last week's numbers into a table, pastes them into the `#weekly-metrics` issue, and @-mentions the people who own each line.++<Screenshot+ src="/usecases/auto-data-analysis/hero.png"+ alt="A Multica issue comment where db-boy has posted Monday's weekly metrics with @ mentions"+ width={2098}+ height={1548}+ caption="Monday 9:00 — db-boy drops last week's headline numbers into the issue (demo data)."+ priority+/>++He's on call during working hours. Any data question gets @-ed and answered in a few minutes with a markdown table or an HTML chart attached. When he hits an untracked event or a fuzzy definition halfway through, he opens an issue to pull in the right person instead of waiting.++[CTA: Start free →]++---++## What Multica is++Multica is a workspace platform that treats AI agents as employees. Two things set it apart from typical collaboration tools.++**Agents are workspace members, not tools.** db-boy has an avatar, a profile page, and an open-issues queue in the member list. He can be assigned, @-mentioned, named project owner — and he can open issues and hand them to someone else.++**Context is shared across the workspace.** Issue comments, attachments, HTML reports — humans and agents can both search and link to them. A skill is a workspace-wide playbook: write it once and every agent that wears it shares the same definitions, so db-boy never has to re-learn how we calculate DAU or which table holds payment data.++---++## How we wired it up++A Mac mini lives in the office with the Multica daemon installed. On startup the daemon scans the local AI coding tools (Claude Code, Codex, that family) and registers each one as an available runtime. Then we created a new agent in the workspace and named him @db-boy.++The Mac mini comes pre-loaded with what db-boy needs to do his job: `kubectl` with EKS credentials, `posthog-cli`, and `psql` against a read-only database account. Anything that runs on the host machine, db-boy can call. The database connection points at a read replica (a read-only copy of production set aside for analytics), and the account, `reader`, only has SELECT. Replica isolation means his queries never touch production traffic; read-only means a prompt injection can't write anything either.++Finally, we attached a "data analytics" skill to him. The skill spells out how DAU is defined, how each funnel step is counted, that application state lives in PG while user behavior lives in PostHog, which table holds payment data, which issue gets the HTML report, who to @ when instrumentation is missing. It's written once and shared across the workspace. Change a definition by editing one line in the skill — the next run picks it up. No deploy, no code change.++<Screenshot+ src="/usecases/auto-data-analysis/db-boy-profile.png"+ alt="db-boy's agent profile page in Multica: runtime and skill on the left, instructions with system prompt and read-only warning on the right"+ width={2596}+ height={1712}+ caption="db-boy's profile — identity, data definitions, and safety guards all live in his instructions."+/>++---++## Putting work in front of him, and the work he picks up himself++The most common way is to assign him an issue: write the question, hit Assign, pick @db-boy. Within seconds he starts Claude Code, follows the routes in the skill (posthog-cli with HogQL, or psql), and a few minutes later the issue gets a markdown table and an HTML report attached.++You don't have to open an issue every time. @ him in any existing thread for a follow-up — he replies in the same thread, context intact. Chat him directly like you would a teammate when you just need a quick number. Recurring reports (the weekly metrics, the monthly investor pack, the daily token-usage top 10) are set up on Autopilot once, run on schedule, post into the relevant issue, and notify subscribers.++He doesn't stop at the first blocker either. When he finds an event that isn't being tracked, he opens a new issue himself: title like `Add tracking for the X-button click on page Y`, with the fields, event name, and rationale filled in, then assigns it to @frontend-agent. The frontend agent ships the PR, an engineer reviews and merges, and the next time the same question comes up, the data is already there.++<Screenshot+ src="/usecases/auto-data-analysis/ad-hoc-question.png"+ alt="@naiyuan asks db-boy a North Star question in a comment; db-boy replies with the analysis and links to a tracking PR he opened for frontend-agent"+ width={1726}+ height={840}+ caption="naiyuan @ db-boy in a thread; db-boy answers and quietly opens a tracking follow-up assigned to the frontend agent (demo data)."+/>++Nobody files a ticket. Nobody chases anyone. Agents hand work off to each other, humans and agents discuss it in the same issue, and the issue itself is the shared unit of work.++---++## What changed for the team++Once db-boy was on, the rhythm of looking at data shifted.++**Immediacy.** Any question gets @-ed and answered within minutes. Retention curve at 2 AM? Fine, he's there. The "let me note that and ask the analyst next week" delay is gone.++**Automation.** The Monday weekly, the monthly investor pack, the daily token-usage top 10 — all on Autopilot. Results land in the relevant issue comments and notify subscribers. No human time goes into the recurring reports anymore.++**Visualization.** The default deliverable is an HTML dashboard with charts, not a paragraph of text. Charts come back in minutes; nobody waits a sprint for a trend graph, and discussions stop revolving around "I feel like it's X."++**Initiative.** He picks up the blockers along an analysis path himself: missing instrumentation becomes an issue assigned to the frontend agent, a fuzzy definition becomes a thread with the right person, a query that won't compile becomes a retry with a different approach. Nothing sits in the "waiting for someone" column.++---++## Hire one in your own workspace++Download Multica, register an agent, give it a data analytics skill, and assign it the first issue.++[CTA: Start free →] [Secondary CTA: Read the setup guide →]++---++## Further reading++- [Agents](/docs/agents)+- [Autopilots](/docs/autopilots)+- [Skills](/docs/skills)diff --git a/apps/web/content/use-cases/auto-data-analysis.zh.mdx b/apps/web/content/use-cases/auto-data-analysis.zh.mdxnew file mode 100644index 0000000000..0181c9086d--- /dev/null+++ b/apps/web/content/use-cases/auto-data-analysis.zh.mdx@@ -0,0 +1,102 @@+---+title: 如何在 Multica 拥有一位 24/7 的高级数据分析师+description: db-boy 是我们工作区里的 24/7 高级数据分析师:周一自动出周报 @ 大家、随时待命随问随答、缺埋点自己派活给前端 agent。+category: 自动化分析+updated_at: 2026-05-22+hero_image: /usecases/auto-data-analysis/hero.png+---++db-boy 是我们工作区里的一位 24/7 高级数据分析师。++每周一早上 9 点,他把上周的数据整理成表格贴在 #weekly-metrics 这条 issue 里,@ 相关同事一起看。++<Screenshot+ src="/usecases/auto-data-analysis/hero.png"+ alt="Multica issue 评论界面,db-boy 周一早上九点贴的 weekly metrics 表格 + @ 提醒"+ width={2098}+ height={1548}+ caption="周一 9:00,db-boy 自动贴出上周的核心指标(演示数据)"+ priority+/>++工作时间他随时待命,任何数据分析问题直接 @ 他,几分钟内回一份带表格或 HTML 图表的分析。分析跑到一半遇到没埋点的事件或者模糊的口径,他自己开 issue 拉相关人讨论,不会停在那里等人处理。++[CTA: 免费开始 →]++---++## Multica 是什么++Multica 是一个把 AI agent 当员工来用的工作区平台。它跟其他协作工具有两点不一样。++**Agent 是工作区成员,不是工具。** db-boy 在成员列表里有头像、有个人页、有待解决的 Issues,能被分配任务、被 @、被设为 project owner,也能自己开 issue 派给别人。++**Context 在工作区里共享。** issue 评论、附件、HTML 报告,人和 agent 都能搜、能引用。skill 是工作区一份的操作手册,写一次所有 agent 共用一套口径,db-boy 不用每次重新理解 DAU 怎么算、付费数据查哪张表。++---++## 我们是怎么做到的++我们在平台上常驻一台 Mac mini,装上 Multica daemon。daemon 启动时会扫一遍本机的 AI 编程工具(Claude Code、Codex 这一类),自动登记成可用的 agent 运行时。然后在工作区里新建一个 agent,起名 @db-boy。++那台 Mac mini 上提前装好 db-boy 要用的工具:kubectl + EKS 凭据、posthog-cli、psql + 只读数据库账号。本机能跑的,db-boy 都能调。数据库连的是只读从库(read replica,专门给分析用的副本数据库),账号用 reader 只能 SELECT。从库隔离意味着他怎么查都不影响生产,只读权限意味着哪怕 prompt injection 也写不进任何数据。++最后给他挂一份"数据分析"skill。Skill 写明:DAU 怎么定义、漏斗按什么口径、应用状态走 PG、用户行为走 PostHog、付费数据查哪张表、HTML 报告交付到哪条 issue、缺埋点要派给谁。写一次全 workspace 共享;口径要改回去改 skill 那一行,下次自动用新口径,不用部署、不碰代码。++<Screenshot+ src="/usecases/auto-data-analysis/db-boy-profile.png"+ alt="db-boy 的 agent 个人页,左侧是运行时和 skill,右侧 instructions 里写着 system prompt 和只读警示"+ width={2596}+ height={1712}+ caption="db-boy 的个人页:身份、数据口径、安全约束都写在 instructions 里"+/>++---++## 找它干活,他还会自己派活++最常见的方式是分配 issue:写清问题、assign 给 @db-boy,几秒后他启动 Claude Code,按 skill 里的路由走 posthog-cli + HogQL 或者 psql,几分钟后 issue 评论里多一条 markdown 表格和一份 HTML 报告。++也不用每次都开 issue。在已有 issue 评论里 @ 他追问一句,他在同一条线程接着回。像 DM 同事一样直接 chat 也行,问完即走不留档案。例行报告(周报、月报、每天的 token 用量 top 10)配一次 Autopilot,到点自动跑,结果贴到对应 issue 里,订阅者收到通知。++他不会卡在堵点上。分析时发现某个页面没埋点,他自己建一条新 issue:标题写"补 X 页面 Y 按钮的点击埋点",字段、事件名、为什么需要都写清,assign 给 @frontend-agent。前端 agent 接到分配就提 PR,工程师 review 完合进去。下次再问同一个问题,数据就在那里。++<Screenshot+ src="/usecases/auto-data-analysis/ad-hoc-question.png"+ alt="@naiyuan 在评论里 @ db-boy 问一组数,db-boy 给出分析结论并顺手开了一条补埋点的 follow-up issue"+ width={1726}+ height={840}+ caption="naiyuan 在评论里 @ db-boy 问一组数,db-boy 给出分析并顺手开了一条补埋点的 follow-up issue(演示数据)"+/>++没人写工单、没人催进度。agent 之间互相派活,人和 agent 在同一条 issue 里讨论,issue 是大家共享的工作单元。++---++## 现在的数据节奏++db-boy 上线之后,团队看数据的节奏变了。++**即时性。** 想到问题就 @ 他,几分钟回。半夜两点要看一组留存曲线也行,他都在。"先记着、等分析师下周有空"这种等待消失了。++**自动化。** 周一 9 点周报、月初投资人月报、每天早 8 点 token 用量 top 10,全是 Autopilot 定时跑,跑完直接贴到对应 issue 评论里,订阅者自动收到通知。例行报告不再占任何人时间。++**可视化。** 交付物默认是带图表的 HTML dashboard,不是一段文字结论。几分钟出图,不为一张趋势图等下个 sprint,团队讨论也不再围着"我感觉是 X"打转。++**主动性。** 分析链路上的堵点他自己接:缺埋点就开 issue 派给前端 agent,口径模糊就把相关人拉进同一条线程,查询写不出来就自己换写法再来一次。没有一件事卡在"等谁去做"上。++---++## 在你的工作区也雇一位++下载 Multica,注册一个 agent,挂上一份数据分析的 skill,分一条 issue 给他。++[CTA: 免费开始 →] [副 CTA: 阅读上手指南 →]++---++## 相关阅读++- [Agents](/docs/zh/agents)+- [Autopilots](/docs/zh/autopilots)+- [Skills](/docs/zh/skills)diff --git a/apps/web/eslint.config.mjs b/apps/web/eslint.config.mjsindex 26d13d5ab0..2060fd92c5 100644--- a/apps/web/eslint.config.mjs+++ b/apps/web/eslint.config.mjs@@ -2,7 +2,7 @@ import nextConfig from "@multica/eslint-config/next";export default [...nextConfig,- { ignores: [".next/"] },+ { ignores: [".next/", ".source/"] },{files: ["**/*.test.{ts,tsx}", "**/test/**/*.{ts,tsx}"],rules: {diff --git a/apps/web/features/landing/components/changelog-page-client.tsx b/apps/web/features/landing/components/changelog-page-client.tsxindex 2d05e0550e..0b07b79ebc 100644--- a/apps/web/features/landing/components/changelog-page-client.tsx+++ b/apps/web/features/landing/components/changelog-page-client.tsx@@ -9,7 +9,7 @@ import {} from "react";import { LandingHeader } from "./landing-header";import { LandingFooter } from "./landing-footer";-import { useLocale } from "../i18n";+import { isZhLocale, useLocale } from "../i18n";import type { Locale } from "../i18n/types";const MONTHS_EN = [@@ -40,14 +40,14 @@ function parseDate(dateStr: string): ParsedDate {function monthYearLabel(year: number, month: number, locale: Locale) {if (!year || !month) return "";- if (locale === "zh") return `${year}\u5e74${month}\u6708`;+ if (isZhLocale(locale)) return `${year}\u5e74${month}\u6708`;return `${MONTHS_EN[month - 1]} ${year}`;}function fullDateLabel(dateStr: string, locale: Locale) {const { year, month, day } = parseDate(dateStr);if (!year || !month || !day) return dateStr;- if (locale === "zh") return `${year}\u5e74${month}\u6708${day}\u65e5`;+ if (isZhLocale(locale)) return `${year}\u5e74${month}\u6708${day}\u65e5`;return `${MONTHS_EN[month - 1]} ${day}, ${year}`;}diff --git a/apps/web/features/landing/components/how-it-works-section.tsx b/apps/web/features/landing/components/how-it-works-section.tsxindex 3e948e6686..71c58e1f69 100644--- a/apps/web/features/landing/components/how-it-works-section.tsx+++ b/apps/web/features/landing/components/how-it-works-section.tsx@@ -2,7 +2,7 @@import Link from "next/link";import { useAuthStore } from "@multica/core/auth";-import { useLocale } from "../i18n";+import { isZhLocale, useLocale } from "../i18n";import { GitHubMark, githubUrl, heroButtonClassName } from "./shared";export function HowItWorksSection() {@@ -45,7 +45,7 @@ export function HowItWorksSection() {{user ? t.header.dashboard : t.howItWorks.cta}</Link><Link- href={locale === "zh" ? "/docs/zh" : "/docs"}+ href={isZhLocale(locale) ? "/docs/zh" : "/docs"}className={heroButtonClassName("ghost")}>{t.howItWorks.ctaDocs}diff --git a/apps/web/features/landing/components/landing-header.tsx b/apps/web/features/landing/components/landing-header.tsxindex df1d233fcc..dbe0a520bd 100644--- a/apps/web/features/landing/components/landing-header.tsx+++ b/apps/web/features/landing/components/landing-header.tsx@@ -44,6 +44,15 @@ export function LandingHeader({</Link><div className="flex items-center gap-2.5 sm:gap-3">+ <Link+ href="/usecases"+ className={cn(+ headerButtonClassName("ghost", variant),+ "hidden sm:inline-flex",+ )}+ >+ {t.header.useCases}+ </Link><Linkhref="/changelog"className={cn(diff --git a/apps/web/features/landing/components/mdx/screenshot.tsx b/apps/web/features/landing/components/mdx/screenshot.tsxnew file mode 100644index 0000000000..00edc712b0--- /dev/null+++ b/apps/web/features/landing/components/mdx/screenshot.tsx@@ -0,0 +1,41 @@+import Image from "next/image";++type ScreenshotProps = {+ src: string;+ alt: string;+ width: number;+ height: number;+ caption?: string;+ priority?: boolean;+};++export function Screenshot({+ src,+ alt,+ width,+ height,+ caption,+ priority = false,+}: ScreenshotProps) {+ return (+ <figure className="my-10 -mx-4 sm:mx-0">+ <div className="overflow-hidden border border-[#0a0d12]/8 bg-[#f5f5f5]">+ <Image+ src={src}+ alt={alt}+ width={width}+ height={height}+ sizes="(max-width: 720px) 100vw, 720px"+ quality={85}+ priority={priority}+ className="block h-auto w-full"+ />+ </div>+ {caption ? (+ <figcaption className="mt-3 text-center text-[13px] text-[#0a0d12]/45">+ {caption}+ </figcaption>+ ) : null}+ </figure>+ );+}diff --git a/apps/web/features/landing/i18n/context.tsx b/apps/web/features/landing/i18n/context.tsxindex 4407067404..f30e46fe5d 100644--- a/apps/web/features/landing/i18n/context.tsx+++ b/apps/web/features/landing/i18n/context.tsx@@ -1,19 +1,33 @@"use client";-import { createContext, useContext, useState, useCallback, useMemo } from "react";+import {+ createContext,+ useCallback,+ useContext,+ useMemo,+ useState,+ useTransition,+} from "react";+import { useRouter } from "next/navigation";import { useConfigStore } from "@multica/core/config";-import { LOCALE_COOKIE } from "@multica/core/i18n";+import { createBrowserCookieLocaleAdapter } from "@multica/core/i18n/browser";import { createEnDict } from "./en";import { createZhDict } from "./zh";-import type { LandingDict, Locale } from "./types";+import {+ toLandingDictionaryLocale,+ type LandingDict,+ type LandingDictionaryLocale,+ type Locale,+} from "./types";-const dictionaryFactories: Record<Locale, (allowSignup: boolean) => LandingDict> = {+const dictionaryFactories: Record<+ LandingDictionaryLocale,+ (allowSignup: boolean) => LandingDict+> = {en: createEnDict,zh: createZhDict,};-const COOKIE_MAX_AGE = 60 * 60 * 24 * 365; // 1 year-type LocaleContextValue = {locale: Locale;t: LandingDict;@@ -30,25 +44,29 @@ export function LocaleProvider({initialLocale?: Locale;}) {const [locale, setLocaleState] = useState<Locale>(initialLocale);+ const [, startTransition] = useTransition();+ const router = useRouter();+ const localeAdapter = useMemo(() => createBrowserCookieLocaleAdapter(), []);const allowSignup = useConfigStore((state) => state.allowSignup);const t = useMemo(- () => dictionaryFactories[locale](allowSignup),+ () => dictionaryFactories[toLandingDictionaryLocale(locale)](allowSignup),[allowSignup, locale],);- const setLocale = useCallback((l: Locale) => {- setLocaleState(l);- const secure =- typeof location !== "undefined" && location.protocol === "https:"- ? "; Secure"- : "";- document.cookie = `${LOCALE_COOKIE}=${l}; path=/; max-age=${COOKIE_MAX_AGE}; SameSite=Lax${secure}`;- }, []);+ const setLocale = useCallback(+ (l: Locale) => {+ if (l === locale) return;+ setLocaleState(l);+ localeAdapter.persist(l);+ startTransition(() => {+ router.refresh();+ });+ },+ [locale, localeAdapter, router, startTransition],+ );return (- <LocaleContext.Provider- value={{ locale, t, setLocale }}- >+ <LocaleContext.Provider value={{ locale, t, setLocale }}>{children}</LocaleContext.Provider>);diff --git a/apps/web/features/landing/i18n/en.ts b/apps/web/features/landing/i18n/en.tsindex ecdc3b5236..83840a9ff0 100644--- a/apps/web/features/landing/i18n/en.ts+++ b/apps/web/features/landing/i18n/en.ts@@ -8,6 +8,7 @@ export function createEnDict(allowSignup: boolean): LandingDict {login: "Log in",dashboard: "Dashboard",changelog: "Changelog",+ useCases: "Use cases",},hero: {@@ -228,6 +229,7 @@ export function createEnDict(allowSignup: boolean): LandingDict {links: [{ label: "Features", href: "#features" },{ label: "How it Works", href: "#how-it-works" },+ { label: "Use cases", href: "/usecases" },{ label: "Changelog", href: "/changelog" },{ label: "Download", href: "/download" },],diff --git a/apps/web/features/landing/i18n/index.ts b/apps/web/features/landing/i18n/index.tsindex 33e9d563c9..96e4b840dd 100644--- a/apps/web/features/landing/i18n/index.ts+++ b/apps/web/features/landing/i18n/index.ts@@ -1,3 +1,8 @@export { LocaleProvider, useLocale } from "./context";-export { locales, localeLabels } from "./types";-export type { Locale, LandingDict } from "./types";+export {+ isZhLocale,+ locales,+ localeLabels,+ toLandingDictionaryLocale,+} from "./types";+export type { LandingDict, LandingDictionaryLocale, Locale } from "./types";diff --git a/apps/web/features/landing/i18n/types.ts b/apps/web/features/landing/i18n/types.tsindex e51681f459..e7edaf46aa 100644--- a/apps/web/features/landing/i18n/types.ts+++ b/apps/web/features/landing/i18n/types.ts@@ -1,12 +1,25 @@-export type Locale = "en" | "zh";+import type { SupportedLocale } from "@multica/core/i18n";-export const locales: Locale[] = ["en", "zh"];+export type Locale = SupportedLocale;+export type LandingDictionaryLocale = "en" | "zh";++export const locales: Locale[] = ["en", "zh-Hans"];export const localeLabels: Record<Locale, string> = {en: "EN",- zh: "\u4e2d\u6587",+ "zh-Hans": "\u4e2d\u6587",};+export function toLandingDictionaryLocale(+ locale: Locale,+): LandingDictionaryLocale {+ return locale === "zh-Hans" ? "zh" : "en";+}++export function isZhLocale(locale: Locale): boolean {+ return locale === "zh-Hans";+}+type FeatureSection = {label: string;title: string;@@ -27,6 +40,7 @@ export type LandingDict = {login: string;dashboard: string;changelog: string;+ useCases: string;};hero: {headlineLine1: string;diff --git a/apps/web/features/landing/i18n/zh.ts b/apps/web/features/landing/i18n/zh.tsindex 81a8c56838..dec627b87a 100644--- a/apps/web/features/landing/i18n/zh.ts+++ b/apps/web/features/landing/i18n/zh.ts@@ -8,6 +8,7 @@ export function createZhDict(allowSignup: boolean): LandingDict {login: "\u767b\u5f55",dashboard: "\u8fdb\u5165\u5de5\u4f5c\u53f0",changelog: "\u66f4\u65b0\u65e5\u5fd7",+ useCases: "\u6848\u4f8b",},hero: {@@ -228,6 +229,7 @@ export function createZhDict(allowSignup: boolean): LandingDict {links: [{ label: "\u529f\u80fd\u7279\u6027", href: "#features" },{ label: "\u5982\u4f55\u5de5\u4f5c", href: "#how-it-works" },+ { label: "\u6848\u4f8b", href: "/usecases" },{ label: "更新日志", href: "/changelog" },{ label: "下载", href: "/download" },],diff --git a/apps/web/lib/locale-routing.test.ts b/apps/web/lib/locale-routing.test.tsnew file mode 100644index 0000000000..4b4b87853d--- /dev/null+++ b/apps/web/lib/locale-routing.test.ts@@ -0,0 +1,40 @@+import { describe, expect, it } from "vitest";+import {+ isSupportedLocale,+ resolveLocaleFromSignals,+} from "./locale-routing";++describe("locale routing", () => {+ it("accepts only app-supported locale identifiers", () => {+ expect(isSupportedLocale("en")).toBe(true);+ expect(isSupportedLocale("zh-Hans")).toBe(true);+ expect(isSupportedLocale("zh")).toBe(false);+ expect(isSupportedLocale(null)).toBe(false);+ });++ it("normalizes legacy landing zh cookies to the app locale", () => {+ expect(+ resolveLocaleFromSignals({+ cookieLocale: "zh",+ acceptLanguage: "en-US,en;q=0.9",+ }),+ ).toBe("zh-Hans");+ });++ it("prefers cookie locale over Accept-Language", () => {+ expect(+ resolveLocaleFromSignals({+ cookieLocale: "en",+ acceptLanguage: "zh-CN,zh;q=0.9",+ }),+ ).toBe("en");+ });++ it("falls back to Accept-Language when no cookie is set", () => {+ expect(+ resolveLocaleFromSignals({+ acceptLanguage: "zh-CN,zh;q=0.9,en;q=0.8",+ }),+ ).toBe("zh-Hans");+ });+});diff --git a/apps/web/lib/locale-routing.ts b/apps/web/lib/locale-routing.tsnew file mode 100644index 0000000000..7e6d276b7b--- /dev/null+++ b/apps/web/lib/locale-routing.ts@@ -0,0 +1,34 @@+import {+ matchLocale,+ SUPPORTED_LOCALES,+ type SupportedLocale,+} from "@multica/core/i18n";++export const MULTICA_LOCALE_HEADER = "x-multica-locale";++export function isSupportedLocale(+ value: string | null,+): value is SupportedLocale {+ return (+ value !== null &&+ (SUPPORTED_LOCALES as readonly string[]).includes(value)+ );+}++export function resolveLocaleFromSignals({+ cookieLocale,+ acceptLanguage,+}: {+ cookieLocale?: string | null;+ acceptLanguage?: string | null;+}): SupportedLocale {+ const candidates: string[] = [];+ if (cookieLocale) candidates.push(cookieLocale);++ for (const part of (acceptLanguage ?? "").split(",")) {+ const tag = part.split(";")[0]?.trim();+ if (tag) candidates.push(tag);+ }++ return matchLocale(candidates);+}diff --git a/apps/web/lib/request-locale.ts b/apps/web/lib/request-locale.tsnew file mode 100644index 0000000000..dc7bab4506--- /dev/null+++ b/apps/web/lib/request-locale.ts@@ -0,0 +1,22 @@+import { cache } from "react";+import { cookies, headers } from "next/headers";+import { LOCALE_COOKIE, type SupportedLocale } from "@multica/core/i18n";+import {+ isSupportedLocale,+ MULTICA_LOCALE_HEADER,+ resolveLocaleFromSignals,+} from "./locale-routing";++export const getRequestLocale = cache(+ async (): Promise<SupportedLocale> => {+ const headerList = await headers();+ const headerLocale = headerList.get(MULTICA_LOCALE_HEADER);+ if (isSupportedLocale(headerLocale)) return headerLocale;++ const cookieStore = await cookies();+ return resolveLocaleFromSignals({+ cookieLocale: cookieStore.get(LOCALE_COOKIE)?.value,+ acceptLanguage: headerList.get("accept-language"),+ });+ },+);diff --git a/apps/web/lib/use-cases-i18n.ts b/apps/web/lib/use-cases-i18n.tsnew file mode 100644index 0000000000..09d8b14faa--- /dev/null+++ b/apps/web/lib/use-cases-i18n.ts@@ -0,0 +1,41 @@+import type { SupportedLocale } from "@multica/core/i18n";+import { getRequestLocale } from "@/lib/request-locale";++export const getUseCaseLocale = getRequestLocale;++type UseCaseText = {+ indexTitle: string;+ indexSubtitle: string;+ indexMetadataTitle: string;+ indexMetadataDescription: string;+ cardReadMore: string;+ tableOfContents: string;+};++export const useCaseText: Record<SupportedLocale, UseCaseText> = {+ en: {+ indexTitle: "Use cases",+ indexSubtitle:+ "See how teams organize people and agents together with Multica.",+ indexMetadataTitle: "Use cases",+ indexMetadataDescription:+ "See how teams put people and agents to work together with Multica.",+ cardReadMore: "Read →",+ tableOfContents: "On this page",+ },+ "zh-Hans": {+ indexTitle: "案例",+ indexSubtitle: "看看团队怎么用 Multica 把人和 agent 一起组织起来。",+ indexMetadataTitle: "案例",+ indexMetadataDescription:+ "看看团队怎么用 Multica 把人和 agent 一起组织起来。",+ cardReadMore: "阅读 →",+ tableOfContents: "目录",+ },+};++// Secondary CTA points at the docs entry that matches the active locale,+// mirroring the convention in features/landing/i18n/zh.ts.+export function docsHrefForLocale(locale: SupportedLocale): string {+ return locale === "zh-Hans" ? "/docs/zh" : "/docs";+}diff --git a/apps/web/lib/use-cases-source.ts b/apps/web/lib/use-cases-source.tsnew file mode 100644index 0000000000..86a9b380c1--- /dev/null+++ b/apps/web/lib/use-cases-source.ts@@ -0,0 +1,26 @@+import { loader } from "fumadocs-core/source";+import { defineI18n } from "fumadocs-core/i18n";+import type { SupportedLocale } from "@multica/core/i18n";+import { useCases } from "@/.source";++// Use-case content still uses dot-suffixed MDX files (`<slug>.en.mdx` and+// `<slug>.zh.mdx`). The public route remains prefix-free; request locale is+// resolved through the same cookie/header path as the rest of the web app.+export const i18n = defineI18n({+ languages: ["en", "zh"],+ defaultLanguage: "en",+ hideLocale: "default-locale",+ parser: "dot",+});++export type UseCaseLang = (typeof i18n.languages)[number];++export function getUseCaseLangForLocale(locale: SupportedLocale): UseCaseLang {+ return locale === "zh-Hans" ? "zh" : "en";+}++export const useCasesSource = loader({+ baseUrl: "/usecases",+ source: useCases.toFumadocsSource(),+ i18n,+});diff --git a/apps/web/next.config.ts b/apps/web/next.config.tsindex 63689fb933..775b62804a 100644--- a/apps/web/next.config.ts+++ b/apps/web/next.config.ts@@ -2,6 +2,7 @@ import type { NextConfig } from "next";import { config } from "dotenv";import { resolve } from "path";import { resolveRemoteApiUrl } from "./config/runtime-urls";+import { createMDX } from "fumadocs-mdx/next";// Load root .env so REMOTE_API_URL is available to next.config.tsconfig({ path: resolve(__dirname, "../../.env") });@@ -70,4 +71,10 @@ const nextConfig: NextConfig = {},};-export default nextConfig;+// fumadocs-mdx@12 is incompatible with Next 16's Turbopack: its loader fails to+// dynamic-import `.source/source.config.mjs` under the Turbopack Node evaluator+// (see fumadocs#2658). `dev`/`build` scripts pass `--webpack` to opt out.+// Drop the flag once fumadocs-mdx ships a Turbopack-compatible loader.+const withMDX = createMDX() as (config: NextConfig) => NextConfig;++export default withMDX(nextConfig);diff --git a/apps/web/package.json b/apps/web/package.jsonindex 48d13ea9f4..a0599f3f6f 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -4,12 +4,13 @@"private": true,"type": "module","scripts": {- "dev": "sh -c 'next dev --port \"${FRONTEND_PORT:-3000}\"'",- "build": "next build",+ "dev": "sh -c 'next dev --webpack --port \"${FRONTEND_PORT:-3000}\"'",+ "build": "fumadocs-mdx && next build --webpack","start": "next start",- "typecheck": "tsc --noEmit",+ "typecheck": "fumadocs-mdx && tsc --noEmit","lint": "eslint .",- "test": "vitest run"+ "test": "vitest run",+ "postinstall": "fumadocs-mdx"},"dependencies": {"@base-ui/react": "^1.3.0",@@ -46,6 +47,8 @@"dotenv": "^17.4.1","embla-carousel-react": "^8.6.0","emoji-mart": "^5.6.0",+ "fumadocs-core": "^15.5.2",+ "fumadocs-mdx": "^12.0.3","input-otp": "^1.4.2","linkify-it": "^5.0.0","lowlight": "^3.3.0",diff --git a/apps/web/proxy.ts b/apps/web/proxy.tsindex 6debb341c2..1807ad6f92 100644--- a/apps/web/proxy.ts+++ b/apps/web/proxy.ts@@ -1,5 +1,9 @@import { NextResponse, type NextRequest } from "next/server";-import { matchLocale, LOCALE_COOKIE } from "@multica/core/i18n";+import { LOCALE_COOKIE } from "@multica/core/i18n";+import {+ MULTICA_LOCALE_HEADER,+ resolveLocaleFromSignals,+} from "./lib/locale-routing";// Old workspace-scoped route segments that existed before the URL refactor// (pre-#1131). Any URL with these as the FIRST segment is a legacy URL that@@ -17,18 +21,11 @@ const LEGACY_ROUTE_SEGMENTS = new Set(["settings",]);-// Resolve the active locale per request. Cookie wins over Accept-Language;-// matchLocale() falls back to DEFAULT_LOCALE when neither yields a match.function resolveLocale(req: NextRequest): string {- const cookieLocale = req.cookies.get(LOCALE_COOKIE)?.value;- const acceptLanguage = req.headers.get("accept-language") ?? "";- const candidates: string[] = [];- if (cookieLocale) candidates.push(cookieLocale);- for (const part of acceptLanguage.split(",")) {- const tag = part.split(";")[0]?.trim();- if (tag) candidates.push(tag);- }- return matchLocale(candidates);+ return resolveLocaleFromSignals({+ cookieLocale: req.cookies.get(LOCALE_COOKIE)?.value,+ acceptLanguage: req.headers.get("accept-language"),+ });}// Forward the resolved locale to RSC layouts via the `x-multica-locale`@@ -37,7 +34,7 @@ function resolveLocale(req: NextRequest): string {// request — without it the value would only sit on the response.function nextWithLocale(req: NextRequest): NextResponse {const headers = new Headers(req.headers);- headers.set("x-multica-locale", resolveLocale(req));+ headers.set(MULTICA_LOCALE_HEADER, resolveLocale(req));return NextResponse.next({ request: { headers } });}diff --git a/apps/web/public/usecases/auto-data-analysis/ad-hoc-question.png b/apps/web/public/usecases/auto-data-analysis/ad-hoc-question.pngnew file mode 100644index 0000000000..db69b01d35Binary files /dev/null and b/apps/web/public/usecases/auto-data-analysis/ad-hoc-question.png differdiff --git a/apps/web/public/usecases/auto-data-analysis/db-boy-profile.png b/apps/web/public/usecases/auto-data-analysis/db-boy-profile.pngnew file mode 100644index 0000000000..1a8e5bd615Binary files /dev/null and b/apps/web/public/usecases/auto-data-analysis/db-boy-profile.png differdiff --git a/apps/web/public/usecases/auto-data-analysis/hero.png b/apps/web/public/usecases/auto-data-analysis/hero.pngnew file mode 100644index 0000000000..72c4b762a4Binary files /dev/null and b/apps/web/public/usecases/auto-data-analysis/hero.png differdiff --git a/apps/web/source.config.ts b/apps/web/source.config.tsnew file mode 100644index 0000000000..159f0eaeac--- /dev/null+++ b/apps/web/source.config.ts@@ -0,0 +1,35 @@+import { defineDocs, defineConfig } from "fumadocs-mdx/config";+import { z } from "zod";++// The default fumadocs frontmatter schema is strict and strips any field+// outside `{ title, description, icon, full }`. Our use-case pages need+// `hero_image` and `updated_at` to render the index card and sort the+// list, plus an optional `category` label. They are declared here so they+// pass validation (and gain TypeScript types), while looseObject lets+// any ad-hoc field still pass through.+// YAML auto-parses bare ISO dates (`updated_at: 2026-05-19`) into Date+// objects, which then fail `z.string()`. Preprocess to normalize Date back+// to a `YYYY-MM-DD` string so authors can write either form.+const dateString = z.preprocess(+ (v) => (v instanceof Date ? v.toISOString().slice(0, 10) : v),+ z.string(),+);++const useCaseFrontmatterSchema = z.looseObject({+ title: z.string(),+ description: z.string().optional(),+ hero_image: z.string(),+ updated_at: dateString,+ category: z.string().optional(),+});++export const useCases = defineDocs({+ dir: "content/use-cases",+ docs: {+ schema: useCaseFrontmatterSchema,+ },+});++export default defineConfig({+ mdxOptions: {},+});diff --git a/packages/core/paths/reserved-slugs.ts b/packages/core/paths/reserved-slugs.tsindex 064620b937..efafda502b 100644--- a/packages/core/paths/reserved-slugs.ts+++ b/packages/core/paths/reserved-slugs.ts@@ -62,6 +62,7 @@ export const RESERVED_SLUGS: ReadonlySet<string> = new Set(["careers","press","download",+ "usecases",// Account / billing (likely-future global routes in the avatar menu)"profile",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 7486634603..66175e91fd 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -598,6 +598,12 @@ importers:emoji-mart:specifier: ^5.6.0version: 5.6.0+ fumadocs-core:+ specifier: ^15.5.2+ version: 15.8.5(@types/[email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected]([email protected]([email protected]))([email protected]))([email protected])+ fumadocs-mdx:+ specifier: ^12.0.3+ version: 12.0.3([email protected](@types/[email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected]([email protected]([email protected]))([email protected]))([email protected]))([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected])input-otp:specifier: ^1.4.2@@ -17660,6 +17666,36 @@ snapshots:transitivePeerDependencies:- supports-color+ [email protected](@types/[email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected]([email protected]([email protected]))([email protected]))([email protected]):+ dependencies:+ '@formatjs/intl-localematcher': 0.6.2+ '@orama/orama': 3.1.18+ '@shikijs/rehype': 3.23.0+ '@shikijs/transformers': 3.23.0+ github-slugger: 2.0.0+ hast-util-to-estree: 3.1.3+ hast-util-to-jsx-runtime: 2.3.6+ image-size: 2.0.2+ negotiator: 1.0.0+ npm-to-yarn: 3.0.1+ path-to-regexp: 8.3.0+ react-remove-scroll: 2.7.2(@types/[email protected])([email protected])+ remark: 15.0.1+ remark-gfm: 4.0.1+ remark-rehype: 11.1.2+ scroll-into-view-if-needed: 3.1.0+ shiki: 3.23.0+ unist-util-visit: 5.1.0+ optionalDependencies:+ '@types/react': 19.2.14+ lucide-react: 1.0.1([email protected])+ next: 16.2.6(@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected])([email protected]([email protected]))([email protected])+ react: 19.2.3+ react-dom: 19.2.3([email protected])+ transitivePeerDependencies:+ - supports-color+[email protected]([email protected](@types/[email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected]([email protected]([email protected]))([email protected]))([email protected]))([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected](@emnapi/[email protected])(@emnapi/[email protected])(@types/[email protected])([email protected])([email protected])([email protected])):dependencies:'@mdx-js/mdx': 3.1.1@@ -17686,6 +17722,31 @@ snapshots:transitivePeerDependencies:- supports-color+ [email protected]([email protected](@types/[email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected]([email protected]([email protected]))([email protected]))([email protected]))([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected]):+ dependencies:+ '@mdx-js/mdx': 3.1.1+ '@standard-schema/spec': 1.1.0+ chokidar: 4.0.3+ esbuild: 0.25.12+ estree-util-value-to-estree: 3.5.0+ fumadocs-core: 15.8.5(@types/[email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected]([email protected]([email protected]))([email protected]))([email protected])+ js-yaml: 4.1.1+ lru-cache: 11.2.7+ mdast-util-to-markdown: 2.1.2+ picocolors: 1.1.1+ remark-mdx: 3.1.1+ remark-parse: 11.0.0+ tinyexec: 1.0.4+ tinyglobby: 0.2.15+ unified: 11.0.5+ unist-util-visit: 5.1.0+ zod: 4.3.6+ optionalDependencies:+ next: 16.2.6(@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected])([email protected]([email protected]))([email protected])+ react: 19.2.3+ transitivePeerDependencies:+ - supports-color+[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]):dependencies:'@radix-ui/react-accordion': 1.2.12(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])diff --git a/server/internal/handler/reserved_slugs.json b/server/internal/handler/reserved_slugs.jsonindex e2a0c5edf4..f2f6d01511 100644--- a/server/internal/handler/reserved_slugs.json+++ b/server/internal/handler/reserved_slugs.json@@ -49,7 +49,8 @@"blog","careers","press",- "download"+ "download",+ "usecases"]},{