frontend-api-integration-patterns
Production-ready patterns for frontend API integration: cancellation, retry, debounce, dedup, error normalization with @repo/errors. Use when building or reviewing async data fetching in apps/portal. Anti-trigger: do not duplicate ApiError locally; do not retry 4xx; do not skip AbortController cleanup.
- License 许可
- MIT
- 最近更新
- 2026-07-24
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- frontend-api-integration-patterns
- risk
- safe
- tags
- [ "frontend", "api-integration", "typescript", "react", "async" ]
- tools
- [ "claude", "cursor", "gemini", "codex" ]
- source
- community
- description
- Production-ready patterns for frontend API integration: cancellation, retry, debounce, dedup, error normalization with @repo/errors. Use when building or reviewing async data fetching in apps/portal. Anti-trigger: do not duplicate ApiError locally; do not retry 4xx; do not skip AbortController cleanup.
02 资源文件 6
- 参考文档references/anti-patterns.md965 B
- 参考文档references/best-practices.md1.2 KB
- 参考文档references/core-patterns.md3.2 KB
- 参考文档references/examples.md484 B
- 参考文档references/limitations.md432 B
- 参考文档references/repo-mapping.md921 B
03 SKILL.md 正文
Frontend API Integration Patterns
Correctness-first async patterns for the Arch Systems portal. Load references as needed — do not inline duplicate error types.
When to use
- New hooks or components fetching from APIs
- Reviewing race conditions, stale data, or retry logic
- Normalizing errors across portal and API
Workflow
- Read
references/repo-mapping.md— use existing@repo/errors, never redefine - Apply patterns from
references/core-patterns.md - Check
references/anti-patterns.mdbefore merge - See
references/examples.mdfor full implementations
References
| File | Content |
|---|---|
references/repo-mapping.md |
This repo's modules and imports |
references/core-patterns.md |
API layer, cancellation, retry, debounce, dedup |
references/examples.md |
Prediction, search, optimistic UI |
references/best-practices.md |
Practices and pitfalls tables |
references/anti-patterns.md |
SAP violations to avoid |
references/limitations.md |
React Query / idempotency notes |
Assets
No static templates required — patterns are TypeScript reference implementations in references/.
04 同仓库更多 Skills
escape-skill
暂无简介
zz-review-empty
暂无简介
workflow-guide
Explicit helper for Cursor PM ↔ Claude Code two-agent workflow guidance. Do NOT load for: solo implementation, workflow setup, handoff execution, or general process coaching.
vibecoder-guide
Explicit helper for non-technical VibeCoder coaching: what to ask next, how to describe work, and how to stay safe. Do NOT load for: direct implementation, technical review, or Cursor/PM workflow.
ui
Explicit helper for UI components, hero sections, forms, feedback, and contact surfaces. Do NOT load for: authentication, backend implementation, database work, or business logic.
session
Unified session management window. Handles initialization, memory, state all-in-one. Explicit /session invocation only — sub-skills handle auto-delegation. Use when managing Claude Code sessions, /session command. Do NOT load for: app user sessions, login state, authentication features.