shipped
Smena
Telegram Mini App and bot for a single barber: the day board, clients, free windows, and read-only YCLIENTS sync without storing a password.
Problem
A solo barber needs the working day inside Telegram: visits, breaks, clients, and free windows — without a separate CRM and without writing back into YCLIENTS. Admin bookings sync read-only; the master keeps personal visits and notes in Smena.
Decisions
- Mini App + bot. Day / week / month, client cards, status buttons, shareable free-window text. The bot answers
/today,/free,/add,/findand deep-links into the app. - YCLIENTS read-only. Google Calendar iCal or the official API — no YCLIENTS password stored. The iCal URL lives in SQLite
meta, not in exports. - HMAC
initData. Telegram signature, expiry, allow-listed ids. Eight-hour session: in-memory Bearer + HttpOnly cookie, neverlocalStorage. - SSRF hardening on the calendar feed. Address pinning, IP allow-list, shared timeout, socket re-check after connect.
revisionconcurrency. Forms carry a data version; a stale save from another device is rejected.- Snapshots and restore. Daily DB copies; restore keeps a recovery copy first.
- Zero npm dependencies. Node 24 stdlib + SQLite.



Architecture
Telegram WebApp / bot → server.mjs → SQLite; optional Google Calendar iCal or YCLIENTS API. Shared day math in shared.mjs for UI and chat.
Access: owner plus one second user (admin or assistant) via a one-time invite.
Попробовать
Демо на тестовых данных
Загружаем демо…
Code
Telegram initData HMAC check, calendar fetch SSRF guards, and freeGaps from shared.mjs — same fragments as the Russian case.
What was verified
Verified: npm test (44), local /demo, iCal against a real Google Calendar, widths 320–1060 px.
Not verified here: full Telegram Web iframe on 0.5, a live YCLIENTS branch / API tokens, VPS deploy in this environment.