Web valentine with telegram notifications
  • Python 34%
  • JavaScript 27.3%
  • HTML 23%
  • CSS 13.4%
  • Dockerfile 2.3%
Find a file
PoweredDeveloper 10595e9b5b
Some checks failed
Lint and test / lint-and-test (push) Failing after 1m33s
feat: add tests; forgejo workflow; update README
2026-06-10 00:44:50 +03:00
.forgejo feat: add tests; forgejo workflow; update README 2026-06-10 00:44:50 +03:00
app feat: add tests; forgejo workflow; update README 2026-06-10 00:44:50 +03:00
img feat: add tests; forgejo workflow; update README 2026-06-10 00:44:50 +03:00
tests feat: add tests; forgejo workflow; update README 2026-06-10 00:44:50 +03:00
.dockerignore feat: initial commit 2026-02-14 20:36:56 +03:00
.env.example feat: enhance Telegram bot integration and UI improvements 2026-02-14 22:26:51 +03:00
.gitignore feat: add tests; forgejo workflow; update README 2026-06-10 00:44:50 +03:00
docker-compose.yml refactor: remove nginx service and update docker-compose for app container configuration 2026-02-16 16:44:46 +03:00
Dockerfile feat: initial commit 2026-02-14 20:36:56 +03:00
pyproject.toml feat: add tests; forgejo workflow; update README 2026-06-10 00:44:50 +03:00
README.md feat: add tests; forgejo workflow; update README 2026-06-10 00:44:50 +03:00
requirements.txt feat: initial commit 2026-02-14 20:36:56 +03:00

Web page preview

💞 Web Valentine

A single-page “Will you be my valentine?” site.

  • Yes sends you a Telegram notification and triggers confetti;
  • No asks for confirmation twice. Built for a bit of fun, not for production hardening.

Stack: FastAPI, static HTML/CSS/JS, Aiogram (Telegram), Docker.


🚀 Run locally

Requirements: Python 3.12+.

In a terminal, from the project root:

# Create a virtual environment and install dependencies
python3 -m venv .venv
pip install -r requirements.txt

# (Optional) Telegram notifications — copy and add your token/chat ID to .env
cp .env.example .env

# Start the server
python -m app.main

Open http://localhost:8000. The page works without .env; Telegram is only needed for “Yes” notifications.


🐳 Run with Docker

docker compose up -d --build

The container joins an external proxy-net Docker network and expects a global reverse proxy (e.g. nginx-proxy) to handle SSL termination and routing. The app itself exposes no ports. Env vars are loaded from .env next to docker-compose.yml; the file is not baked into the image.


⚙️ Environments

Variable Description
TELEGRAM_BOT_TOKEN Bot token from @BotFather.
TELEGRAM_CHAT_ID Your Telegram user/chat ID (e.g. from @userinfobot). You must have started a chat with the bot at least once.
TELEGRAM_HANDLE Optional. Your Telegram username shown as a link at the bottom (e.g. johndoe or @johndoe).

📁 Project layout

├── app/
│   ├── main.py      # run entrypoint (uvicorn with reload)
│   ├── web.py       # FastAPI app, static mount, API routes
│   ├── telegram_bot.py
│   └── static/      # index.html, style.css, main.js, assets
├── docker-compose.yml
├── Dockerfile
├── requirements.txt
└── .env             # not in repo; copy from .env.example

Copy and styles live in app/static/. Edit those to change the text or look.