buhapp-telegram/README.md
root 21d281a1c6 Telegram WebApp: Mini App with map, chats, profile, reviews
- index.html with bottom tabbar (Map/Chats/Profile/Settings)
- Telegram WebApp SDK auth via /api/v1/auth/telegram
- Consent gate on first login (4 checkboxes)
- Map view with Leaflet (OSM) + nearby users + radius selector
- Chat list + single chat with WebSocket realtime
- Profile editing (drinks, activities, purposes)
- Review screen with stars + anonymous toggle
- User reviews list with stats
- User profile (public) with rating, write/block/report
- Legal pages (TERMS / PRIVACY / DISCLAIMER)
2026-08-20 17:43:16 +00:00

41 lines
1.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# BuhApp Telegram WebApp
Mini App (WebApp) для Telegram, открывается по кнопке в боте @BuhAppBot.
## Запуск
Статика (HTML/JS) раздаётся с `https://app.buhapp.mygoodservice.ru/`.
## Структура
```
buhapp-telegram/
├── public/
│ ├── index.html — главная страница (карта/чаты/профиль/настройки)
│ ├── login.html — онбординг (если запустили без Telegram)
│ ├── css/
│ │ └── app.css — стили
│ └── js/
│ ├── api.js — HTTP клиент + TG SDK
│ ├── tg.js — обёртки Telegram WebApp SDK
│ ├── app.js — главный контроллер
│ └── views/
│ ├── map.js
│ ├── chats.js
│ ├── chat.js
│ ├── profile.js
│ ├── review.js
│ └── settings.js
└── README.md
```
## Telegram Bot
- Создай бота через [@BotFather](https://t.me/BotFather) → `/newbot`
- Установи WebApp URL: `/setdomain``app.buhapp.mygoodservice.ru`
- Скопируй токен → `TELEGRAM_BOT_TOKEN` в `.env` бэкенда
## Деплой
Все файлы из `public/` монтируются в nginx (location /).
Бэкенд читает `initData` от Telegram и авторизует через `POST /api/v1/auth/telegram`.