Skip to content

chilleco/web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Template Web App

Modern full-stack web application with Python FastAPI backend, Next.js frontend, Telegram bot, and Telegram / VK / MAX Mini App support. Built with Docker containers and featuring multilingual support, and production-ready flow.

Background tasks (Taskiq)

  • Worker: uv run taskiq worker tasks.broker:broker tasks.registry
  • Scheduler: uv run taskiq scheduler tasks.scheduler:scheduler tasks.registry
  • Fixed-delay periodic jobs (cycle after finish): trigger once, e.g. await run_periodic.kiq("cache_categories")

Run

Before starting, you can learn how to configure the server →

local prod
1. Configure .env from base.env and add:
# Type
# LOCAL / TEST / DEV / PRE / PROD
MODE=LOCAL

# Links PROTOCOL=http EXTERNAL_HOST=localhost EXTERNAL_PORT=80 DATA_PATH=./data

1. Configure .env from base.env and add:
# Type
# LOCAL / TEST / DEV / PRE / PROD
MODE=PROD

# Links PROTOCOL=https EXTERNAL_HOST=web.chill.services WEB_PORT=8201 API_PORT=8202 TG_PORT=8203 REDIS_PORT=8204 DATA_PATH=~/data/web

2. make dev 2. make run
3. Open http://localhost/ 3. Open https://web.chill.services/ (your link)

Telegram bot (webhooks)

  • Service lives in tg/ and runs a FastAPI webhook handler behind /tg/.
  • Required env: TG_TOKEN (bot token) and TG (public webhook URL like https://host/tg/).
  • Optional env: TG_SECRET (webhook secret header).
  • /start payload is treated as utm and forwarded to auth; the bot replies with a WebApp button to open the Mini App.
  • Bot message localization lives in tg/messages/*.json (en/ru/zh/es/ar).