Flows category icon
Debugging
Beginner

Fix Routing/Navigation

Repair broken links, 404s, back-button traps, and guard gaps so navigation works like users expect.

5 steps17 verify checks30-60 minutesWorks with: emergent · chatgpt · claude · cursor
Start Guided Walkthrough

The Route

0/5 verified

Context Pack

Paste this first. It briefs the AI on requirements, constraints, and the Definition of Done before your first build prompt.

Context Pack
PROJECT CONTEXT:
My app's navigation is unreliable: dead links, wrong redirects, broken back button, refresh 404s, or guard leaks.

GOAL:
Every link goes where it says, deep links and refresh work, back behaves, and guards protect the right routes.

REQUIREMENTS:
- A route and link inventory with verified destinations
- Working deep links and refresh on every route
- Correct back/forward behavior
- A designed 404 page
- Route guards on protected pages without leaks

CONSTRAINTS:
- Full-page reloads inside a SPA count as bugs
- Do not fix a dead link by deleting the link

DEFINITION OF DONE:
- Every nav element navigates correctly
- Any route survives direct load and refresh
- Back button never traps or breaks state
- Unknown URLs show the 404 page
- Protected routes redirect correctly

COMMON FAILURES TO AVOID:
- Links with href='#' or empty onClick
- Refresh on a nested route returning server 404
- Redirect loops between login and dashboard
- Guards that flash protected content before redirecting

Paste this into your AI builder first. It teaches the AI what you want before you give it the build prompt.

Related routes

More Debugging flows that share ground with this one.

Flows category icon
Debugging

Add Database Persistence

Your app forgets everything on refresh: move state into a real database with working CRUD.

01Inventory unpersisted state
02Design models and endpoints
03Wire writes to the backend

+2 more steps to Done

Best foryour first pass at this - no prior setup assumed

5 steps45-75 minutesBeginner
Flows category icon
Debugging

Add Loading/Error States

Eliminate silent failures and frozen screens: add loading, empty, and error states across the whole app.

01Inventory async surfaces
02Add loading states
03Add error states with retry

+2 more steps to Done

Best foryour first pass at this - no prior setup assumed

5 steps30-60 minutesBeginner
Flows category icon
Debugging

Fix App That Looks Good But Does Not Work

The systematic recovery flow for beautiful-but-broken AI builds: audit honestly, then fix by functional priority.

01Run a brutal functional audit
02Prioritize the fix order
03Fix the core value action

+3 more steps to Done

Best forbuilders who have shipped a basic app before

6 steps60-120 minutesIntermediate

Made with Emergent