Logo di Frontend Technical Spec

Frontend Technical Spec

Community
shinpr
frontend-technical-spec

Definisce l’ambiente React, l’architettura dei componenti, il flusso di stato e dati, la verifica della build e i criteri non funzionali del frontend sulla base delle evidenze presenti nel repository. Usala per configurare o progettare un frontend React, la relativa build o i confini del runtime.

Add to TypingMind

Panoramica

Pubblicato dashinpr
Repositoryai-coding-project-boilerplate
Nome della skillfrontend-technical-spec
Stelle
234
Fork
28
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da shinpr su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Frontend Technical Spec in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/shinpr/ai-coding-project-boilerplate/tree/main/.claude/skills-en/frontend-technical-spec
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/shinpr/ai-coding-project-boilerplate.git /tmp/ai-coding-project-boilerplate
mkdir -p .claude/skills
cp -r /tmp/ai-coding-project-boilerplate/.claude/skills-en/frontend-technical-spec .claude/skills/frontend-technical-spec
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Frontend Technical Spec in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Frontend Technical Spec non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Frontend Technical Spec non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Technical Design Rules (Frontend)

Prerequisite Detection

Inspect package.json, the lockfile, TypeScript/build configuration, CI definitions, and representative components before applying a tool- or framework-specific rule. Treat React, Vite, Next.js, a state library, form library, or script as available only when repository evidence names it. Label surrounding-pattern conclusions as inferred. When a missing decision changes rendering architecture, compatibility, security, or verification, stop and name the exact evidence or user decision required.

Basic Technology Stack Policy

These rules apply when repository configuration confirms a TypeScript-based React application. Select architecture by mapping current requirements and constraints to component responsibilities, state ownership, server/client boundaries, and observable verification points.

Environment Variable Management and Security

Environment Variable Management

  • Use the build tool's client-exposure mechanism: Browser code can read only values explicitly exposed by the configured bundler/framework; server-only environment access remains outside client bundles
  • Centrally manage environment variables through configuration layer
  • Parse exposed values at one typed configuration boundary before application use
  • Give a value a default only when requirements define valid behavior for absence; otherwise fail startup/build validation with the variable name and expected format
typescript
// Build tool environment variables (public values only; client-exposed vars need the VITE_ prefix)
const config = {
  apiUrl: import.meta.env.VITE_API_URL || 'http://localhost:3000',
  appName: import.meta.env.VITE_APP_NAME || 'My App'
}

// Does not work in frontend
const apiUrl = process.env.API_URL

Security (Client-side Constraints)

  • CRITICAL: All frontend code is public and visible in browser
  • Keep secrets server-side: Client-exposed configuration contains public values only; a backend or trusted service owns API keys, tokens, and credentials
  • Keep local .env files outside version control and provide non-secret example files for required variable names
  • Log and return only fields approved for the current trust boundary; redact passwords, tokens, and personal data

Correct Approach for Secrets:

typescript
// Security risk: API key exposed in browser
const apiKey = import.meta.env.VITE_API_KEY
const response = await fetch(`https://api.example.com/data?key=${apiKey}`)

// Correct: Backend manages secrets, frontend accesses via proxy
const response = await fetch('/api/data') // Backend handles API key authentication

Architecture Design

Frontend Architecture Patterns

React Component Architecture:

  • Function Components: Mandatory; class components allowed solely for Error Boundaries (no hook equivalent)
  • Custom Hooks: For logic reuse and dependency injection
  • Component Hierarchy: Atoms -> Molecules -> Organisms -> Templates -> Pages
  • Props-driven: Components receive all necessary data via props
  • Co-location: Place tests, styles, and related files alongside components

Select a component/state pattern using these rules:

  • Keep state local when one component subtree owns every read and write
  • Use Context when multiple descendants require the same low-frequency state and the provider boundary is explicit
  • Use a server-state library only when the configured dependency exists and caching, deduplication, background refresh, or request lifecycle state is required
  • Introduce an additional state-management dependency only when current requirements cannot be covered by local state, reducer state, existing Context, or the repository's established state mechanism

