- ChatThread per client/provider and channel; messages get files, internal notes, source (bot/mini app) and delivery errors; reply templates. Migration moves old concierge messages into threads. - Routing: subscribers write to the concierge, others to support; /support and /concierge in the client bot; staff can take, transfer, close and move threads. - Telegram: photos/documents from clients and providers, replies with the channel header, files sent from storage, notifications only to the assignee or the channel's staff, "Reply" into a specific thread. - New admin: /chats with list, conversation, notes, files, templates, client panel; "Message" button on the client card; dashboard counts threads awaiting reply. - Client mini app: in-app chat screen sharing the same conversation. - Old admin keeps working on the same data (notes hidden there). - Tests for routing, notes, assign/close/move, lists, recipients; separate test DB via TEST_DB_NAME; dev:chats-demo script. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
48 lines
2.0 KiB
Plaintext
48 lines
2.0 KiB
Plaintext
# Продакшен-окружение (на сервере: /opt/barev/.env). Секреты генерирует infra/prod/deploy.sh при первом деплое.
|
|
NODE_ENV=production
|
|
TZ=Asia/Yerevan
|
|
DB_PASSWORD=__generated__
|
|
DATABASE_URL=postgresql://barev:__generated__@barev-db:5432/barev
|
|
REDIS_URL=redis://barev-redis:6379
|
|
|
|
CLIENT_BOT_TOKEN=
|
|
PRO_BOT_TOKEN=
|
|
CLIENT_BOT_USERNAME=barevclub_bot
|
|
PRO_BOT_USERNAME=barevworker_bot
|
|
TG_INIT_DATA_MAX_AGE=86400
|
|
|
|
LANDING_DOMAIN=barevclub.com
|
|
LANDING_URL=https://barevclub.com
|
|
CLIENT_MINIAPP_URL=https://app.barevclub.com
|
|
PRO_MINIAPP_URL=https://pro.barevclub.com
|
|
ADMIN_URL=https://admin.barevclub.com
|
|
# новая админка — когда выложим: тогда «Открыть» в уведомлениях о сообщениях ведёт в её чаты
|
|
# BACKOFFICE_URL=https://team.barevclub.com
|
|
# серверный адрес API для лендинга (внутри docker-сети)
|
|
API_URL=http://barev-app:4000
|
|
API_PORT=4000
|
|
|
|
ADMIN_SESSION_SECRET=__generated__
|
|
SEED_OWNER_EMAIL=owner@barev.local
|
|
SEED_OWNER_PASSWORD=__generated__
|
|
|
|
S3_ENDPOINT=http://barev-s3:9000
|
|
S3_REGION=us-east-1
|
|
S3_BUCKET=barev-private
|
|
S3_ACCESS_KEY=barev
|
|
S3_SECRET_KEY=__generated__
|
|
|
|
SENTRY_DSN=
|
|
|
|
# Лендинг: контакты в подвале и в JSON-LD (пусто — не показываются)
|
|
CONTACT_EMAIL=
|
|
# Подтверждение сайта в Search Console / Яндекс Вебмастере / Bing (только код из meta-тега; можно вместо этого подтвердить через DNS)
|
|
GOOGLE_SITE_VERIFICATION=
|
|
YANDEX_VERIFICATION=
|
|
BING_SITE_VERIFICATION=
|
|
|
|
# Страница /ru/apartments: квартиры AREV из CRM (crm.yandp.tech) и заявки на просмотр.
|
|
# Ключ — companies.settings.barevClub.key организации AREV в CRM. Пусто — страница показывает «список недоступен».
|
|
CRM_URL=https://crm.yandp.tech
|
|
CRM_BAREV_KEY=
|