fe-bootstrap-architecture
Frontend Bootstrap Architecture
Use this skill when the task starts from an empty repo, a new frontend app, a major structural refactor, or an unclear existing codebase that needs architectural direction.
This skill is optimized for React, Next.js, Vite, and React-adjacent repositories, but it can also be used to inspect an existing Vue or other frontend project before making architecture decisions.
Use This Skill When
- The task starts from project initialization or framework selection.
- The repository already exists and needs structural review before implementation.
- The user needs architecture, directory strategy, environment setup, or baseline engineering conventions.
- The task affects routing foundations, app shell design, module boundaries, or shared layers.
Inputs To Confirm Up Front
- Whether the task is greenfield or based on an existing local repo.
- Preferred framework or whether framework choice is still open.
- Rendering model: SPA, SSR, SSG, ISR, or hybrid.
- Package manager, workspace needs, and deployment constraints.
- Environment requirements: local, development, staging, production.
- Mobile support, browser support, and internationalization requirements.
Execute Workflow
- Inspect the current starting point.
- If the repo exists, read the local structure, scripts, routing approach, styling approach, test setup, and environment conventions first.
- If the repo does not exist, identify the smallest viable stack that fits the product constraints.
- Choose the project foundation deliberately.
- Select React, Next.js, Vite, Vue, or another framework based on product requirements rather than habit.
- Keep initialization choices aligned with team familiarity, deployment model, and ecosystem stability.
- Define architecture before feature growth.
- Establish app shell boundaries, module strategy, shared layers, and dependency direction.
- Keep domain modules explicit instead of relying on pages alone as architecture.
- Establish configuration and engineering baseline.
- Add linting, formatting, type checking when applicable, environment config, and test scaffolding.
- Make environment ownership explicit through a centralized config layer.
- If internationalization is required, establish translation infrastructure, locale loading strategy, and formatter ownership early.
Core Guidance
Framework selection
- Use Next.js when SSR, SEO, edge rendering, or route-level data loading materially matter.
- Use Vite for SPA-heavy products, internal tools, and fast iteration when SSR is not the core requirement.
- Do not replace an existing healthy stack without a concrete architectural reason.
Architecture
- Prefer domain-oriented structure for larger products.
- Keep shared layers small and stable.
- Separate local state, server state, URL state, and global state.
- Prefer mature libraries over custom infrastructure for solved problems.
Environment baseline
- Support required environments explicitly: local, development, staging, and production.
- Centralize environment access in config files such as
src/config/env.tsandsrc/config/runtimeConfig.ts. - Validate required environment variables early.
Internationalization baseline
- Decide early whether the project needs single-locale delivery, multilingual support, or near-term i18n readiness.
- Choose a translation strategy deliberately: static dictionaries, namespace-based resources, CMS-backed content, or hybrid loading.
- Define ownership for text resources, date and time formatting, number formatting, currency formatting, and pluralization.
- Keep the baseline architecture capable of locale switching, lazy-loaded message bundles, and RTL support when relevant.
Review Checklist
- It is clear whether the task starts from a greenfield repo or an existing project.
- Framework choice is justified by product and deployment requirements.
- Module boundaries and shared layers are understandable.
- Environment access is centralized and validated.
- Baseline engineering setup exists for linting, formatting, and test scaffolding.
- Internationalization baseline is explicit when multilingual support or i18n-readiness is required.
Output Requirements
- Bootstrap or initialization strategy.
- Framework and rendering decision with tradeoffs.
- Module or directory strategy.
- Environment strategy and config ownership.
- Internationalization baseline and locale-loading strategy when relevant.
- Explicit assumptions and constraints.
More from jiannx/agent-skills
nocobase-bugfix
Diagnose and fix NocoBase v2 bugs, especially flow, FlowModel, client-v2, and plugin client issues. Use for issue reproduction, root-cause analysis, targeted fixes, regression checks, or narrow v2 feature completion based on nearby v1 behavior. Default to v2-only changes unless the user explicitly asks for v1.
9nocobase-v2-flow-upgrade
Upgrade existing NocoBase v1 plugins to v2 FlowModel or field-model architecture with behavior parity. Use for migration planning, implementation, parity validation, and pitfalls around request payloads, settings ownership, i18n namespaces, roles persistence, flow variables, and editor integrations.
9fe-quality-operations
Prepare frontend projects for reliable delivery with testing, performance review, observability, release strategy, and production-readiness checks.
2fe-data-mock-state
Design frontend data layers, server-state handling, adapters, mock strategies, and state ownership with stable contracts and low integration churn.
2fe-routing-permission
Design frontend navigation, route ownership, URL state, auth boundaries, and permission systems with explicit access rules and user-state handling.
2fe-design-implementation
Implement product-grade frontend UI from design artifacts with consistent interaction patterns, theme-driven styling, responsive behavior, and design verification.
2