routing
React Router v7 routing conventions for this SPA. USE WHEN: editing `app/routes.ts`, adding/removing a route, or changing navigation.
- License 许可
- CC-BY-4.0
- 最近更新
- 2026-11-06
- Stars
- ★ 2
- Forks
- 1
01 前言 Front Matter
- name
- routing
- description
- React Router v7 routing conventions for this SPA. USE WHEN: editing `app/routes.ts`, adding/removing a route, or changing navigation.
02 资源文件 1
- 脚本scripts/zram_optimizer.py25.8 KB
03 SKILL.md 正文
Routing
Paths below are relative to apps/prototype/.
- This app disables runtime SSR (
ssr: false) and renders routes client-side. React Router still generates the SPA HTML shell during the build. - Routes are defined in
app/routes.tsusing React Router v7 config (the "framework" style).
General Structure
- Main navigation structure:
- Home:
index("routes/home.tsx")at/ - Discover section:
/discover/models,/discover/tools - Build section:
/build/agents,/build/tools - Operate section:
/operate/dashboard,/operate/agents - Docs:
/docs
- Home:
- Layout wrapper:
components/shell/NavLayout.tsxprovides top/left nav - Export
topNavRoutesandgetLeftNavRoutes(pathname)fromroutes.tsfor navigation components - Type-safe routes via auto-generated types in
.react-router/types/
Adding a Route
- Create the file in
app/routes/ - Add it to
app/routes.tsconfig array - Use type-safe route imports:
import type { Route } from "./+types/routeName" - Run
react-router typegenvianpm --workspace apps/prototype run type-checkfrom the repository root (ornpm run type-checkfrom the app directory) to regenerate types and check TypeScript
04 同仓库更多 Skills
coreai-ds-fluentui-react
MANDATORY for @coreai-ds/react-components work. Use the CoreAI documentation MCP to discover components, props, stories, templates, and implementation patterns. If the MCP is unavailable, stop and ask the user to enable or troubleshoot it with you.
state-management
CoreAI Sandbox's simplified TanStack Query + mock-JSON data layer. USE WHEN: editing data-fetching hooks (`app/hooks/use*.ts`), adding mock data in `app/data/`, or wiring a component to query state.
start-app
Start the CoreAI Sandbox dev server and open it using available browser tools. USE WHEN: the user asks you to "start the app", "run the dev server", "open the app", or "launch CoreAI Sandbox".
react-components
CoreAI Sandbox component usage: import boundaries, CoreAI MCP documentation, and local adapter inspection. USE WHEN: editing any `*.tsx` file, picking a component, or writing component imports.
new-variant
Create a new design variant or alternative for a page using the built-in feature/variant system. USE WHEN: a designer wants to try a different layout, create an "option B" or "version 2", compare designs side by side, add an A/B alternative, or explore an alternate version. Do NOT build a custom toggle solution.
lint
Run the full lint workflow: format, typecheck, CSS lint, JS lint. USE WHEN: the user asks to "lint", "fix lint", "run the linters", "check types", or after making code changes that need verification.