frontend-portal
React/TanStack Start frontend portal routes, API hooks, runtime configuration, and UI workflows for Open Wearables.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- frontend-portal
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- React/TanStack Start frontend portal routes, API hooks, runtime configuration, and UI workflows for Open Wearables.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-hooks-and-state.md12.3 KB
- 参考文档references/routes-and-components.md11.2 KB
- 参考文档references/troubleshooting.md11.6 KB
- 参考文档references/workflows.md9.9 KB
03 SKILL.md 正文
Frontend Portal
Use this sub-skill for Open Wearables frontend work in the React/TanStack Start portal: routes, protected pages, auth/session behavior, dashboard/users/detail screens, device pairing, provider coverage, sync monitoring, outgoing webhooks, settings tabs, API hooks/services/query keys, runtime API URL configuration, styling/components, and frontend test/lint/build workflows.
Route the task
- For page routing, layout, auth guards, sidebar navigation, settings tabs, user detail panels, coverage matrix, pairing flows, syncs, webhooks, and reusable UI components, read routes-and-components.md.
- For service modules,
apiClient,API_ENDPOINTS, runtimeVITE_API_URLresolution, TanStack Query hooks, query-key invalidation, uploads, OAuth connection helpers, and SSE state, read api-hooks-and-state.md. - For local development commands, Node/pnpm requirements, environment variables, UI change checklists, and frontend verification commands, read workflows.md.
- For symptoms and fixes around auth redirects, stale queries, runtime API URL drift, SSR hydration, provider icons, webhook enablement, sync streams, Tailwind v4, pnpm/Corepack, lint, and build failures, read troubleshooting.md.
- Before or after frontend edits, run the safe metadata/source checker when a checkout is available:
python skills/disco/open-wearables/sub-skills/frontend-portal/scripts/check_frontend_metadata.py --repo-root .. The script only reads package metadata and source text; it does not install packages, call the network, or write application files.
Boundaries
This sub-skill owns the portal-facing frontend contract. Route backend API implementation, database models, migrations, auth/token semantics, outgoing webhook delivery internals, and endpoint docs navigation to backend-core. Route provider OAuth strategy internals, coverage declarations, provider factory changes, import normalization, and provider webhook parsing to provider-integrations. Route MCP assistant tools and API-client behavior to mcp-server.
When a UI task spans boundaries, keep the frontend changes here but hand off server-side endpoint shape, permissions, provider capability truth, and docs/API-reference changes to the owning backend sub-skill.
Non-negotiable frontend rules
- Use TanStack Router file routes and centralized route constants from
ROUTES/DEFAULT_REDIRECTS; do not add ad hoc path strings for new navigation. - Use the shared API layer:
API_ENDPOINTS, service modules underlib/api/services,apiClient, and TanStack Query hooks underhooks/api. - Do not read
import.meta.env.VITE_API_URLdirectly in application code. UseAPI_CONFIG.baseUrl, which is resolved byresolveApiUrl()and the runtime config script. - Use the query-key factory in
queryKeysfor all server state and invalidate or update the exact affected keys after mutations. - Preserve SSR-safe auth guards: browser-only session checks must handle
typeof window === 'undefined'. - Keep Tailwind CSS v4 CSS-first: design tokens live in
styles.css; do not reintroduce a JavaScript Tailwind config. - Prefer existing shadcn/ui primitives, common components, feature components,
sonnertoasts, and React Hook Form + Zod validation before adding one-off patterns.
Fast start for future agents
- Classify the request as a route/component task, an API hook/state task, a workflow/tooling task, or a troubleshooting task.
- Read the linked reference closest to that task; avoid reopening source files unless you are refreshing this generated skill or verifying drift.
- For new UI backed by an endpoint, define the endpoint constant, service method, query key, hook, route/component usage, and mutation invalidation together.
- For user-facing navigation, update
ROUTES, the TanStack route file, and sidebar/settings tab wiring consistently. - Verify with the safe metadata checker, then run
pnpm run test,pnpm run lint,pnpm run format:check, andpnpm run buildwhen dependencies are available and the task warrants it.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.