architectures
Architecture pattern reference for Next.js & React projects. Covers Flat, Feature-Based, FSD, and Monorepo patterns with core principles, file placement, and import boundaries.
- License 许可
- MIT
- 最近更新
- 2026-03-27
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- architectures
- description
- Architecture pattern reference for Next.js & React projects. Covers Flat, Feature-Based, FSD, and Monorepo patterns with core principles, file placement, and import boundaries.
02 资源文件 4
- 参考文档arch-feature-based.md1.6 KB
- 参考文档arch-flat.md1.3 KB
- 参考文档arch-fsd.md1.9 KB
- 参考文档arch-monorepo.md1.8 KB
03 SKILL.md 正文
Architecture Patterns
Reference guide for choosing and applying architecture patterns. Used by the /init agent when generating spec/ARCHITECTURE.md.
Pattern Summary
| Pattern | Team size | Core idea | When to use |
|---|---|---|---|
| Flat | Solo | Root-level sharing, no feature grouping | Prototypes, simple apps, < 10 features |
| Feature-Based | Small (2-5) | Self-contained feature modules with public API | Clear feature boundaries, medium complexity |
| FSD | Medium (5-15) | Strict unidirectional layer hierarchy | Complex domain logic, strict discipline needed |
| Monorepo | Large (15+) | apps/ + packages/ with Turborepo | Multiple apps, shared code, independent deploys |
How to Choose
Is this a solo prototype or simple app?
├─ Yes → Flat
└─ No → Does the team need strict layer rules?
├─ Yes → Is the team 15+?
│ ├─ Yes → Monorepo
│ └─ No → FSD
└─ No → Feature-Based
Migration Path
Flat → Feature-Based → FSD → Monorepo
Each pattern is a superset of the previous. Migration is incremental — you don't need to rewrite everything at once.
Agent Usage
/initreads the detected pattern and applies the corresponding guide when writingspec/ARCHITECTURE.md- Agents reference this skill for file placement and import boundary decisions
- The pattern guide is a reference — agents adapt to the actual project structure, not the other way around
04 同仓库更多 Skills
zustand
Zustand state management guide. Use when working with store code (src/store/**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.
web-vitals
暂无简介
vercel-storage
Vercel storage expert guidance — Blob, Edge Config, and Marketplace storage (Neon Postgres, Upstash Redis). Use when choosing, configuring, or using data storage with Vercel applications.
vercel-functions
Vercel Functions expert guidance — Serverless Functions, Edge Functions, Fluid Compute, streaming, Cron Jobs, and runtime configuration. Use when configuring, debugging, or optimizing server-side code running on Vercel.
ui-ux-pro-max
UI/UX design intelligence for web and mobile. Includes 50+ styles, 161 color palettes, 57 font pairings, 161 product types, 99 UX guidelines, and 25 chart types across 10 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, and HTML/CSS). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, and check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, and mobile app. Elements: button, modal, navbar, sidebar, card, table, form, and chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, and flat design. Topics: color systems, accessibility, animation, layout, typography, font pairing, spacing, interaction states, shadow, and gradient. Integrations: shadcn/ui MCP for component search and examples.
turborepo
Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.