Enhance Telegram bot with database integration and API features

- Added SQLite database support with Alembic for migrations.
- Implemented FastAPI for HTTP API to manage duties.
- Updated configuration to include database URL and HTTP port.
- Created entrypoint script for Docker to handle migrations and permissions.
- Expanded command handlers to register users and display duties.
- Developed a web application for calendar display of duties.
- Included necessary Pydantic schemas and SQLAlchemy models for data handling.
- Updated requirements.txt to include new dependencies for FastAPI and SQLAlchemy.
This commit is contained in:
2026-02-17 12:51:01 +03:00
parent d90d3d1177
commit d60a4fdf3f
23 changed files with 837 additions and 16 deletions

26
webapp/index.html Normal file
View File

@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Календарь дежурств</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<header class="header">
<button type="button" class="nav" id="prevMonth" aria-label="Предыдущий месяц"></button>
<h1 class="title" id="monthTitle"></h1>
<button type="button" class="nav" id="nextMonth" aria-label="Следующий месяц"></button>
</header>
<div class="weekdays">
<span>Пн</span><span>Вт</span><span>Ср</span><span>Чт</span><span>Пт</span><span>Сб</span><span>Вс</span>
</div>
<div class="calendar" id="calendar"></div>
<div class="duty-list" id="dutyList"></div>
<div class="loading" id="loading">Загрузка…</div>
<div class="error" id="error" hidden></div>
</div>
<script src="app.js"></script>
</body>
</html>