react-router-project-conventions

Retrieve React Router v7 routing conventions for dashboard and marketing apps.

68|18|Updated Aug 12, 2025
One-click install
npx skills add https://github.com/DayMoonDevelopment/post-for-me --skill react-router-project-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-router-project-conventions
Source: https://github.com/DayMoonDevelopment/post-for-me/tree/main/.agents/skills/react-router-project-conventions
Command: npx skills add https://github.com/DayMoonDevelopment/post-for-me --skill react-router-project-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This project-specific skill provides a consistent, scalable approach to adding or modifying routes in both dashboard/ and marketing/ React Router v7 apps. It helps teams enforce a shared modular routing pattern, reducing divergence and mistakes when creating new pages, layouts, or route resources.

Core Features & Use Cases

  • Shared conventions for route.ts barrels, per-route file responsibilities (route.component.tsx, route.loader.ts, route.action.ts, route.meta.ts, route.handle.ts).
  • Clear folder-name to URL mapping with flatRoutes(), ensuring predictable URL structures across dashboard and marketing apps.
  • Guidance on when to create new route pieces, how to lift components, and how to integrate with MetadataComposer for marketing overlays.
  • Use Case: A new page under dashboard/app/routes or marketing/app/routes follows the same pattern to ensure consistency and faster onboarding.

Quick Start

To apply these conventions, go to the target sibling (dashboard/ or marketing/), identify the route folder you want to add or modify, and implement the standard route.ts barrel and per-file components following the project-conventions.

Frequently Asked Questions about react-router-project-conventions

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

FAQPage Schema
How do I structure React Router v7 routes in a dashboard and marketing web app?

Structure React Router v7 routes using a modular pattern with route.ts barrels and per-route files like component.tsx, loader.ts, action.ts, meta.ts, and handle.ts. This separates server logic from UI components for scalable, testable route management.

What is the best way to organize flatRoutes folder names to URL paths in React Router?

Organize flatRoutes by mapping folder names directly to URL paths under dashboard/app/routes or marketing/app/routes. This ensures predictable URL structures and consistent routing conventions across both web apps.

How do I separate server logic from UI components in React Router v7?

Separate server logic from UI components by using dedicated per-route files for loaders, actions, and meta within the route folder, exporting them via a route.ts barrel to keep data fetching distinct from component rendering.

Can I use MetadataComposer for marketing overlays in React Router v7?

Yes, you can integrate MetadataComposer for marketing overlays by following the project conventions to lift components and assemble metadata within the route.meta.ts file, ensuring consistent SEO and overlay patterns across marketing routes.

When should I create new route pieces instead of modifying existing flatRoutes?

Create new route pieces when adding entirely new pages, layouts, or resources under dashboard or marketing apps. Modify existing flatRoutes only when adjusting URL structures, ensuring you maintain the shared modular routing pattern.

Why does my React Router project need standardized routing conventions across apps?

Standardized routing conventions reduce divergence and mistakes when creating new pages or layouts. Enforcing a shared modular pattern across dashboard and marketing apps ensures consistency, safer practices, and faster team onboarding.