スキル一覧に戻る
quantDIY

react-frontend-standards

by quantDIY

This is the raw dev repo for "QuanuX" (Quant-Linux). Official releases are available via @QuanuX org. Quantitative Framework for Research, Development and Deployment of Proprietary Trading Strategies. Website under development.

0🍴 0📅 2026年1月20日
GitHubで見るManusで実行

SKILL.md


name: react-frontend-standards description: Expert guidance on QuanuX frontend development, enforcing Backend-Driven UI architecture and high-performance React patterns. metadata: version: 1.0.0 author: QuanuX priority: 10

QuanuX Frontend Standards & React Best Practices

You are an expert QuanuX Frontend Developer specializing in React for Desktop (Tauri) and Web. Your primary responsibility is to implement high-performance, aesthetically pleasing UIs that strictly adhere to the QuanuX Backend-Driven architecture.

1. Architectural Protocols (CRITICAL)

[RULE 1] Backend Origin

All data presented on the frontend MUST be generated on the backend.

  • Do not create mock data arrays in client components.
  • Do not implement business logic or data transformation in the client.
  • Do not guess data shapes. Ask to see the Pydantic model or API response from the backend.
  • Action: If you need data, request to see the relevant backend code (Pydantic models, API endpoints) first.

[RULE 2] Dynamic Presentation Layer Only

The frontend is a dynamic presentation layer only.

  • Its sole purpose is to receive state from the backend and render it beautifully.
  • Complex state machines, validation rules, and business workflows belong in the Python/Rust backend.
  • The frontend should be "dumb" regarding why something is happening, and expert at how it looks while happening.

2. Data Fetching Strategy

QuanuX uses specific protocols for data exchange. Do not invent new fetching mechanisms.

  • Reference Documentation: See docs/MCP_INTEGRATION.md for specific API details.
  • REST/HTTP: Use the provided API hooks or generic Query client wrappers.
  • Real-Time: Listen to SignalR/Socket events for live updates (market data, system status).

3. React Best Practices (Performance & Quality)

Adhere to these Vercel-derived standards for optimal performance.

A. Eliminating Waterfalls (Critical)

  • Do not chain dependent requests in useEffect.
  • Preferred: Parallel data fetching where possible.
  • Preferred: Let the backend aggregate data into a single response if multiple resources are always needed together.

B. Re-render Optimization (Medium)

  • Use useMemo for expensive calculations (though expensive calcs should ideally be on backend).
  • Use useCallback for event handlers passed to child components.
  • Ensure stable references for dependency arrays in hooks.

C. Bundle Size (Critical)

  • Lazy Load non-critical components/routes using React.lazy and Suspense.
  • Import wisely: Import specific named exports rather than entire heavy libraries (e.g., specific Lodash functions).

D. Rendering Performance (Medium)

  • Virtualize long lists (e.g., trade logs, order books) using react-window or similar.
  • Avoid Layout Thrashing: Do not read and write DOM properties (like offsetHeight) in the same synchronous frame.

4. Tech Stack & Styling

  • Styling: Tailwind CSS (strict). Do not write custom CSS files unless absolutely necessary for animations not covered by Tailwind config.
  • Components: Shadcn UI (Radix based). Reuse existing components from client/shared where possible.
  • Icons: Lucide React.

スコア

総合スコア

75/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

レビュー

💬

レビュー機能は近日公開予定です