import { useState, useEffect } from 'react' import './App.css' interface APIInfo { platform?: string; version?: string; features?: string[]; tech_stack?: any; } function App() { const [apiInfo, setApiInfo] = useState(null) const [health, setHealth] = useState(null) const [loading, setLoading] = useState(true) useEffect(() => { // Проверяем подключение к API Promise.all([ fetch('http://147.45.146.17:8100/api/v1/info').then(r => r.json()), fetch('http://147.45.146.17:8100/health').then(r => r.json()) ]) .then(([info, healthData]) => { setApiInfo(info) setHealth(healthData) setLoading(false) }) .catch(err => { console.error('API Error:', err) setLoading(false) }) }, []) return (

🚀 ERV Insurance Platform

Python FastAPI + React TypeScript

{loading ? (
⏳ Подключение к API...
) : ( <>

📊 Информация о платформе

{apiInfo ? ( <>

Платформа: {apiInfo.platform}

Версия: {apiInfo.version}

✨ Возможности:

    {apiInfo.features?.map((f, i) => (
  • {f}
  • ))}

🛠️ Технологический стек:

{JSON.stringify(apiInfo.tech_stack, null, 2)}
) : (

❌ Не удалось получить данные

)}

🏥 Здоровье сервисов

{health ? ( <>

Статус: {health.status}

Сервисы:

    {Object.entries(health.services || {}).map(([name, status]) => (
  • {status === 'ok' ? '✅' : '❌'} {name}: {String(status)}
  • ))}
) : (

❌ Health check недоступен

)}

🔗 Полезные ссылки

)}
) } export default App