Skip to content

Routes

Routes define how users navigate your app. Each route maps a URL path (like /dashboard or /settings) to either a page or an event.

A route is a connection between a URL and content:

URL Path → Target
────────────────────────────────────
/ → Dashboard Page (default)
/reports → Reports Page
/settings → Settings Event
/products/:id → Product Detail Page

When a user visits your app with a specific path, Flow-Like shows the corresponding page or triggers the associated event.

Routes let you:

  • Create multi-page apps - Build apps with distinct sections
  • Deep link - Share direct links to specific content
  • Control navigation - Define which pages are accessible
  • Set a home page - Choose what users see first
  1. Open your app
  2. Click the gear icon (⚙️) to open settings
  3. Go to Pages & Routes
  4. Switch to the Routes tab
┌─────────────────────────────────────────────────────────────────────┐
│ Routes [+ Add Route] │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ / [Default] │ │
│ │ Page: Dashboard 🔘 [🗑] │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ /reports │ │
│ │ Page: Monthly Reports ○ [🗑] │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ /api/webhook │ │
│ │ Event: Webhook Handler ○ [🗑] │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────┘
  1. Click Add Route
  2. Fill in the route details:
FieldDescription
PathThe URL path (e.g., /dashboard)
Target TypePage or Event
TargetWhich page or event to show
DefaultWhether this is the home page
  1. Click Create Route

Paths start with / and can include:

PatternExampleMatches
Static/aboutExactly /about
Nested/settings/profileExactly /settings/profile

A route can point to two types of targets:

Shows a visual page when the route is accessed:

Route: /dashboard
Target Type: Page
Target: Dashboard Page
→ User visits /dashboard
→ Dashboard Page is rendered

Triggers a flow event when the route is accessed:

Route: /api/process
Target Type: Event
Target: Process Handler
→ User visits /api/process
→ Process Handler event runs
→ Response is returned

This is useful for:

  • API endpoints
  • Webhooks
  • Server-side processing

The default route is shown when users visit your app without a specific path.

To set a default route:

  1. Find the route in the list
  2. Toggle the Default switch
  3. Only one route can be default at a time

When multiple routes could match a path, Flow-Like uses priority:

  1. Exact matches first
  2. Then priority number (higher = checked first)
  3. Finally creation order

You can adjust priority by reordering routes in the settings.

Users navigate between routes using:

  • Links - Clickable text or buttons
  • Navigation menus - Built-in navigation components
  • Direct URL - Typing or sharing links

From your flows, you can:

  • Redirect - Send users to a different route
  • Navigate - Change the current route
  • Open in new tab - Launch a route in a new window
✅ Good❌ Avoid
/dashboard/page1
/settings/profile/mySettings
/products/product_list

Use lowercase, hyphens for spaces, and descriptive names.

For complex apps, group related routes:

/ → Home
/dashboard → Dashboard
/dashboard/stats → Detailed Stats
/settings → Settings Overview
/settings/profile → User Profile
/settings/billing → Billing Settings

Consider creating:

  • 404 page - For unknown routes
  • Error page - For failures
  • Loading page - For slow content
/ → Landing Page (default)
/features → Features Page
/pricing → Pricing Page
/contact → Contact Form Page
/ → Dashboard (default)
/analytics → Analytics Page
/reports → Reports Page
/settings → Settings Page
/ → Documentation Page (default)
/api/submit → Submit Handler (event)
/api/status → Status Handler (event)
/webhook → Webhook Handler (event)
  • Pages - Design visual pages for your routes
  • Events - Create event handlers for API routes
  • Sharing - Share your app with others