Skip to content
Back to skills

App Routing

ASecurity

Guide for implementing client-side routing in Fusebase Apps apps. Use when: 1. Adding routing (React Router) to an app, 2. Fixing broken routes or 404s after deployment, 3. Configuring the router.

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 13, 2026
ai-agentsreactapibackend

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 13, 2026

npx -y skills add fusebase-dev/fusebase-flow --skill app-routing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of App Routing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for App Routing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fusebase-dev-app-routing/badge)](https://www.skillsdirectory.com/skills/fusebase-dev-app-routing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: app-routing
description: "Guide for implementing client-side routing in Fusebase Apps apps. Use when: 1. Adding routing (React Router) to an app, 2. Fixing broken routes or 404s after deployment, 3. Configuring the router."
---

# App Routing

Fusebase Apps apps are each served from their own **subdomain root**:

```
https://{app-subdomain}.{FUSEBASE_APP_HOST}/
```

Read `FUSEBASE_APP_HOST` from the project `.env` when constructing app URLs. The app always owns the full path space from `/`.

> **IMPORTANT: Always use path-based routing (`BrowserRouter`). Hash-based routing (`HashRouter`) is forbidden** — hash fragments are stripped during redirects (e.g. OAuth, SSO), causing users to lose their navigation state.

## Path-Based Routing

Routes work as normal from root:

```
https://my-app.{FUSEBASE_APP_HOST}/settings
https://my-app.{FUSEBASE_APP_HOST}/users/42
```

### Configure the router

```tsx
import { BrowserRouter, Routes, Route } from 'react-router-dom'

function App() {
  return (
    <BrowserRouter>
      <Routes>
        <Route path="/" element={<Home />} />
        <Route path="/settings" element={<Settings />} />
      </Routes>
    </BrowserRouter>
  )
}
```

## Common Pitfalls

1. **Using `HashRouter`** — Forbidden. Hash fragments are dropped on redirects, breaking navigation after OAuth or SSO flows.
2. **Hardcoded absolute paths** — Use React Router's `<Link>` component, not raw `<a href="/settings">`.
3. **Defining routes under `/api`** — The `/api` prefix is reserved for the backend when an app has one. Never create SPA routes under `/api/*`. See skill **app-backend**.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…