RoutingLogic - IEEE-Team-3/map GitHub Wiki
# Routing Logic 🔁
Routing is handled using react-router-dom
(or next/navigation
if using Next.js App Router). It supports:
- Lazy-loaded routes
- Protected routes
- Role-based guards
- Nested layout routing
-
Public Routes
-
/login
,/signup
,/reset-password
- Accessible without auth
-
-
Protected Routes
- Wrapped with
AuthGuard
- Redirect to
/login
if not authenticated
- Wrapped with
-
Role-Based Routes
- Certain pages require Admin/Owner roles (e.g.,
/admin
,/settings
)
- Certain pages require Admin/Owner roles (e.g.,
-
/teams/:id/*
Used for accessing dynamic team pages, where:id
is the team UUID.
- Navigation links are based on current role and team permissions.
- Active routes highlight on sidebar.
- Smooth transitions using Framer Motion.
<Route path="/teams/:id" element={<TeamLayout />}>
<Route path="chat" element={<TeamChat />} />
<Route path="tasks" element={<TaskBoard />} />
</Route>