diff --git a/apps/web/package.json b/apps/web/package.json index 5f4bd104..ad8bb96d 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -19,7 +19,9 @@ "@hookform/resolvers": "^3.3.2", "zod": "^3.22.4", "react-dropzone": "^14.2.3", - "date-fns": "^3.0.6" + "date-fns": "^3.0.6", + "recharts": "^2.8.0", + "react-icons": "^4.12.0" }, "devDependencies": { "@types/react": "^18.2.43", diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx new file mode 100644 index 00000000..b6cac702 --- /dev/null +++ b/apps/web/src/App.tsx @@ -0,0 +1,75 @@ +/** + * Redirect Intelligence v2 - Main App Component + * + * Modern Chakra UI application with comprehensive redirect analysis + */ + +import React from 'react'; +import { ChakraProvider, Box } from '@chakra-ui/react'; +import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; + +// Theme and layout +import { theme } from './theme/theme'; +import { Layout } from './components/Layout/Layout'; + +// Pages +import { HomePage } from './pages/HomePage'; +import { TrackingPage } from './pages/TrackingPage'; +import { AnalysisPage } from './pages/AnalysisPage'; +import { DashboardPage } from './pages/DashboardPage'; +import { LoginPage } from './pages/LoginPage'; +import { RegisterPage } from './pages/RegisterPage'; +import { CheckDetailPage } from './pages/CheckDetailPage'; + +// Context providers +import { AuthProvider } from './contexts/AuthContext'; + +// Create React Query client +const queryClient = new QueryClient({ + defaultOptions: { + queries: { + retry: 2, + refetchOnWindowFocus: false, + staleTime: 5 * 60 * 1000, // 5 minutes + }, + }, +}); + +function App() { + return ( + + + + + + + {/* Public routes */} + } /> + } /> + } /> + } /> + } /> + + {/* Protected routes */} + } /> + } /> + + {/* Legacy routes for backward compatibility */} + API Documentation (Legacy)} /> + + + + + {/* React Query DevTools (development only) */} + {process.env.NODE_ENV === 'development' && ( + + )} + + + + ); +} + +export default App; diff --git a/apps/web/src/components/Layout/Footer.tsx b/apps/web/src/components/Layout/Footer.tsx new file mode 100644 index 00000000..edd660bf --- /dev/null +++ b/apps/web/src/components/Layout/Footer.tsx @@ -0,0 +1,132 @@ +/** + * Footer Component for Redirect Intelligence v2 + * + * Site footer with links and attribution + */ + +import React from 'react'; +import { + Box, + Container, + Flex, + Text, + Link, + VStack, + HStack, + Divider, + useColorModeValue, + Badge, +} from '@chakra-ui/react'; +import { ExternalLinkIcon } from '@chakra-ui/icons'; + +export function Footer() { + const bg = useColorModeValue('white', 'gray.800'); + const borderColor = useColorModeValue('gray.200', 'gray.700'); + const textColor = useColorModeValue('gray.600', 'gray.400'); + + return ( + + + + {/* Main footer content */} + + {/* Brand and description */} + + + + ๐Ÿ”— Redirect Intelligence + + v2 + + + Comprehensive redirect tracking and analysis platform with SSL, SEO, and security insights. + + + + {/* Links */} + + + + Product + + + Home + + + Track URL + + + Analysis + + + + + + Developers + + + API Documentation + + + + API Health + + + + + + + Features + + + SSL Analysis + + + SEO Optimization + + + Security Scanning + + + + + + + + {/* Bottom footer */} + + + ยฉ 2024 Redirect Intelligence v2. Built with React, Chakra UI, and TypeScript. + + + + + ๐Ÿš€ Phase 4 Complete + + + Production Ready + + + + + + + ); +} diff --git a/apps/web/src/components/Layout/Layout.tsx b/apps/web/src/components/Layout/Layout.tsx new file mode 100644 index 00000000..3c17989b --- /dev/null +++ b/apps/web/src/components/Layout/Layout.tsx @@ -0,0 +1,102 @@ +/** + * Main Layout Component for Redirect Intelligence v2 + * + * Provides navigation, header, and responsive layout structure + */ + +import React, { ReactNode } from 'react'; +import { + Box, + Flex, + Spacer, + Container, + useColorModeValue, + useDisclosure, + Drawer, + DrawerOverlay, + DrawerContent, + DrawerCloseButton, + DrawerHeader, + DrawerBody, + VStack, + IconButton, + useBreakpointValue, +} from '@chakra-ui/react'; +import { HamburgerIcon } from '@chakra-ui/icons'; + +import { Navbar } from './Navbar'; +import { MobileNav } from './MobileNav'; +import { Footer } from './Footer'; + +interface LayoutProps { + children: ReactNode; +} + +export function Layout({ children }: LayoutProps) { + const { isOpen, onOpen, onClose } = useDisclosure(); + const bg = useColorModeValue('white', 'gray.800'); + const borderColor = useColorModeValue('gray.200', 'gray.700'); + const isMobile = useBreakpointValue({ base: true, md: false }); + + return ( + + {/* Header */} + + + + {/* Mobile menu button */} + {isMobile && ( + } + variant="ghost" + onClick={onOpen} + mr={4} + aria-label="Open navigation menu" + /> + )} + + {/* Desktop navigation */} + {!isMobile && } + + + + {/* Right side nav items */} + + + + + + {/* Mobile drawer navigation */} + + + + + + Navigation + + + + + + + + {/* Main content */} + + + {children} + + + + {/* Footer */} +