Routing

LaunchFast uses file-based routing powered by remix-flat-routes, which extends Remix's built-in convention with hybrid routing — giving you both folder-based colocation and clean URL structures.

The +/ convention

The key insight of remix-flat-routes is that +/ in a folder name converts to . in the route path. This lets you group related route files in folders while keeping flat URL paths. For example, settings+/profile.password.tsx maps to the URL /settings/profile/password.

Configuration

The routing configuration lives in vite.config.ts at the project root, using the hybrid routes mode. Certain file patterns are automatically ignored:

  • *.server.* — server-only modules, not exposed as routes
  • *.client.* — client-only modules
  • *.test.* — test files colocated with routes

Inspecting routes

To see all generated routes at any time, run:

npx remix routes

This outputs a JSX-like tree showing every route and its source file.

Route groups

LaunchFast organizes routes into prefixed folders by concern:

  • _auth+/ — authentication flows (login, signup, password reset)
  • _marketing+/ — public pages (home, about, privacy, terms)
  • _seo+/ — SEO resource routes (robots.txt, sitemap.xml)
  • admin+/ — admin-only pages
  • resources+/ — resource routes (no UI, backend only)
  • settings+/ — user settings pages

Pathless layouts

The underscore prefix (_) creates pathless layout routes. For example, _auth+/ shares a layout without adding /auth to the URL. Nested routes inherit parent layouts automatically.

Adding a new route

To add a new route, create a .tsx file in the appropriate folder under app/routes/. Export a default component for pages, or just a loader/action for resource routes. Run npx remix routes to verify it was picked up correctly.

Related