Skip to content

[Frontend] Add 404 Catch-All Route with Styled Not-Found Page #144

Description

@devJaja

🎯 Objective

Add a catch-all route and a styled 404 page so that users navigating to undefined URLs receive meaningful feedback instead of a blank content area inside the AppShell.


📁 Files to Create

Action File Path Description
Create frontend/src/pages/NotFoundPage.tsx 404 page component with message and navigation link

📁 Files to Modify

Action File Path Description
Modify frontend/src/App.tsx Add <Route path="*" element={<NotFoundPage />} /> as the last route

🎨 Design Spec

The NotFoundPage should:

  • Display "404 — Page Not Found" as the primary heading
  • Include a brief description: "The page you are looking for does not exist or has been moved."
  • Provide a "Go to Dashboard" button (links to /dashboard) and a "Go Home" button (links to /)
  • Use the project's dark theme CSS variables for consistent styling
  • Be wrapped in the AppShell layout for authenticated routes

📁 Reference Files

File Path Purpose
frontend/src/components/common/ErrorBoundary.tsx Reference for error state UI patterns
frontend/src/styles/global.css CSS variable definitions for theming
frontend/src/pages/LandingPage.tsx Reference for landing-style CTAs

✅ Acceptance Criteria

  • Create frontend/src/pages/NotFoundPage.tsx
  • Add wildcard <Route path="*"> in frontend/src/App.tsx
  • Page renders inside AppShell for unknown paths under /*
  • Page renders outside AppShell for root-level unknown paths
  • "Go to Dashboard" button navigates to /dashboard
  • "Go Home" button navigates to /
  • Visual design matches the existing dark theme
  • Verify navigation works on both desktop and mobile

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions