deerflow2.0-enhanced / frontend
CLAUDE.md821 starsChanged 8 months agoMITView on GitHub
DeerFlow Frontend is a Next.js 16 web interface for an AI agent system. It communicates with a LangGraph-based backend to provide thread-based AI conversations with streaming responses, artifacts, and a skills/tools system. Stack: Next.js 16, React 19, TypeScript 5.8, Tailwind CSS 4, pnpm 10.26.2 No test framework is configured. The frontend is a stateful chat application. Users create threads (conversations), send messages, and receive streamed AI responses. The backend orchestrates agents that can produce artifacts (files/code) and todos. Backend API…
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
No test framework is configured.
- Very specific: line 77
Class names: Use cn() from @/lib/utils for conditional Tailwind classes.
≈ “Common” is an estimate: at least 1 in 5 of the 25,680 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
DeerFlow Frontend is a Next.js 16 web interface for an AI agent system. It communicates with a LangGraph-based backend to provide thread-based AI conversations with streaming responses, artifacts, and a skills/tools system.
Stack: Next.js 16, React 19, TypeScript 5.8, Tailwind CSS 4, pnpm 10.26.2
Commands
| Command | Purpose |
pnpm dev | Dev server with Turbopack (http://localhost:3000) |
pnpm build | Production build |
pnpm check | Lint + type check (run before committing) |
pnpm lint | ESLint only |
pnpm lint:fix | ESLint with auto-fix |
pnpm typecheck | TypeScript type check (tsc --noEmit) |
pnpm start | Start production server |
No test framework is configured.
Architecture
Frontend (Next.js) ──▶ LangGraph SDK ──▶ LangGraph Backend (lead_agent)
├── Sub-Agents
└── Tools & SkillsThe frontend is a stateful chat application. Users create threads (conversations), send messages, and receive streamed AI responses. The backend orchestrates agents that can produce artifacts (files/code) and todos.
Source Layout (src/)
app/— Next.js App Router. Routes:/(landing),/workspace/chats/[thread_id](chat).components/— React components split into:ui/— Shadcn UI primitives (auto-generated, ESLint-ignored)ai-elements/— Vercel AI SDK elements (auto-generated, ESLint-ignored)workspace/— Chat page components (messages, artifacts, settings)landing/— Landing page sections
core/— Business logic, the heart of the app:threads/— Thread creation, streaming, state management (hooks + types)api/— LangGraph client singletonartifacts/— Artifact loading and cachingi18n/— Internationalization (en-US, zh-CN)settings/— User preferences in localStoragememory/— Persistent user memory systemskills/— Skills installation and managementmessages/— Message processing and transformationmcp/— Model Context Protocol integrationmodels/— TypeScript types and data models
hooks/— Shared React hookslib/— Utilities (cn()from clsx + tailwind-merge)server/— Server-side code (better-auth, not yet active)styles/— Global CSS with Tailwind v4@importsyntax and CSS variables for theming
Data Flow
- User input → thread hooks (
core/threads/hooks.ts) → LangGraph SDK streaming - Stream events update thread state (messages, artifacts, todos)
- TanStack Query manages server state; localStorage stores user settings
- Components subscribe to thread state and render updates
Key Patterns
- Server Components by default,
"use client"only for interactive components - Thread hooks (
useThreadStream,useSubmitThread,useThreads) are the primary API interface - LangGraph client is a singleton obtained via
getAPIClient()incore/api/ - Environment validation uses
@t3-oss/env-nextjswith Zod schemas (src/env.js). Skip withSKIP_ENV_VALIDATION=1
Code Style
- Imports: Enforced ordering (builtin → external → internal → parent → sibling), alphabetized, newlines between groups. Use inline type imports:
import { type Foo }. - Unused variables: Prefix with
_. - Class names: Use
cn()from@/lib/utilsfor conditional Tailwind classes. - Path alias:
@/*maps tosrc/*. - Components:
ui/andai-elements/are generated from registries (Shadcn, MagicUI, React Bits, Vercel AI SDK) — don't manually edit these.
Environment
Backend API URLs are optional; an nginx proxy is used by default:
NEXT_PUBLIC_BACKEND_BASE_URL=http://localhost:8001
NEXT_PUBLIC_LANGGRAPH_BASE_URL=http://localhost:2024Requires Node.js 22+ and pnpm 10.26.2+.
In this repository25 other files it gives its agents.
- backend/AGENTS.mdAGENTS.md
- frontend/AGENTS.mdAGENTS.md
- backend/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- bootstrapSkill
- chart-visualizationSkill
- claude-to-deerflowSkill
- company-researchSkill
- consulting-analysisSkill
- data-analysisSkill
- deep-researchSkill
- find-skillsSkill
- frontend-designSkill
- github-deep-researchSkill
- image-generationSkill
- multi-languageSkill
- paper-researchSkill
- podcast-generationSkill
- ppt-generationSkill
- report-to-pptSkill
- skill-creatorSkill
- surprise-meSkill
- vercel-deploySkill
- video-generationSkill
- web-design-guidelinesSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

