2025-12-05 14:22:39 +01:00
|
|
|
"""
|
|
|
|
|
Configuration Module
|
|
|
|
|
Handles environment variables and application settings
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
from typing import List
|
|
|
|
|
from pydantic_settings import BaseSettings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
|
|
|
"""Application settings loaded from environment variables"""
|
|
|
|
|
|
|
|
|
|
# Database
|
|
|
|
|
DATABASE_URL: str = "postgresql://bmc_hub:bmc_hub@localhost:5432/bmc_hub"
|
|
|
|
|
|
|
|
|
|
# API
|
|
|
|
|
API_HOST: str = "0.0.0.0"
|
|
|
|
|
API_PORT: int = 8000
|
|
|
|
|
|
|
|
|
|
# Security
|
|
|
|
|
SECRET_KEY: str = "dev-secret-key-change-in-production"
|
|
|
|
|
ALLOWED_ORIGINS: List[str] = ["http://localhost:8000", "http://localhost:3000"]
|
|
|
|
|
|
|
|
|
|
# Logging
|
|
|
|
|
LOG_LEVEL: str = "INFO"
|
|
|
|
|
LOG_FILE: str = "logs/app.log"
|
|
|
|
|
|
|
|
|
|
# e-conomic Integration
|
|
|
|
|
ECONOMIC_API_URL: str = "https://restapi.e-conomic.com"
|
|
|
|
|
ECONOMIC_APP_SECRET_TOKEN: str = ""
|
|
|
|
|
ECONOMIC_AGREEMENT_GRANT_TOKEN: str = ""
|
|
|
|
|
ECONOMIC_READ_ONLY: bool = True
|
|
|
|
|
ECONOMIC_DRY_RUN: bool = True
|
|
|
|
|
|
2025-12-16 15:36:11 +01:00
|
|
|
# Ollama LLM
|
|
|
|
|
OLLAMA_ENDPOINT: str = "http://localhost:11434"
|
|
|
|
|
OLLAMA_MODEL: str = "llama3.2:3b"
|
|
|
|
|
|
|
|
|
|
# vTiger Cloud Integration
|
feat(timetracking): Implement time tracking module with frontend views, HTML templates, and database migrations
- Added FastAPI router for time tracking views including dashboard, wizard, and orders.
- Created HTML templates for the time tracking wizard with responsive design and Bootstrap integration.
- Developed SQL migration script for the time tracking module, including tables for customers, cases, time entries, orders, and audit logs.
- Introduced a script to list all registered routes, focusing on time tracking routes.
- Added test script to verify route registration and specifically check for time tracking routes.
2025-12-09 22:46:30 +01:00
|
|
|
VTIGER_URL: str = ""
|
|
|
|
|
VTIGER_USERNAME: str = ""
|
|
|
|
|
VTIGER_API_KEY: str = ""
|
feat: Implement email processing system with scheduler, fetching, classification, and rule matching
- Added EmailProcessorService to orchestrate email workflow: fetching, saving, classifying, and matching rules.
- Introduced EmailScheduler for background processing of emails every 5 minutes.
- Developed EmailService to handle email fetching from IMAP and Microsoft Graph API.
- Created database migration for email system, including tables for email messages, rules, attachments, and analysis.
- Implemented AI classification and extraction for invoices and time confirmations.
- Added logging for better traceability and error handling throughout the email processing pipeline.
2025-12-11 02:31:29 +01:00
|
|
|
|
2025-12-16 15:36:11 +01:00
|
|
|
# Simply-CRM (Old vTiger On-Premise)
|
|
|
|
|
OLD_VTIGER_URL: str = ""
|
|
|
|
|
OLD_VTIGER_USERNAME: str = ""
|
|
|
|
|
OLD_VTIGER_API_KEY: str = ""
|
feat: Implement email processing system with scheduler, fetching, classification, and rule matching
- Added EmailProcessorService to orchestrate email workflow: fetching, saving, classifying, and matching rules.
- Introduced EmailScheduler for background processing of emails every 5 minutes.
- Developed EmailService to handle email fetching from IMAP and Microsoft Graph API.
- Created database migration for email system, including tables for email messages, rules, attachments, and analysis.
- Implemented AI classification and extraction for invoices and time confirmations.
- Added logging for better traceability and error handling throughout the email processing pipeline.
2025-12-11 02:31:29 +01:00
|
|
|
|
2025-12-16 15:36:11 +01:00
|
|
|
# Simply-CRM (Separate System)
|
|
|
|
|
SIMPLYCRM_URL: str = ""
|
|
|
|
|
SIMPLYCRM_USERNAME: str = ""
|
|
|
|
|
SIMPLYCRM_API_KEY: str = ""
|
2025-12-15 12:28:12 +01:00
|
|
|
|
2025-12-05 14:22:39 +01:00
|
|
|
class Config:
|
|
|
|
|
env_file = ".env"
|
|
|
|
|
case_sensitive = True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
settings = Settings()
|