Andrii · AI at work

All lessons

01

My website hasn't worked for five years. I'm rebuilding it into a portal — showing everything

22:26 · 20 steps

  1. 1 00:00 Five copies of one entry — live
  2. 2 00:48 The duplicates are not in the search, but in the markup
  3. 3 01:08 An empty first screen
  4. 4 01:22 Breakdown of the "before": nine roles, Skills, English 55 %
  5. 5 02:58 Two storefronts: the website and the channel
  6. 6 03:29 Who I am and why this isn't about a pretty website
  7. 7 04:30 Architecture on the board: four tasks
  8. 8 06:54 The stack out loud: why not a website generator
  9. 9 07:55 Three things before the first prompt
  10. 10 08:59 First prompt: the skeleton
  11. 11 10:49 Sections: works in a single scheme
  12. 12 13:09 Where AI did the wrong thing: invented facts
  13. 13 15:09 A silent error: hreflang "ua" instead of "uk"
  14. 14 15:38 Languages and URL structure
  15. 15 16:42 The funnel: form, email, channel

    1 What to do

    A form of three fields, the request goes to the database and to Telegram, email on my own domain, a link to the channel.

    2 Prompt

    EN · Prompt
    A form at /contact. Exactly three fields: task (multi-line),
    deadline (single line), contact (single line). Don't add more fields —
    every extra field costs replies.
    
    Do:
    
    1. POST /contact — an ordinary form submission, no JavaScript.
       After submitting — a separate "thank you" page, not a pop-up
       message: you can set an analytics goal on it.
    
    2. The request is saved to SQLite (file data/site.db, table leads:
       id, task, deadline, contact, time, page language, referrer)
       and at the same time goes as a message to my Telegram via a bot.
       The token and chat_id come from environment variables, they're not in the code.
       Read them via os.environ, .env doesn't go into the repository.
    
    3. If Telegram is unavailable — the request is still saved in the database,
       and the error is written to the log. A request must not be lost because the bot went down.
    
    4. Simple bot protection without a captcha: a hidden honeypot field
       and a check that the form was submitted no sooner than three seconds
       after the page loaded.
    
    5. Email on my own domain, a mailto link next to the form.
       The Telegram link leads to the channel, not to direct messages.
    EN · Prompt from the screen
    Форма на /contact. Ровно три поля: задача (многострочное),
    срок (одна строка), контакт (одна строка). Больше полей не добавлять —
    каждое лишнее поле стоит ответов.
    
    Сделай:
    
    1. POST /contact — обычная отправка формы, без JavaScript.
       После отправки — отдельная страница «спасибо», а не всплывающее
       сообщение: на неё можно поставить цель в аналитике.
    
    2. Заявка сохраняется в SQLite (файл data/site.db, таблица leads:
       id, задача, срок, контакт, время, язык страницы, источник перехода)
       и одновременно уходит сообщением в мой телеграм через бота.
       Токен и chat_id — из переменных окружения, в коде их нет.
       Читай их через os.environ, .env в репозиторий не попадает.
    
    3. Если телеграм недоступен — заявка всё равно сохранена в базе,
       а ошибка записана в лог. Потерять заявку из-за упавшего бота нельзя.
    
    4. Простая защита от роботов без капчи: скрытое поле-приманка
       и проверка, что форма отправлена не раньше чем через три секунды
       после загрузки страницы.
    
    5. Почта — на своём домене, ссылка mailto рядом с формой.
       Ссылка на телеграм ведёт в канал, не в личку.

    Ask in Telegram

  16. 16 17:21 Four events in analytics
  17. 17 17:51 Deploy to my own VPS
  18. 18 18:35 Before and after
  19. 19 19:49 Where it breaks
  20. 20 20:58 Homework and what's next