Modern ERP Reports Application with microservices architecture Tech Stack: - Backend: FastAPI + python-oracledb (Oracle DB integration) - Frontend: Vue.js 3 + PrimeVue + Vite - Telegram Bot: python-telegram-bot + SQLite - Infrastructure: Shared database pool, JWT authentication, SSH tunnel Features: - FastAPI backend with async Oracle connection pool - Vue.js 3 responsive frontend with PrimeVue components - Telegram bot alternative interface - Microservices architecture with shared components - Complete deployment support (Linux Docker + Windows IIS) - Comprehensive testing (Playwright E2E + pytest) Repository Structure: - reports-app/ - Main application (backend, frontend, telegram-bot) - shared/ - Shared components (database pool, auth, utils) - deployment/ - Deployment scripts (Linux & Windows) - docs/ - Project documentation - security/ - Security scanning and git hooks
39 lines
1.4 KiB
Python
39 lines
1.4 KiB
Python
"""
|
|
Configurări comune pentru toate aplicațiile ROA2WEB
|
|
"""
|
|
import os
|
|
from typing import List, Dict, Any
|
|
from pydantic import BaseSettings
|
|
|
|
class SharedConfig(BaseSettings):
|
|
"""Configurări partajate între microservicii"""
|
|
|
|
# Database
|
|
oracle_user: str = os.getenv('ORACLE_USER', '')
|
|
oracle_password: str = os.getenv('ORACLE_PASSWORD', '')
|
|
oracle_dsn: str = os.getenv('ORACLE_DSN', '')
|
|
|
|
# Database Pool
|
|
db_min_connections: int = int(os.getenv('DB_MIN_CONNECTIONS', 2))
|
|
db_max_connections: int = int(os.getenv('DB_MAX_CONNECTIONS', 10))
|
|
db_connection_increment: int = int(os.getenv('DB_CONNECTION_INCREMENT', 1))
|
|
|
|
# JWT Authentication
|
|
jwt_secret_key: str = os.getenv('JWT_SECRET_KEY', 'your-super-secret-jwt-key-change-in-production')
|
|
jwt_algorithm: str = os.getenv('JWT_ALGORITHM', 'HS256')
|
|
access_token_expire_minutes: int = int(os.getenv('ACCESS_TOKEN_EXPIRE_MINUTES', 30))
|
|
refresh_token_expire_days: int = int(os.getenv('REFRESH_TOKEN_EXPIRE_DAYS', 7))
|
|
|
|
# Authentication Settings
|
|
auth_cache_ttl_minutes: int = int(os.getenv('AUTH_CACHE_TTL_MINUTES', 15))
|
|
rate_limit_max_requests: int = int(os.getenv('RATE_LIMIT_MAX_REQUESTS', 5))
|
|
rate_limit_time_window: int = int(os.getenv('RATE_LIMIT_TIME_WINDOW', 300))
|
|
|
|
# Logging
|
|
log_level: str = os.getenv('LOG_LEVEL', 'INFO')
|
|
|
|
class Config:
|
|
env_file = '.env'
|
|
|
|
# Instance globală
|
|
shared_config = SharedConfig() |