feat(landing): lead form → owner Telegram + developer credit - #793
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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 openst.me/ai_sekretar24botwith a pre-filled message so no lead is lost.companyhoneypot field added to all 3 locale forms +.lead-form__hpCSS.shaerware.github.ioin the Contacts column and footer bottom line (ru/en → locale path, kk →/ru/), all 3 locales.main.js?v=5,styles.css?v=5.LEAD_TELEGRAM_*documented in.env.example,.env.docker.example,CLAUDE.md.NEWS
📩 Заявки с сайта теперь сразу прилетают в Telegram
Каждая заявка с лендинга — на подключение секретаря или с вопросом — мгновенно приходит уведомлением в Telegram с именем, контактом и тем, какой ассистент нужен клиенту. Больше ни одна заявка не потеряется: даже если что-то пойдёт не так, форма откроет чат с ботом с уже заполненным текстом. А в контактах появился значок разработчика.
Test plan
LEAD_TELEGRAM_BOT_TOKEN+LEAD_TELEGRAM_CHAT_IDset in prod.envcompany→ silently droppedt.me/ai_sekretar24botwith pre-filled text🤖 Generated with Claude Code