Build the smallest runnable foundation for the Telegram bot without leaking Phase 3 lesson logic into the codebase.
This phase includes:
- Python project initialization
- environment configuration loading and validation
- module structure aligned with repository architecture
- PostgreSQL connection and schema bootstrap
- YAML lesson content loading and validation
- idempotent content seeding into the database
- Telegram polling runtime
/startand/helphandlers- Docker-based local run path
- minimal tests for config and content loading
This phase does not include:
- daily lesson generation
- review scheduling
/today,/review,/settings- analytics dashboards
- delivery jobs execution
- complete onboarding flow
- Phase 1 product contract
- Technical decisions
- sample content under
content/
- application starts with valid env vars
- database schema is created automatically
- sample lesson content is loaded and seeded
- Telegram bot can start polling
/startreplies and creates or updates a user record/helpreplies with available current commands- Docker Compose can start app plus PostgreSQL
- config and content loader tests pass
- ingress: Telegram updates
- content source: YAML files from
CONTENT_DIR - persistence: PostgreSQL via SQLAlchemy async engine
- process runtime: single polling worker
- content schema drift between YAML and database
- startup failures due to missing env vars
- bot startup blocked by invalid content files
- startup must fail fast on invalid config
- startup must fail fast on invalid lesson content
- content seeding must be idempotent
- transport logic must not contain lesson selection logic yet