✅ Инфраструктура: PostgreSQL, Redis, RabbitMQ, S3 ✅ Backend: SMS сервис + API endpoints ✅ Frontend: React форма (3 шага) + SMS верификация
165 lines
5.9 KiB
HTML
165 lines
5.9 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>ERV Insurance Platform - MVP</title>
|
||
<style>
|
||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||
body {
|
||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
|
||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||
min-height: 100vh;
|
||
padding: 20px;
|
||
}
|
||
.container { max-width: 1200px; margin: 0 auto; }
|
||
.header {
|
||
text-align: center;
|
||
color: white;
|
||
margin-bottom: 40px;
|
||
}
|
||
.header h1 {
|
||
font-size: 3em;
|
||
margin-bottom: 10px;
|
||
}
|
||
.card {
|
||
background: white;
|
||
border-radius: 12px;
|
||
padding: 30px;
|
||
margin-bottom: 20px;
|
||
box-shadow: 0 10px 40px rgba(0,0,0,0.1);
|
||
}
|
||
.status {
|
||
display: inline-block;
|
||
padding: 8px 16px;
|
||
border-radius: 20px;
|
||
font-weight: bold;
|
||
margin: 5px;
|
||
}
|
||
.status.success { background: #10b981; color: white; }
|
||
.status.warning { background: #f59e0b; color: white; }
|
||
.status.error { background: #ef4444; color: white; }
|
||
.loading { text-align: center; padding: 40px; color: #666; }
|
||
.links { display: flex; gap: 10px; flex-wrap: wrap; }
|
||
.btn {
|
||
display: inline-block;
|
||
padding: 12px 24px;
|
||
background: #667eea;
|
||
color: white;
|
||
text-decoration: none;
|
||
border-radius: 6px;
|
||
transition: all 0.3s;
|
||
}
|
||
.btn:hover { background: #5568d3; transform: translateY(-2px); }
|
||
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
|
||
pre {
|
||
background: #f3f4f6;
|
||
padding: 15px;
|
||
border-radius: 6px;
|
||
overflow-x: auto;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<div class="header">
|
||
<h1>🚀 ERV Insurance Platform</h1>
|
||
<p style="font-size: 1.2em;">Python FastAPI + React TypeScript - MVP</p>
|
||
</div>
|
||
|
||
<div class="card">
|
||
<h2>📊 Статус системы</h2>
|
||
<div id="status-container" class="loading">⏳ Проверяю сервисы...</div>
|
||
</div>
|
||
|
||
<div class="grid">
|
||
<div class="card">
|
||
<h3>🔗 API Endpoints</h3>
|
||
<div class="links">
|
||
<a href="http://147.45.146.17:8100/docs" target="_blank" class="btn">📚 Swagger UI</a>
|
||
<a href="http://147.45.146.17:8100/health" target="_blank" class="btn">🏥 Health Check</a>
|
||
<a href="http://147.45.146.17:8100/api/v1/info" target="_blank" class="btn">ℹ️ Info</a>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="card">
|
||
<h3>🛠️ Технологии</h3>
|
||
<div id="tech-stack"></div>
|
||
</div>
|
||
|
||
<div class="card">
|
||
<h3>✨ Возможности</h3>
|
||
<div id="features"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="card">
|
||
<h3>📋 Детальная информация API</h3>
|
||
<pre id="api-details">Загрузка...</pre>
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
async function checkAPI() {
|
||
const statusContainer = document.getElementById('status-container');
|
||
const techStack = document.getElementById('tech-stack');
|
||
const features = document.getElementById('features');
|
||
const apiDetails = document.getElementById('api-details');
|
||
|
||
try {
|
||
// Проверяем API
|
||
const [healthRes, infoRes, testRes] = await Promise.all([
|
||
fetch('http://147.45.146.17:8100/health'),
|
||
fetch('http://147.45.146.17:8100/api/v1/info'),
|
||
fetch('http://147.45.146.17:8100/api/v1/test')
|
||
]);
|
||
|
||
const health = await healthRes.json();
|
||
const info = await infoRes.json();
|
||
const test = await testRes.json();
|
||
|
||
// Статус
|
||
statusContainer.innerHTML = `
|
||
<div style="margin: 20px 0;">
|
||
<span class="status success">✅ Backend API работает!</span>
|
||
<span class="status success">✅ Health: ${health.status}</span>
|
||
<span class="status success">✅ Version: ${info.version}</span>
|
||
</div>
|
||
`;
|
||
|
||
// Технологии
|
||
const stack = info.tech_stack || {};
|
||
techStack.innerHTML = Object.entries(stack)
|
||
.map(([key, value]) => `<div><strong>${key}:</strong> ${value}</div>`)
|
||
.join('');
|
||
|
||
// Возможности
|
||
features.innerHTML = (info.features || [])
|
||
.map(f => `<div>✓ ${f}</div>`)
|
||
.join('');
|
||
|
||
// Детали
|
||
apiDetails.textContent = JSON.stringify({ health, info, test }, null, 2);
|
||
|
||
} catch (error) {
|
||
statusContainer.innerHTML = `
|
||
<span class="status error">❌ Ошибка подключения к API</span>
|
||
<p style="margin-top: 10px; color: #666;">
|
||
Проверьте что FastAPI запущен на порту 8100
|
||
</p>
|
||
`;
|
||
apiDetails.textContent = `Ошибка: ${error.message}`;
|
||
}
|
||
}
|
||
|
||
// Запускаем проверку
|
||
checkAPI();
|
||
|
||
// Обновляем каждые 10 секунд
|
||
setInterval(checkAPI, 10000);
|
||
</script>
|
||
</body>
|
||
</html>
|
||
|
||
|