2025-12-08 18:57:54 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
import ReactDOM from 'react-dom/client';
|
|
|
|
|
import { BrowserRouter } from 'react-router-dom';
|
|
|
|
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
|
|
|
import { Toaster } from 'react-hot-toast';
|
|
|
|
|
import { App } from './app/App';
|
|
|
|
|
import './index.css';
|
feat: add fusion design system foundation
- Created design-system.css with tokens from KŌDŌ, BOTANICAL, and Spectre Astral
- Added color palette (cyber neons + nature tones + space gradients)
- Implemented typography system (Orbitron, Rajdhani, Inter, Source Serif, JetBrains Mono)
- Added spacing scale, border radius, shadows, and glows
- Created keyframe animations (logo-spin, graffiti-shake, gentle-pulse, etc.)
- Added utility classes for gradients, glows, clip-paths, and hover effects
- Imported Google Fonts in index.html
- Integrated design system CSS in main.tsx
2026-01-03 22:35:02 +00:00
|
|
|
import './styles/design-system.css';
|
feat: add layout, navigation, and utility components
Phase 3: Layout & Navigation
- Created header.css with animated hexagonal logo
- Gradient navigation links with hover effects
- Responsive mobile menu with toggle animation
- Full mobile/tablet support
Global Effects:
- Created global-effects.css with texture overlay (graffiti wall)
- Scanline effect (gaming CRT)
- Custom scrollbar with gradient
- Focus styles and selection colors
- Page layout, container, section utilities
- Grid system (2, 3, 4 columns + auto-fit)
- Flex utilities and spacing helpers
Additional Components:
- Created Badge component (8 variants: default, cyber, neon, nature, gaming, success, warning, error)
- Created Tag component with closable option
- Created Avatar component (4 variants, 6 sizes, status indicators)
- Created AvatarGroup for stacked avatars
- All components fully typed with TypeScript
Imported all new CSS files in main.tsx
2026-01-03 23:22:06 +00:00
|
|
|
import './styles/global-effects.css';
|
|
|
|
|
import './styles/header.css';
|
2025-12-17 13:07:35 +00:00
|
|
|
// Initialize i18next before React renders
|
|
|
|
|
import './lib/i18n';
|
2025-12-27 00:58:49 +00:00
|
|
|
// FIX #20: Initialize Sentry for error tracking
|
|
|
|
|
import { initSentry } from './lib/sentry';
|
2025-12-25 12:37:10 +00:00
|
|
|
// FE-API-019: Initialize MSW for development if enabled
|
|
|
|
|
import { env } from './config/env';
|
2025-12-03 21:56:50 +00:00
|
|
|
|
2025-12-08 18:57:54 +00:00
|
|
|
// HMR Force Update: 1765126900
|
2025-12-03 21:56:50 +00:00
|
|
|
|
2025-12-27 00:58:49 +00:00
|
|
|
// FIX #20: Initialize Sentry before React renders
|
|
|
|
|
initSentry();
|
|
|
|
|
|
2025-12-08 18:57:54 +00:00
|
|
|
const queryClient = new QueryClient({
|
|
|
|
|
defaultOptions: {
|
|
|
|
|
queries: {
|
|
|
|
|
retry: false,
|
|
|
|
|
refetchOnWindowFocus: false,
|
|
|
|
|
},
|
|
|
|
|
},
|
2025-12-03 21:56:50 +00:00
|
|
|
});
|
2025-12-08 18:57:54 +00:00
|
|
|
|
2025-12-25 12:37:10 +00:00
|
|
|
// FE-API-019: Initialize MSW worker for development
|
|
|
|
|
async function enableMocking() {
|
|
|
|
|
if (!env.USE_MSW) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (import.meta.env.DEV) {
|
|
|
|
|
const { worker } = await import('./mocks/browser');
|
feat: add fusion design system foundation
- Created design-system.css with tokens from KŌDŌ, BOTANICAL, and Spectre Astral
- Added color palette (cyber neons + nature tones + space gradients)
- Implemented typography system (Orbitron, Rajdhani, Inter, Source Serif, JetBrains Mono)
- Added spacing scale, border radius, shadows, and glows
- Created keyframe animations (logo-spin, graffiti-shake, gentle-pulse, etc.)
- Added utility classes for gradients, glows, clip-paths, and hover effects
- Imported Google Fonts in index.html
- Integrated design system CSS in main.tsx
2026-01-03 22:35:02 +00:00
|
|
|
|
2025-12-25 12:37:10 +00:00
|
|
|
// Start the worker
|
|
|
|
|
await worker.start({
|
|
|
|
|
onUnhandledRequest: 'bypass', // Don't warn about unhandled requests
|
|
|
|
|
serviceWorker: {
|
|
|
|
|
url: '/mockServiceWorker.js',
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
2025-12-27 00:50:39 +00:00
|
|
|
// FIX #18: Utiliser logger structuré
|
|
|
|
|
const { logger } = await import('./utils/logger');
|
|
|
|
|
logger.info('[MSW] Mock Service Worker started', { component: 'MSW' });
|
2025-12-25 12:37:10 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Start MSW before rendering the app
|
|
|
|
|
enableMocking().then(() => {
|
|
|
|
|
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
|
|
|
<React.StrictMode>
|
|
|
|
|
<QueryClientProvider client={queryClient}>
|
|
|
|
|
<BrowserRouter
|
|
|
|
|
future={{
|
|
|
|
|
v7_startTransition: true,
|
|
|
|
|
v7_relativeSplatPath: true,
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<App />
|
|
|
|
|
<Toaster position="top-right" />
|
|
|
|
|
</BrowserRouter>
|
|
|
|
|
</QueryClientProvider>
|
|
|
|
|
</React.StrictMode>,
|
|
|
|
|
);
|
|
|
|
|
});
|