frontend-architecture

Design frontend architecture for React, Next.js, and Vite projects.

5|1|Updated Jun 17, 2026
One-click install
npx skills add https://github.com/roanbrasil/engineer-grade-agent-skills --skill frontend-architecture-roanbrasil
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-architecture
Source: https://github.com/roanbrasil/engineer-grade-agent-skills/tree/main/skills/frontend-architecture
Command: npx skills add https://github.com/roanbrasil/engineer-grade-agent-skills --skill frontend-architecture-roanbrasil

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the common pain points of inconsistent frontend architecture choices that lead to poor performance, high technical debt, and unmaintainable codebases in web applications, especially as teams and feature sets scale.

Core Features & Use Cases

  • Rendering strategy selection: Decision trees and comparisons for choosing between CSR, SSR, SSG, ISR, and streaming SSR based on content type, SEO needs, and personalization requirements.
  • Application structure guidance: Feature-based folder layout recommendations to reduce cross-feature coupling and simplify feature maintenance and deletion.
  • State architecture patterns: Clear categorization of server, UI, and URL state with recommended tooling (TanStack Query, Zustand, nuqs) and colocation principles.
  • Typed API layer implementation: Patterns for abstracting API calls, using OpenAPI code generation, and tRPC for end-to-end type safety.
  • Build and testing strategy: Configuration examples for Vite, TypeScript strict mode, and a testing pyramid using Vitest, MSW, and Playwright.
  • Use Case: For a growing e-commerce platform, use this Skill to select ISR for product pages, structure code by feature (orders, products, auth), set up a typed API client, and implement a scalable testing workflow to reduce bugs and speed up feature releases.

Quick Start

Use the frontend-architecture skill to design the complete architecture setup for your new customer-facing SaaS dashboard, including rendering strategy, folder structure, state management, and testing configuration.

Frequently Asked Questions about frontend-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a scalable React and Next.js frontend architecture?

A scalable React and Next.js frontend architecture uses a feature-based folder layout to reduce cross-feature coupling, categorizes state into server, UI, and URL layers, and implements a typed API layer. This approach simplifies feature maintenance and deletion as applications grow.

What is the best way to choose between SSR, SSG, and ISR rendering strategies?

Choosing between SSR, SSG, and ISR rendering strategies depends on your content type, SEO needs, and personalization requirements. Use decision trees to compare these rendering approaches to prevent performance degradation and ensure optimal content delivery.

How do I configure state management in a modern web application using TanStack Query and Zustand?

Configuring state management involves categorizing application state into server, UI, and URL state. Use TanStack Query for server state, Zustand for UI state, and nuqs for URL state, applying colocation principles to maintain a maintainable state architecture.

Does frontend architecture impact testing workflow configuration with Vite and Vitest?

Frontend architecture directly impacts testing workflows by defining a testing pyramid using Vitest, MSW, and Playwright. Configuring Vite with TypeScript strict mode ensures a scalable testing workflow that reduces bugs and speeds up feature releases.

Can I implement end-to-end type safety for API calls in a Next.js project?

End-to-end type safety for API calls in Next.js is implemented by abstracting API layers using OpenAPI code generation or tRPC. These typed API patterns eliminate inconsistent data fetching structures and reduce runtime errors across your frontend systems.