How maxkunev/dailydo works
Purpose and system shape
DailyDO is a Telegram-native personal task manager. It combines a Telegram bot, a Telegram Mini App UI, a Django REST backend, and an independent reminder scheduler. Docker Compose runs these as separate processes with PostgreSQL.
Core deployment definitions: docker-compose.yaml, Dockerfile, frontend/Dockerfile, docker/backend/entrypoint.sh.
Backend API and application boundary
Django is the authoritative application backend and exposes routing through dailydo/urls.py. It hosts two domain apps: user/authentication management and user-owned task CRUD. Django/DRF settings and ASGI/WSGI process entry points reside in dailydo/settings.py, dailydo/asgi.py, and dailydo/wsgi.py.
The API is the integration boundary for the Mini App and likely any bot-driven task operations; persistence remains behind Django models and authenticated query scoping.
Identity and authorization
The users app owns account representation, serialization, authentication, and endpoint routing: users/models.py, users/authentication.py, users/views.py, users/urls.py.
Telegram Mini App authentication establishes backend identity. Downstream task access must be tied to the authenticated user, enforcing isolation so a caller cannot read or mutate another user’s tasks.
Task domain and REST operations
The tasks app owns task persistence and API behavior: tasks/models.py, tasks/serialaziers.py, tasks/views.py, tasks/urls.py.
Primary request flow is: Mini App authenticates → client calls authenticated task endpoints → DRF validates task data and applies user-scoped CRUD → PostgreSQL stores task state. Task completion and task date/status data also feed the scheduler’s unfinished-task selection.
Telegram bot interaction layer
The aiogram bot is a separate long-running Telegram update consumer, entered through bot/main.py. Message/control handling is concentrated in bot/handlers/handlers.py; Telegram/Gemini-facing service behavior is split across bot/services.py and bot/gemini.py.
The bot supplies conversational interaction and reminder delivery context. It uses keyboards, FSM states, and locale middleware as supporting interaction layers: bot/keyboards.py, bot/states.py, bot/middlewares/i18n.py.
Mini App frontend
The React/Vite client is the primary task-management interface launched inside Telegram. Its runtime entry and root application are frontend/src/main.jsx and frontend/src/App.jsx; Telegram/client localization setup is in frontend/src/i18n.js.
Its control flow is browser/Telegram WebView → Mini App auth context → Django API → task rendering and mutations. The frontend is independently containerized and communicates with the backend through configured API URLs.
Reminder scheduler and delivery
The scheduler is an independent async service with its process entry at scheduler/main.py. Cron-style morning/evening orchestration is defined in scheduler/jobs.py, while Telegram message dispatch is isolated in scheduler/sender.py.
It queries persisted tasks, selects unfinished tasks for the current date, groups them by Telegram chat, localizes reminder content, and sends messages through Telegram. Timezone behavior is configured externally and applied by the scheduler runtime.
Infrastructure and external dependencies
Material runtimes are Python/Django/DRF, aiogram, APScheduler, React/Vite, PostgreSQL, and Docker Compose. Telegram is both the user platform and outbound notification service; Gemini integration is represented by bot/gemini.py. Environment-provided bot tokens, database settings, API URL, and scheduler timezone form key operational boundaries (.env.example, dailydo/settings.py, docker-compose.yaml).
Main entry points: docker-compose.yaml Docker Compose · urls.py Django REST API · App.jsx React Mini App · jobs.py Reminder Jobs
Components 17
Telegram Surface
- Telegram Platform · Hosts the bot and Mini App WebView.
- React Mini App · Primary task-management interface inside Telegram.
frontend/src/App.jsx - Client Bootstrap & i18n
frontend/src/main.jsx
Application Services
- Telegram Bot · Long-running Telegram update consumer.
bot/main.py - Bot Handlers · Processes messages and controls conversational flow.
bot/handlers/handlers.py - Gemini Integration
bot/gemini.py - Reminder Scheduler · Runs scheduled unfinished-task reminder workflows.
scheduler/main.py - Reminder Jobs · Selects current-date unfinished tasks and groups them by chat.
scheduler/jobs.py - Telegram Sender
scheduler/sender.py
Django Backend
- Django REST API · Authoritative authenticated application API.
dailydo/urls.py - Identity & Authentication · Establishes Telegram Mini App identity and account access.
users/authentication.py - User Accounts
users/models.py - Task CRUD · Validates and applies user-scoped task operations.
tasks/views.py - Task Models · Stores task date, status, completion, and ownership.
tasks/models.py
Data & External Services
- PostgreSQL · Persistent authoritative task and account state.
- Gemini
- Docker Compose · Runs backend, frontend, bot, scheduler, and PostgreSQL as separate processes.
docker-compose.yaml
Connections 22
- Telegram Platform → React Mini App: launches
- Client Bootstrap & i18n → React Mini App: mounts
- React Mini App → Django REST API: authenticated task API calls
- Telegram Platform → Telegram Bot: delivers updates
- Telegram Bot → Bot Handlers: routes updates
- Bot Handlers → Gemini Integration: uses AI behavior
- Gemini Integration → Gemini: AI requests
- Django REST API → Identity & Authentication: authenticates requests
- Identity & Authentication → User Accounts: resolves account
- Django REST API → Task CRUD: routes task endpoints
- Task CRUD → Task Models: CRUD and owner scoping
- User Accounts → PostgreSQL: persists accounts
- Task Models → PostgreSQL: persists tasks
- Reminder Scheduler → Reminder Jobs: runs cron jobs
- Reminder Jobs → PostgreSQL: queries unfinished tasks
- Reminder Jobs → Telegram Sender: builds reminder deliveries
- Telegram Sender → Telegram Platform: sends localized reminders
- Docker Compose → Django REST API: runs
- Docker Compose → React Mini App: runs
- Docker Compose → Telegram Bot: runs
- Docker Compose → Reminder Scheduler: runs
- Docker Compose → PostgreSQL: runs