spa-routes

Separate SPA routing from features across src/routes and src/features.

Updated Mar 2, 2026
One-click install
npx skills add https://github.com/Staysr/lobe-windos-build --skill spa-routes
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: spa-routes
Source: https://github.com/Staysr/lobe-windos-build/tree/main/.agents/skills/spa-routes
Command: npx skills add https://github.com/Staysr/lobe-windos-build --skill spa-routes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps you structure SPA routes by separating routing responsibilities from business logic to improve maintainability and scalability.

Core Features & Use Cases

  • Thin routing layer: Route files stay lightweight and delegate to features.
  • Clear boundaries: Distinct separation between src/routes/ and src/features/.
  • Guided workflow: Step-by-step approach for adding, refactoring, or moving route logic.

Quick Start

Create a new route by placing a thin layout in src/routes and delegating logic to a corresponding feature in src/features.

Frequently Asked Questions about spa-routes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure SPA routes to keep them thin and maintainable?▼

Structure SPA routes by separating routing responsibilities from business logic, keeping route files thin and delegating to corresponding features in src/features to ensure maintainability and clear domain boundaries.

What is the best way to separate routing from features in a frontend SPA?▼

The best way to separate routing from features is to maintain distinct boundaries between src/routes and src/features, using re-exports from features to ensure a consistent, testable structure across desktop, mobile, and web builds.

How do I add a new route segment without bloating my routing layer?▼

When adding a new route segment, place a thin layout in src/routes and delegate logic to a corresponding feature in src/features to ensure the route layer stays lightweight and domain boundaries remain clear.

Does this SPA routing structure work across desktop, mobile, and web builds?▼

Yes, this SPA routing structure applies when adding or modifying route segments across desktop, mobile, and web builds, enforcing a thin route layer and clear domain boundaries for consistent organization.

When should I move logic out of src/routes into src/features?▼

Move logic out of src/routes into src/features when refactoring route segments to improve maintainability, ensuring the route layer stays thin and delegates business logic to clear domain boundaries.