spa-routes
Installation
SKILL.md
SPA Routes and Features Guide
SPA structure:
src/spa/– Entry points (entry.web.tsx,entry.mobile.tsx,entry.desktop.tsx) and router config (router/). Router lives here to avoid confusion withsrc/routes/.src/routes/– Page segments only (roots).src/features/– Business logic and UI by domain.
This project uses a roots vs features split: src/routes/ only holds page segments; business logic and UI live in src/features/ by domain.
Agent constraint — desktop router parity: Edits to the desktop route tree must update both src/spa/router/desktopRouter.config.tsx and src/spa/router/desktopRouter.config.desktop.tsx in the same change (same paths, nesting, index routes, and segment registration). Updating only one causes drift; the missing tree can fail to register routes and surface as a blank screen or broken navigation on the affected build.
When to Use This Skill
- Adding a new SPA route or route segment
- Defining or refactoring layout/page files under
src/routes/ - Moving route-specific components or logic into
src/features/ - Deciding where to put a new component (route folder vs feature folder)