Routes
Defined in fleapo-marketplace/src/App.tsx. React Router v6, nested admin section under AdminLayout.
| Path | Component | Access | Purpose |
|---|---|---|---|
/ | Index | public | Hero, featured carousel, browse strip |
/agents | Agents | public | Full catalog with tag + search filters |
/agent/:slug | AgentDetail | public | Hero, capabilities, steps, pricing, reviews, changelog, analytics |
/pricing/:slug | Pricing | public (auth-required for checkout) | Tier selection + Stripe Checkout redirect |
/sign-in | SignIn | public | Email + password |
/sign-up | SignUp | public | Email + password registration |
/consent | Consent | public | OAuth consent (only shown for non-first-party clients) |
/unauthorized | Unauthorized | public | 403 fallback |
/dashboard | Dashboard | bearer (any role) | Active subscriptions + usage |
/admin | AdminLayout → AdminOverview | platform_admin | KPIs |
/admin/leads | AdminLeads | platform_admin | Lead pipeline (mock data) |
/admin/customers | AdminCustomers | platform_admin | Paying customers + MRR (mock data) |
/admin/vendors | AdminVendors | platform_admin | Agent publishers (mock data) |
/admin/agents | AdminAgents | platform_admin | Agent catalog management |
/admin/agents/new | AdminAgentSubmit | platform_admin | Create agent form |
/admin/agents/:id/edit | AdminAgentEdit | platform_admin | Edit agent form |
/admin/interactions | AdminInteractions | platform_admin | Marketing event feed |
* | NotFound | public | 404 |
Provider tree
QueryClientProvider
└── Sonner (toast)
└── TooltipProvider
└── BrowserRouter
└── ScrollBgController
└── SearchProvider
└── <Routes>
ScrollBgController is mounted outside the route tree so the page background animates continuously across route changes.
Sign-in mid-flow bounce
SignIn inspects query params on mount. If response_type + client_id are present, the page is part of an OAuth /authorize flow that hit the marketplace login — after successful auth, it bounces back to /api/auth/oauth2/authorize?... instead of /dashboard.
Role-based redirect after sign-in
platform_admin→/admin- other →
/dashboard
Layout transitions
AgentCard ↔ AgentDetail uses Framer Motion layoutId for shared-element transitions on the icon, name, and hero band. The IDs follow agent-{part}-{prefix}{slug} — different layoutIdPrefix values prevent collisions when the same agent appears in multiple grids on one page.