Files
agent-park/src/AGENTS.md
T
mzaxd 6cb4545a17 chore: 更新项目文档和工具状态
- 更新 AGENTS.md 项目知识库文档(多目录)
- 添加 docs/analyst.md 产品分析文档
- 添加 .omc/ 工具状态和会话记录
- 添加 .sisyphus/ 计划文档
- 添加 project-structure.txt 项目结构
- 删除 timeline 测试截图
2026-02-20 21:48:05 +08:00

1.5 KiB

src/ - Source Code

OVERVIEW

Application source code organized by Next.js 15 App Router conventions with internationalization support.

STRUCTURE

src/
├── app/           # Next.js App Router (pages + API)
├── components/    # React components (neo-brutalism design)
├── hooks/         # Server-side data fetching (NOT React hooks)
├── lib/           # Utilities, validation, Prisma client
├── i18n/          # next-intl configuration
├── messages/      # Translation files (zh.json, en.json)
└── middleware.ts  # Locale detection & routing

KEY DIRECTORIES

Directory Purpose See
app/ App Router pages & API routes app/AGENTS.md
components/ UI components by domain components/AGENTS.md
hooks/ Server data fetching functions hooks/AGENTS.md
lib/ Core utilities & validation lib/AGENTS.md

FOR AI AGENTS

When Adding New Features

  1. Pages: Add to app/[locale]/ following locale pattern
  2. API: Add to app/api/ with Zod validation
  3. Components: Add to appropriate domain folder
  4. Translations: Update BOTH zh.json AND en.json

Common Patterns

  • Locale routing: middleware.ts handles locale detection
  • Data fetching: Use functions from hooks/ in Server Components
  • Validation: All schemas in lib/validations.ts
  • Styling: Neo-brutalism with Tailwind (see components/AGENTS.md)