- 更新 AGENTS.md 项目知识库文档(多目录) - 添加 docs/analyst.md 产品分析文档 - 添加 .omc/ 工具状态和会话记录 - 添加 .sisyphus/ 计划文档 - 添加 project-structure.txt 项目结构 - 删除 timeline 测试截图
1.5 KiB
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
- Pages: Add to
app/[locale]/following locale pattern - API: Add to
app/api/with Zod validation - Components: Add to appropriate domain folder
- Translations: Update BOTH
zh.jsonANDen.json
Common Patterns
- Locale routing:
middleware.tshandles 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)