State Management Patterns:

  • Local State: useState for component-specific state
  • Context API: For sharing state across component tree (theme, auth, etc.)
  • Custom Hooks: Encapsulate state logic and side effects
  • Server State: React Query or SWR for API data caching

Unified Data Flow Principles

Client-side Data Flow

Maintain consistent data flow throughout the React application:

  • Single Source of Truth: Each piece of state has one authoritative source

    • UI state: Component state or Context
    • Server data: API responses cached in React Query/SWR
    • Form data: Controlled components with React Hook Form
  • Unidirectional Flow: Data flows top-down via props

    API Response -> State -> Props -> Render -> UI
    User Input -> Event Handler -> State Update -> Re-render
  • Immutable Updates: Use immutable patterns for state updates

    typescript
    // Immutable state update
    setUsers(prev => [...prev, newUser])
    
    // Invalid mutable state update
    users.push(newUser)
    setUsers(users)

Type Safety in Data Flow

  • Frontend -> Backend: Props/State (Type Guaranteed) -> API Request (Serialization)
  • Backend -> Frontend: API Response (unknown) -> Type Guard -> State (Type Guaranteed)
typescript
// Type-safe data flow
async function fetchUser(id: string): Promise<User> {
  const response = await fetch(`/api/users/${id}`)
  const data: unknown = await response.json()

  if (!isUser(data)) {
    throw new Error('Invalid user data')
  }

  return data // Type guaranteed as User
}

Build and Testing

Select the package manager from the packageManager field, lockfile, or CI command in that order. Execute only scripts present in the selected manifest.

Build Commands

  • Auto-detect and execute the following from package.json scripts:
    • Development server
    • Production build
    • Type check (no emit)

Testing Commands

  • test - Run tests

Quality Check Requirements

Quality checks are mandatory upon implementation completion:

Phase 1-3: Basic Checks

  • check - Biome (lint + format)
  • build - TypeScript build

Transition evidence: every configured lint/format/type/build check exits successfully. A missing required script is reported with the manifest/configuration path, and the remaining checks still run; whether the missing check leaves required proof unavailable is decided by the quality-fixer result.

Phase 4-5: Tests and Final Confirmation

  • test - Test execution
  • check:all - Overall integrated check

Completion evidence: configured tests pass, the production build succeeds, and the integrated check remains clean after test fixes. Record an environment-dependent test as blocked with its exact prerequisite.

Test Focus

  • Give foundational, high-reuse units such as shared components, custom hooks, and utilities direct tests for their observable contracts. Verify higher-composition surfaces such as organisms and pages through integration or E2E tests when that boundary best exposes the relevant failure

Non-functional Requirements

  • Browser Compatibility: Use the repository's Browserslist/build target or a named product requirement; record the source and test the affected browser-specific behavior
  • Rendering Performance: Use the browser matrix and performance thresholds defined by project requirements, CI, or performance configuration. When none exists, report measured conditions as diagnostic evidence without inventing a pass threshold

Domande frequenti

Cosa fa la skill IA Frontend Technical Spec?

Definisce l’ambiente React, l’architettura dei componenti, il flusso di stato e dati, la verifica della build e i criteri non funzionali del frontend sulla base delle evidenze presenti nel repository. Usala per configurare o progettare un frontend React, la relativa build o i confini del runtime.

Perché usare Frontend Technical Spec su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Frontend Technical Spec è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Frontend Technical Spec in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/shinpr/ai-coding-project-boilerplate/tree/main/.claude/skills-en/frontend-technical-spec. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Frontend Technical Spec?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Frontend Technical Spec?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Frontend Technical Spec: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Frontend Technical Spec è gratuita?

Sì. È pubblicata su GitHub da shinpr con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