Files
Warracker/env.example
sassanix 47a42fb388 feat: Add currency controls, owner role, OIDC-only mode & key enhancements
This major update introduces several significant new features, critical bug fixes, and key enhancements across the application, focusing on user customization, administration, and system stability.
New Features
Currency Position Control: Allows users to choose whether the currency symbol appears on the left or right of numbers. This setting is applied universally across the app, including warranty cards and forms, and is saved per-user.
Super-Admin (Owner) Role: Implements an immutable Owner role for the primary administrator, who cannot be deleted or demoted. A secure ownership transfer process has been added to the admin settings.
OIDC-Only Login Mode: Adds a site-wide setting to enforce OIDC-only authentication, which hides the traditional username/password login form to streamline SSO environments.
Product Age Tracking & Sorting: Displays the age of a product (e.g., "2 years, 3 months") on warranty cards and adds a new "Sort by Age" option to organize items by their purchase date.
Global View Photo Access: Permits users to view product photos on warranties shared in global view, while ensuring other sensitive documents like invoices remain private to the owner.
Persistent View Scope: The application now remembers the user's last selected view (Global or Personal) and automatically loads the appropriate data on page refresh for a seamless experience.
Export Debug Tools: Introduces a comprehensive debugging system, including a new debug page and API endpoint, to help administrators troubleshoot and verify warranty exports.
Key Enhancements
About Page Redesign: A complete visual overhaul of the "About" page with a modern, card-based layout, prominent community links, and improved branding.
Flexible Apprise Notifications: Admins can now configure Apprise notifications to be a single global summary or sent as per-user messages. Additionally, the scope can be set to include warranties from all users or only the admin's warranties.
Larger Product Photo Thumbnails: Increased the size of product photo thumbnails in all views (grid, list, and table) for better product visibility.
Smart Currency Default: The "Add Warranty" form now intelligently defaults to the user's preferred currency setting, rather than always using USD.
Bug Fixes
Critical OIDC & Proxy Fixes: Resolved two major OIDC issues: a RecursionError with gevent workers and incorrect http:// callback URLs when behind an HTTPS reverse proxy, enabling reliable OIDC login.
Critical User Preferences Persistence: Fixed a bug where user settings for currency symbol and date format were not being saved correctly to the database.
Apprise & Notification Settings: Corrected an issue preventing user notification channel and Apprise timing settings from saving. The Apprise message format is now standardized, and the admin UI has been cleaned up.
CSV Import Currency: Ensured that warranties imported via CSV correctly use the user's preferred currency instead of defaulting to USD.
Maintenance & Refactoring
Authentication System Refactoring: Migrated all authentication-related routes from app.py into a dedicated Flask Blueprint (auth_routes.py) to improve code organization and maintainability.
Legacy Code Cleanup: Removed over 290 lines of orphaned and commented-out legacy OIDC code from the main application file.
2025-06-15 23:26:23 -03:00

92 lines
2.4 KiB
Plaintext

# Warracker Environment Configuration Example
# Copy this file to .env and modify the values as needed
# Database Configuration
DB_PASSWORD=your_secure_database_password
DB_ADMIN_PASSWORD=your_secure_admin_password
# Application Security
SECRET_KEY=your_very_secure_flask_secret_key_change_this_in_production
# Email Configuration (for password resets and notifications)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your-email@gmail.com
SMTP_PASSWORD=your-app-password
SMTP_USE_TLS=true
# Application URLs
FRONTEND_URL=http://localhost:8005
APP_BASE_URL=http://localhost:8005
# OIDC SSO Configuration (Optional)
OIDC_PROVIDER_NAME=oidc
OIDC_CLIENT_ID=your_oidc_client_id
OIDC_CLIENT_SECRET=your_oidc_client_secret
OIDC_ISSUER_URL=https://your-oidc-provider.com/auth/realms/your-realm
OIDC_SCOPE=openid email profile
# Memory and Performance Settings
WARRACKER_MEMORY_MODE=optimized
MAX_UPLOAD_MB=16
NGINX_MAX_BODY_SIZE_VALUE=16M
# =====================
# APPRISE NOTIFICATIONS
# =====================
# Enable/disable Apprise notifications
APPRISE_ENABLED=false
# Notification URLs (comma-separated)
# Examples:
# Email: mailto://user:password@gmail.com
# Discord: discord://webhook_id/webhook_token
# Slack: slack://TokenA/TokenB/TokenC/Channel
# Telegram: telegram://BotToken/ChatID
# Microsoft Teams: msteams://TokenA/TokenB/TokenC/
# Webhooks: json://webhook.site/your-unique-id
APPRISE_URLS=
# Days before expiration to send notifications (comma-separated)
APPRISE_EXPIRATION_DAYS=7,30
# Time of day to send notifications (HH:MM format, 24-hour)
APPRISE_NOTIFICATION_TIME=09:00
# Prefix for notification titles
APPRISE_TITLE_PREFIX=[Warracker]
# =====================
# APPRISE URL EXAMPLES
# =====================
# Gmail (using app password)
# APPRISE_URLS=mailto://username:app-password@gmail.com
# Discord Webhook
# APPRISE_URLS=discord://webhook_id/webhook_token
# Slack
# APPRISE_URLS=slack://TokenA/TokenB/TokenC/Channel
# Telegram Bot
# APPRISE_URLS=telegram://BotToken/ChatID
# Microsoft Teams
# APPRISE_URLS=msteams://TokenA/TokenB/TokenC/
# Multiple services (comma-separated)
# APPRISE_URLS=mailto://user:pass@gmail.com,discord://webhook_id/webhook_token,telegram://BotToken/ChatID
# Pushover
# APPRISE_URLS=pover://user@token
# Ntfy
# APPRISE_URLS=ntfy://topic
# Generic Webhook
# APPRISE_URLS=json://webhook.site/your-unique-id
# For more services and URL formats, visit:
# https://github.com/caronc/apprise/wiki