Files
Task_Reporter/.env.example
egg 599802b818 feat: Add Chat UX improvements with notifications and @mention support
- Add ActionBar component with expandable toolbar for mobile
- Add @mention functionality with autocomplete dropdown
- Add browser notification system (push, sound, vibration)
- Add NotificationSettings modal for user preferences
- Add mention badges on room list cards
- Add ReportPreview with Markdown rendering and copy/download
- Add message copy functionality with hover actions
- Add backend mentions field to messages with Alembic migration
- Add lots field to rooms, remove templates
- Optimize WebSocket database session handling
- Various UX polish (animations, accessibility)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 08:20:37 +08:00

155 lines
6.3 KiB
Plaintext

# =============================================================================
# Task Reporter - Backend Environment Configuration
# =============================================================================
# Copy this file to .env and fill in the required values.
# Required fields are marked with (Required), optional fields have defaults.
# =============================================================================
# -----------------------------------------------------------------------------
# Database Configuration
# -----------------------------------------------------------------------------
# (Required) MySQL database connection string
# Format: mysql+pymysql://user:password@host:port/database?charset=utf8mb4
# Note: All tables use 'tr_' prefix to avoid conflicts in shared database
DATABASE_URL=mysql+pymysql://user:password@localhost:3306/task_reporter?charset=utf8mb4
# -----------------------------------------------------------------------------
# Database Connection Pool Settings
# -----------------------------------------------------------------------------
# These settings control the SQLAlchemy connection pool for production scalability.
# Adjust based on expected concurrent users and MySQL max_connections setting.
# Number of persistent connections in the pool (default: 20)
DB_POOL_SIZE=20
# Maximum additional connections beyond pool_size when pool is exhausted (default: 30)
# Total max connections = DB_POOL_SIZE + DB_MAX_OVERFLOW = 50
DB_MAX_OVERFLOW=30
# Seconds to wait for an available connection before timeout error (default: 10)
DB_POOL_TIMEOUT=10
# Recycle connections after this many seconds to prevent stale connections (default: 1800 = 30 min)
DB_POOL_RECYCLE=1800
# -----------------------------------------------------------------------------
# Security Configuration
# -----------------------------------------------------------------------------
# (Required) Fernet encryption key for session token encryption
# Generate with: python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
FERNET_KEY=
# -----------------------------------------------------------------------------
# Server Configuration
# -----------------------------------------------------------------------------
# Server bind address (default: 0.0.0.0)
HOST=0.0.0.0
# Server port (default: 8000)
PORT=8000
# Debug mode - set to False in production (default: False)
DEBUG=True
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL (default: INFO)
LOG_LEVEL=INFO
# -----------------------------------------------------------------------------
# CORS Configuration
# -----------------------------------------------------------------------------
# (Required for production) Comma-separated list of allowed CORS origins
# Example: http://localhost:3000,https://your-domain.com
# WARNING: Never use "*" in production - always specify allowed origins
CORS_ORIGINS=http://localhost:3000
# -----------------------------------------------------------------------------
# System Administration
# -----------------------------------------------------------------------------
# System administrator email with special permissions (bypass room membership checks)
# Leave empty if no system admin is needed
SYSTEM_ADMIN_EMAIL=
# -----------------------------------------------------------------------------
# AD Authentication API
# -----------------------------------------------------------------------------
# (Required) Active Directory authentication API URL
AD_API_URL=https://pj-auth-api.vercel.app/api/auth/login
# AD API request timeout in seconds (default: 10)
AD_API_TIMEOUT_SECONDS=10
# -----------------------------------------------------------------------------
# Session Settings
# -----------------------------------------------------------------------------
# Session inactivity timeout in days (default: 3)
SESSION_INACTIVITY_DAYS=3
# Token refresh threshold in minutes (default: 5)
TOKEN_REFRESH_THRESHOLD_MINUTES=5
# Maximum token refresh attempts (default: 3)
MAX_REFRESH_ATTEMPTS=3
# -----------------------------------------------------------------------------
# Realtime Messaging Settings
# -----------------------------------------------------------------------------
# Message edit time limit in minutes - users can edit messages within this window (default: 15)
MESSAGE_EDIT_TIME_LIMIT_MINUTES=15
# Typing indicator timeout in seconds (default: 3)
TYPING_TIMEOUT_SECONDS=3
# -----------------------------------------------------------------------------
# File Upload Limits
# -----------------------------------------------------------------------------
# Maximum image file size in MB (default: 10)
IMAGE_MAX_SIZE_MB=10
# Maximum document file size in MB (default: 20)
DOCUMENT_MAX_SIZE_MB=20
# Maximum log file size in MB (default: 5)
LOG_MAX_SIZE_MB=5
# -----------------------------------------------------------------------------
# MinIO Object Storage Configuration
# -----------------------------------------------------------------------------
# MinIO server endpoint (default: localhost:9000)
MINIO_ENDPOINT=localhost:9000
# MinIO access key (default: minioadmin)
# IMPORTANT: Change this in production!
MINIO_ACCESS_KEY=minioadmin
# MinIO secret key (default: minioadmin)
# IMPORTANT: Change this in production!
MINIO_SECRET_KEY=minioadmin
# MinIO bucket name (default: task-reporter-files)
MINIO_BUCKET=task-reporter-files
# Use HTTPS for MinIO connection (default: false)
# Set to true in production with proper TLS configuration
MINIO_SECURE=false
# -----------------------------------------------------------------------------
# DIFY AI Service Configuration
# -----------------------------------------------------------------------------
# DIFY API base URL for AI-powered report generation
DIFY_BASE_URL=https://dify.theaken.com/v1
# (Required for AI reports) DIFY API key - get from DIFY console
DIFY_API_KEY=
# DIFY API request timeout in seconds - AI generation can be slow (default: 120)
DIFY_TIMEOUT_SECONDS=120
# -----------------------------------------------------------------------------
# Report Generation Settings
# -----------------------------------------------------------------------------
# Maximum messages to include in report before summarization (default: 200)
REPORT_MAX_MESSAGES=200
# MinIO path prefix for generated reports (default: reports)
REPORT_STORAGE_PATH=reports