105 Frontend Architecture
What this skill is for
Section titled “What this skill is for”105-frontend-architecture produces the frontend architecture document: how components are organized, how state is managed at each level, how routing works, how the frontend integrates with the backend, and what styling and accessibility conventions apply. It translates the system architecture’s frontend technology choices into concrete patterns that every developer and design skill can depend on.
Output path: .specflow/docs/D05-frontend-architecture.md
When to use it
Section titled “When to use it”- When the frontend needs clear architectural rules before page or feature design begins
- When the team needs to agree on state management, component boundaries, and routing conventions
- On existing projects where frontend patterns exist but have never been documented
- Before
106-ui-designor107-ui-experience, which both depend on knowing the component and styling approach
When NOT to use it
Section titled “When NOT to use it”- When clear, current frontend architecture documentation already exists and is trusted by the team
- For a purely backend service with no frontend
- When the frontend is a simple static site with no meaningful component or state architecture to document
What it produces
Section titled “What it produces”.specflow/docs/D05-frontend-architecture.mdcovering:- Component organization and naming conventions
- State management approach for each state category (component, URL, global, server)
- Routing structure and navigation patterns
- API integration patterns and data fetching approach
- Styling methodology (CSS Modules, utility-first, CSS-in-JS, design tokens)
- Accessibility baseline and enforcement approach
- Build and bundling setup
- Real-time requirements (WebSockets, SSE, polling)
- Internationalization and responsive design strategy
Required inputs
Section titled “Required inputs”- Frontend framework — React, Astro, SolidJS, Vue, or other
- Deployment model — static, SSR, CDN, or hybrid
- API integration approach — REST with SWR/fetch, GraphQL, Firebase, or other
- State management decisions — for component, URL, global, and server state
- Real-time requirements — WebSockets, SSE, polling, or none
Common prompts
Section titled “Common prompts”Prompt
Run 105-frontend-architecture. React with Zustand for global state, SWR for server state, React Router for routing, CSS Modules for styling. Prompt
Run 105 for an Astro + SolidJS site with nano-stores for global state and Tailwind for styling. What usually comes next
Section titled “What usually comes next”106-ui-design — establish the visual design system, building on the component and styling approach documented in D05.
Practical guidance
Section titled “Practical guidance”- Be specific about which state management tool is used for each state category. “We use Zustand” is incomplete — specify what belongs in the global store and what stays local.
- Document what is explicitly off-limits (e.g., “no direct DOM manipulation”, “no fetch calls outside service modules”) — these constraints help agents make correct decisions without asking.
- If the project has an existing frontend codebase, use
@exploreto discover actual patterns before writing D05. Avoid documenting a theoretical architecture that does not match the real code. - Reference D02 for stack choices and D04 for API contracts. D05 should not re-state technology decisions — it specifies how to use them in the frontend.
Common mistakes
Section titled “Common mistakes”- Treating all four state categories as one (“we just use Zustand for everything”)
- Omitting the routing structure — this matters significantly for feature design
- Leaving the styling approach vague (“we use Tailwind”) without specifying how components are structured
- Not documenting the API integration pattern — this leads to inconsistent data fetching across the codebase