Files
BarevClub/.env.example
T
zabudko-ruandClaude Opus 5.5 23ffb2bf1d Backoffice stage 2: chats (support + concierge, files)
- 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>
2026-10-21 01:50:37 +04:00

57 lines
2.4 KiB
Bash
Raw 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.
# ---- Общие ----
NODE_ENV=development
TZ=Asia/Yerevan
# ---- База и очереди (значения совпадают с infra/docker-compose.dev.yml) ----
DATABASE_URL=postgresql://barev:barev@localhost:5434/barev
REDIS_URL=redis://localhost:6380
# ---- Telegram ----
# Токены из BotFather. Без них API работает, а боты не стартуют.
CLIENT_BOT_TOKEN=
PRO_BOT_TOKEN=
# username ботов без @ — используется в deep-link на лендинге
CLIENT_BOT_USERNAME=barev_club_bot
PRO_BOT_USERNAME=barev_pro_bot
# Время жизни initData в секундах
TG_INIT_DATA_MAX_AGE=86400
# ---- Адреса приложений ----
LANDING_DOMAIN=localhost:3000
LANDING_URL=http://localhost:3000
API_URL=http://localhost:4000
CLIENT_MINIAPP_URL=http://localhost:5174
PRO_MINIAPP_URL=http://localhost:5175
ADMIN_URL=http://localhost:5173
# новая админка; если задан https-адрес, кнопка «Открыть» в уведомлениях о сообщениях ведёт в её чаты
BACKOFFICE_URL=http://localhost:5176
API_PORT=4000
# ---- Админка ----
# Секрет для подписи сессий админки (любая длинная случайная строка)
ADMIN_SESSION_SECRET=change-me-to-a-long-random-string
# Первый владелец создаётся seed-скриптом
SEED_OWNER_EMAIL=owner@barev.local
SEED_OWNER_PASSWORD=barev-owner-123
# ---- Объектное хранилище (S3-совместимое) ----
S3_ENDPOINT=http://localhost:9000
S3_REGION=us-east-1
S3_BUCKET=barev-private
S3_ACCESS_KEY=barev
S3_SECRET_KEY=barev-secret
# ---- Мониторинг ----
SENTRY_DSN=
# ---- Только для локальной разработки ----
# Если токенов ботов ещё нет, initData для браузера подписывается этими значениями.
# В production не используется.
DEV_CLIENT_BOT_TOKEN=000000:dev-client-token
DEV_PRO_BOT_TOKEN=000000:dev-pro-token
# Страница /ru/apartments: квартиры AREV из CRM (crm.yandp.tech) и заявки на просмотр.
# Ключ — companies.settings.barevClub.key организации AREV в CRM. Пусто — страница показывает «список недоступен».
CRM_URL=https://crm.yandp.tech
CRM_BAREV_KEY=