import { useState } from 'react' import { Link } from 'react-router-dom' import { Button } from '@/components/ui/button' import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { Alert, AlertDescription } from '@/components/ui/alert' import { Badge } from '@/components/ui/badge' import { Separator } from '@/components/ui/separator' import { ApiResponse } from 'shared/types' import { authStorage, makeAuthenticatedRequest } from '@/lib/auth' import { Heart, Activity, FolderOpen, Users, CheckCircle, AlertCircle, Zap, Shield, Code } from 'lucide-react' export function HomePage() { const [message, setMessage] = useState('') const [messageType, setMessageType] = useState<'success' | 'error'>('success') const [loading, setLoading] = useState(false) const currentUser = authStorage.getUser() const fetchHello = async () => { setLoading(true) try { const response = await makeAuthenticatedRequest('/api/hello?name=Bloop') const data = await response.json() setMessage(data.message) setMessageType('success') } catch (error) { setMessage('Error connecting to backend') setMessageType('error') } finally { setLoading(false) } } const checkHealth = async () => { setLoading(true) try { const response = await makeAuthenticatedRequest('/api/health') const data: ApiResponse = await response.json() setMessage(data.message || 'Health check completed') setMessageType('success') } catch (error) { setMessage('Backend health check failed') setMessageType('error') } finally { setLoading(false) } } return (
{/* Hero Section */}
Mission Control Dashboard

Welcome to Bloop

A modern full-stack monorepo built with Rust backend and React frontend. Get started by exploring our features below.

Secure Type-Safe Real-time
{/* Feature Cards */}
API Test
Test
Test the connection between frontend and backend
Health Check
Monitor
Monitor the health status of your backend services
Projects
CRUD
Manage your projects with full CRUD operations
{currentUser?.is_admin && (
Users Admin Only Manage user accounts and permissions
)}
{/* Status Alert */} {message && (
{messageType === 'error' ? ( ) : ( )} {message}
)} {/* Footer */}

Built with ❤️ using modern technologies

Rust React TypeScript Tailwind CSS
) }