2026-02-07 03:16:37 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
import { ErrorBoundary } from '@/components/ErrorBoundary';
|
|
|
|
|
import { ProtectedRoute } from '@/components/auth/ProtectedRoute';
|
|
|
|
|
import {
|
|
|
|
|
LazyLogin,
|
|
|
|
|
LazyRegister,
|
|
|
|
|
LazyForgotPassword,
|
|
|
|
|
LazyVerifyEmail,
|
|
|
|
|
LazyResetPassword,
|
|
|
|
|
LazyDashboard,
|
|
|
|
|
LazyChat,
|
2026-03-06 17:52:08 +00:00
|
|
|
LazyChatJoin,
|
2026-02-07 03:16:37 +00:00
|
|
|
LazyLibrary,
|
|
|
|
|
LazyProfile,
|
|
|
|
|
LazySettings,
|
|
|
|
|
LazySessions,
|
|
|
|
|
LazyNotFound,
|
|
|
|
|
LazyServerError,
|
|
|
|
|
LazyUserProfile,
|
|
|
|
|
LazyRoles,
|
|
|
|
|
LazyTrackDetail,
|
|
|
|
|
LazyPlaylistRoutes,
|
|
|
|
|
LazyMarketplace,
|
|
|
|
|
LazySearch,
|
|
|
|
|
LazyNotifications,
|
|
|
|
|
LazyAnalytics,
|
|
|
|
|
LazyWebhooks,
|
|
|
|
|
LazyAdminDashboard,
|
feat(v0.701): AdminTransfers page/route, MSW, stories, Deep Health, API ref, docs, scope v0.702
- Step 13: AdminTransfersPage, LazyAdminTransfers, route /admin/transfers
- Step 14: MSW handlers admin transfers
- Step 15: AdminTransfersView stories (Default, Empty, WithFailedTransfers, Error, Loading)
- Step 16-17: DeepHealth handler (disk, config), GET /health/deep
- Step 19: health_deep_test.go (4 tests)
- Step 20: docs/API_REFERENCE.md
- Step 21: Archive V0_604, MIGRATIONS.md migration 116
- Step 22: CHANGELOG, PROJECT_STATE, FEATURE_STATUS v0.701
- Step 23: RETROSPECTIVE_V0701, V0_702 placeholder, SCOPE_CONTROL, .cursorrules
- Step 24: Archive V0_701_RELEASE_SCOPE
- Fix: AdminTransfersView Select component (use options API)
2026-02-23 22:42:02 +00:00
|
|
|
LazyAdminTransfers,
|
2026-02-07 03:16:37 +00:00
|
|
|
LazyDesignSystemDemo,
|
|
|
|
|
LazySocial,
|
2026-03-09 00:52:56 +00:00
|
|
|
LazyFeed,
|
|
|
|
|
LazyDiscover,
|
2026-02-07 03:16:37 +00:00
|
|
|
LazySellerDashboard,
|
|
|
|
|
LazyWishlist,
|
|
|
|
|
LazyPurchases,
|
2026-02-23 23:17:39 +00:00
|
|
|
LazyProductDetail,
|
2026-02-22 13:42:15 +00:00
|
|
|
LazyCheckoutComplete,
|
Phase 2 stabilisation: code mort, Modal→Dialog, feature flags, tests, router split, Rust legacy
Bloc A - Code mort:
- Suppression Studio (components, views, features)
- Suppression gamification + services mock (projectService, storageService, gamificationService)
- Mise à jour Sidebar, Navbar, locales
Bloc B - Frontend:
- Suppression modal.tsx deprecated, Modal.stories (doublon Dialog)
- Feature flags: PLAYLIST_SEARCH, PLAYLIST_RECOMMENDATIONS, ROLE_MANAGEMENT = true
- Suppression 19 tests orphelins, retrait exclusions vitest.config
Bloc C - Backend:
- Extraction routes_auth.go depuis router.go
Bloc D - Rust:
- Suppression security_legacy.rs (code mort, patterns déjà dans security/)
2026-02-14 16:23:32 +00:00
|
|
|
LazyQueue,
|
|
|
|
|
LazyDeveloper,
|
|
|
|
|
LazyGear,
|
|
|
|
|
LazyLive,
|
2026-02-24 09:00:43 +00:00
|
|
|
LazyGoLive,
|
2026-02-22 17:30:49 +00:00
|
|
|
LazyCloud,
|
2026-02-07 03:16:37 +00:00
|
|
|
} from '@/components/ui/LazyComponent';
|
|
|
|
|
import { PublicRoute } from './PublicRoute';
|
|
|
|
|
import { ProtectedLayoutRoute } from './ProtectedLayoutRoute';
|
|
|
|
|
import type { RouteEntry } from './types';
|
|
|
|
|
|
|
|
|
|
function wrapPublic(element: React.ReactNode): React.ReactNode {
|
|
|
|
|
return (
|
|
|
|
|
<PublicRoute>
|
|
|
|
|
<ErrorBoundary>{element}</ErrorBoundary>
|
|
|
|
|
</PublicRoute>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function wrapProtected(element: React.ReactNode): React.ReactNode {
|
|
|
|
|
return (
|
|
|
|
|
<ProtectedRoute>
|
|
|
|
|
<ProtectedLayoutRoute>
|
|
|
|
|
<ErrorBoundary>{element}</ErrorBoundary>
|
|
|
|
|
</ProtectedLayoutRoute>
|
|
|
|
|
</ProtectedRoute>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getPublicRoutes(): RouteEntry[] {
|
|
|
|
|
return [
|
|
|
|
|
{ path: '/login', element: wrapPublic(<LazyLogin />) },
|
|
|
|
|
{ path: '/register', element: wrapPublic(<LazyRegister />) },
|
|
|
|
|
{ path: '/forgot-password', element: wrapPublic(<LazyForgotPassword />) },
|
|
|
|
|
{ path: '/verify-email', element: wrapPublic(<LazyVerifyEmail />) },
|
|
|
|
|
{ path: '/reset-password', element: wrapPublic(<LazyResetPassword />) },
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getPublicStandaloneRoutes(): RouteEntry[] {
|
|
|
|
|
return [
|
|
|
|
|
{ path: '/design-system', element: <ErrorBoundary><LazyDesignSystemDemo /></ErrorBoundary> },
|
|
|
|
|
{ path: '/u/:username', element: <ErrorBoundary><LazyUserProfile /></ErrorBoundary> },
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getProtectedRoutes(): RouteEntry[] {
|
|
|
|
|
return [
|
|
|
|
|
{ path: '/dashboard', element: wrapProtected(<LazyDashboard />) },
|
|
|
|
|
{ path: '/marketplace', element: wrapProtected(<LazyMarketplace />) },
|
2026-02-23 23:17:39 +00:00
|
|
|
{ path: '/marketplace/products/:id', element: wrapProtected(<LazyProductDetail />) },
|
2026-02-07 03:16:37 +00:00
|
|
|
{ path: '/sell', element: wrapProtected(<LazySellerDashboard onCreateProduct={() => {}} />) },
|
|
|
|
|
{ path: '/wishlist', element: wrapProtected(<LazyWishlist />) },
|
|
|
|
|
{ path: '/purchases', element: wrapProtected(<LazyPurchases />) },
|
2026-02-22 13:42:15 +00:00
|
|
|
{ path: '/checkout/complete', element: wrapProtected(<LazyCheckoutComplete />) },
|
2026-03-06 17:52:08 +00:00
|
|
|
{ path: '/chat/join/:token', element: wrapProtected(<LazyChatJoin />) },
|
2026-02-07 03:16:37 +00:00
|
|
|
{ path: '/chat', element: wrapProtected(<LazyChat />) },
|
|
|
|
|
{ path: '/library', element: wrapProtected(<LazyLibrary />) },
|
|
|
|
|
{ path: '/profile', element: wrapProtected(<LazyProfile />) },
|
|
|
|
|
{ path: '/settings', element: wrapProtected(<LazySettings />) },
|
|
|
|
|
{ path: '/settings/sessions', element: wrapProtected(<LazySessions />) },
|
|
|
|
|
{ path: '/admin/roles', element: wrapProtected(<LazyRoles />) },
|
|
|
|
|
{ path: '/tracks/:id', element: wrapProtected(<LazyTrackDetail />) },
|
|
|
|
|
{ path: '/playlists/*', element: wrapProtected(<LazyPlaylistRoutes />) },
|
|
|
|
|
{ path: '/search', element: wrapProtected(<LazySearch />) },
|
|
|
|
|
{ path: '/notifications', element: wrapProtected(<LazyNotifications />) },
|
2026-02-15 15:03:43 +00:00
|
|
|
{ path: '/analytics', element: wrapProtected(<LazyAnalytics />) },
|
2026-02-07 03:16:37 +00:00
|
|
|
{ path: '/webhooks', element: wrapProtected(<LazyWebhooks />) },
|
|
|
|
|
{ path: '/admin', element: wrapProtected(<LazyAdminDashboard />) },
|
feat(v0.701): AdminTransfers page/route, MSW, stories, Deep Health, API ref, docs, scope v0.702
- Step 13: AdminTransfersPage, LazyAdminTransfers, route /admin/transfers
- Step 14: MSW handlers admin transfers
- Step 15: AdminTransfersView stories (Default, Empty, WithFailedTransfers, Error, Loading)
- Step 16-17: DeepHealth handler (disk, config), GET /health/deep
- Step 19: health_deep_test.go (4 tests)
- Step 20: docs/API_REFERENCE.md
- Step 21: Archive V0_604, MIGRATIONS.md migration 116
- Step 22: CHANGELOG, PROJECT_STATE, FEATURE_STATUS v0.701
- Step 23: RETROSPECTIVE_V0701, V0_702 placeholder, SCOPE_CONTROL, .cursorrules
- Step 24: Archive V0_701_RELEASE_SCOPE
- Fix: AdminTransfersView Select component (use options API)
2026-02-23 22:42:02 +00:00
|
|
|
{ path: '/admin/transfers', element: wrapProtected(<LazyAdminTransfers />) },
|
2026-02-15 15:03:43 +00:00
|
|
|
{ path: '/social', element: wrapProtected(<LazySocial />) },
|
2026-03-09 00:52:56 +00:00
|
|
|
{ path: '/feed', element: wrapProtected(<LazyFeed />) },
|
|
|
|
|
{ path: '/discover', element: wrapProtected(<LazyDiscover />) },
|
Phase 2 stabilisation: code mort, Modal→Dialog, feature flags, tests, router split, Rust legacy
Bloc A - Code mort:
- Suppression Studio (components, views, features)
- Suppression gamification + services mock (projectService, storageService, gamificationService)
- Mise à jour Sidebar, Navbar, locales
Bloc B - Frontend:
- Suppression modal.tsx deprecated, Modal.stories (doublon Dialog)
- Feature flags: PLAYLIST_SEARCH, PLAYLIST_RECOMMENDATIONS, ROLE_MANAGEMENT = true
- Suppression 19 tests orphelins, retrait exclusions vitest.config
Bloc C - Backend:
- Extraction routes_auth.go depuis router.go
Bloc D - Rust:
- Suppression security_legacy.rs (code mort, patterns déjà dans security/)
2026-02-14 16:23:32 +00:00
|
|
|
{ path: '/queue', element: wrapProtected(<LazyQueue />) },
|
|
|
|
|
{ path: '/developer', element: wrapProtected(<LazyDeveloper />) },
|
|
|
|
|
// Gear: connected to backend inventory API
|
|
|
|
|
{ path: '/gear', element: wrapProtected(<LazyGear />) },
|
|
|
|
|
// Live: connected to backend live streams API
|
2026-02-24 09:00:43 +00:00
|
|
|
{ path: '/live/go-live', element: wrapProtected(<LazyGoLive />) },
|
Phase 2 stabilisation: code mort, Modal→Dialog, feature flags, tests, router split, Rust legacy
Bloc A - Code mort:
- Suppression Studio (components, views, features)
- Suppression gamification + services mock (projectService, storageService, gamificationService)
- Mise à jour Sidebar, Navbar, locales
Bloc B - Frontend:
- Suppression modal.tsx deprecated, Modal.stories (doublon Dialog)
- Feature flags: PLAYLIST_SEARCH, PLAYLIST_RECOMMENDATIONS, ROLE_MANAGEMENT = true
- Suppression 19 tests orphelins, retrait exclusions vitest.config
Bloc C - Backend:
- Extraction routes_auth.go depuis router.go
Bloc D - Rust:
- Suppression security_legacy.rs (code mort, patterns déjà dans security/)
2026-02-14 16:23:32 +00:00
|
|
|
{ path: '/live', element: wrapProtected(<LazyLive />) },
|
2026-02-22 17:30:49 +00:00
|
|
|
// Cloud: connected to backend cloud storage API
|
|
|
|
|
{ path: '/cloud', element: wrapProtected(<LazyCloud />) },
|
2026-02-07 03:16:37 +00:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getErrorRoutes(): RouteEntry[] {
|
|
|
|
|
return [
|
|
|
|
|
{ path: '/404', element: <ErrorBoundary><LazyNotFound /></ErrorBoundary> },
|
|
|
|
|
{ path: '/500', element: <ErrorBoundary><LazyServerError /></ErrorBoundary> },
|
|
|
|
|
];
|
|
|
|
|
}
|