Skip to content

feat(landing): lead form → owner Telegram + developer credit - #793

Merged
ShaerWare merged 1 commit into
mainfrom
feat/landing-lead-telegram
Jun 18, 2026
Merged

feat(landing): lead form → owner Telegram + developer credit#793
ShaerWare merged 1 commit into
mainfrom
feat/landing-lead-telegram

Conversation

@ShaerWare

Copy link
Copy Markdown
Owner

Summary

  • New public endpoint POST /widget/lead (modules/channels/widget/router_public.py) — sends landing lead notifications to the owner's Telegram via Bot API. Token + chat_id come from env (LEAD_TELEGRAM_BOT_TOKEN / LEAD_TELEGRAM_CHAT_ID), so no secrets live in the static site. Mounted under the already nginx-proxied /widget/ prefix → no new nginx location needed.
  • site/main.js — lead form now POSTs to /widget/lead (name, contact, role, locale, page), shows a "sending" state and success screen. Fallback: if the backend is unreachable it opens t.me/ai_sekretar24bot with a pre-filled message so no lead is lost.
  • Anti-spam — hidden company honeypot field added to all 3 locale forms + .lead-form__hp CSS.
  • Footer developer credit — links to shaerware.github.io in the Contacts column and footer bottom line (ru/en → locale path, kk → /ru/), all 3 locales.
  • Cache-bust main.js?v=5, styles.css?v=5.
  • Docs: LEAD_TELEGRAM_* documented in .env.example, .env.docker.example, CLAUDE.md.

NEWS

📩 Заявки с сайта теперь сразу прилетают в Telegram

Каждая заявка с лендинга — на подключение секретаря или с вопросом — мгновенно приходит уведомлением в Telegram с именем, контактом и тем, какой ассистент нужен клиенту. Больше ни одна заявка не потеряется: даже если что-то пойдёт не так, форма откроет чат с ботом с уже заполненным текстом. А в контактах появился значок разработчика.

Test plan

  • LEAD_TELEGRAM_BOT_TOKEN + LEAD_TELEGRAM_CHAT_ID set in prod .env
  • Submit lead form on ru/en/kk → notification arrives in owner's Telegram with correct locale + page
  • Honeypot field hidden for humans; bot-filled company → silently dropped
  • Backend-down fallback opens t.me/ai_sekretar24bot with pre-filled text
  • Footer shows developer credit linking to shaerware.github.io in all 3 locales

🤖 Generated with Claude Code

- New public endpoint POST /widget/lead (modules/channels/widget/router_public.py):
  sends landing lead notifications to the owner's Telegram via Bot API.
  Token + chat_id read from env (LEAD_TELEGRAM_BOT_TOKEN / LEAD_TELEGRAM_CHAT_ID),
  so no secrets live in the static site. Mounted under the already
  nginx-proxied /widget/ prefix — no new nginx location needed.
- site/main.js: lead form POSTs to /widget/lead with name/contact/role/locale/page;
  shows sending state, success screen; falls back to opening t.me/ai_sekretar24bot
  with a pre-filled message if the backend is unreachable.
- Anti-spam honeypot field "company" added to all 3 locale forms (+ .lead-form__hp CSS).
- Footer: developer credit linking to shaerware.github.io in Contacts column and
  the footer bottom line (ru/en → locale path, kk → /ru/), all 3 locales.
- Cache-bust main.js?v=5, styles.css?v=5.
- Docs: LEAD_TELEGRAM_* in .env.example, .env.docker.example, CLAUDE.md.

## NEWS

📩 **Заявки с сайта теперь сразу прилетают в Telegram**

Каждая заявка с лендинга — на подключение секретаря или с вопросом — мгновенно приходит уведомлением в Telegram с именем, контактом и тем, какой ассистент нужен клиенту. Больше ни одна заявка не потеряется: даже если что-то пойдёт не так, форма откроет чат с ботом с уже заполненным текстом. А в контактах появился значок разработчика.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ShaerWare
ShaerWare merged commit 414836d into main Jun 18, 2026
3 checks passed
@ShaerWare
ShaerWare deleted the feat/landing-lead-telegram branch June 18, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant