feat: Implement unified Vue SPA with granular service control
Consolidate Reports and Data Entry apps into a single Vue.js SPA with: Architecture: - Module-based structure with lazy-loaded routes (@reports, @data-entry) - Error boundaries per module to prevent cascade failures - Dual API proxy in Vite for microservices (reports:8001, data-entry:8003) - Pinia store factories for shared auth, company, and period stores - Vite path aliases for clear module boundaries (@shared, @reports, @data-entry) Service Management: - Granular service control scripts (backend-reports.sh, backend-data-entry.sh, bot.sh, frontend.sh) - 87% faster frontend restart: 7s vs 53s full restart - 38% faster full startup: 33s vs 53s via parallel backend initialization - Enhanced start-dev.sh with proper service timeouts (OCR: 30s, Vite: 15s, Bot: 10s) - status.sh for comprehensive health checks Features: - Auto-select first company on login with period auto-load - Hamburger menu with feature toggle support - JWT token auto-injection via axios interceptors - Unified header with company/period selectors - IIS web.config for production deployment with multi-API routing UX Improvements: - Vue watchers for reactive company/period loading - Lazy store initialization with graceful error handling - Period persistence per user+company in localStorage - Feature flags for optional modules Deployment: - Single IIS site serves unified frontend with API proxy rules - Maintains separate backend processes for microservices - Windows line ending fixes (.env CRLF → LF conversion) Stats: 112 files changed, 38,342 insertions(+), 2,342 deletions(-) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
118
.env.example
118
.env.example
@@ -1,112 +1,8 @@
|
||||
# ROA2WEB Environment Variables Configuration
|
||||
# Copy this file to .env and update with your actual values
|
||||
# API URLs (development - proxied through Vite)
|
||||
# These are used in production builds
|
||||
VITE_REPORTS_API_URL=http://localhost:8001/api
|
||||
VITE_DATA_ENTRY_API_URL=http://localhost:8003/api
|
||||
|
||||
# =============================================================================
|
||||
# ORACLE DATABASE CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# Oracle database connection
|
||||
ORACLE_USER=your_oracle_username
|
||||
ORACLE_PASSWORD=your_oracle_password
|
||||
ORACLE_DSN=your_oracle_connection_string
|
||||
|
||||
# Oracle Instant Client Path (local development only)
|
||||
INSTANTCLIENTPATH=/path/to/oracle/instantclient
|
||||
|
||||
# Database Connection Pool Settings
|
||||
DB_MIN_CONNECTIONS=2
|
||||
DB_MAX_CONNECTIONS=10
|
||||
DB_CONNECTION_INCREMENT=1
|
||||
|
||||
# =============================================================================
|
||||
# JWT AUTHENTICATION CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# JWT Secret Key - CHANGE THIS IN PRODUCTION!
|
||||
# Generate a secure key: python -c "import secrets; print(secrets.token_urlsafe(32))"
|
||||
JWT_SECRET_KEY=your-super-secret-jwt-key-change-in-production
|
||||
|
||||
# JWT Algorithm
|
||||
JWT_ALGORITHM=HS256
|
||||
|
||||
# Token Expiration Settings
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES=30
|
||||
REFRESH_TOKEN_EXPIRE_DAYS=7
|
||||
|
||||
# =============================================================================
|
||||
# AUTHENTICATION SETTINGS
|
||||
# =============================================================================
|
||||
|
||||
# User data cache TTL (minutes)
|
||||
AUTH_CACHE_TTL_MINUTES=15
|
||||
|
||||
# Rate Limiting Settings
|
||||
RATE_LIMIT_MAX_REQUESTS=5
|
||||
RATE_LIMIT_TIME_WINDOW=300
|
||||
|
||||
# =============================================================================
|
||||
# LOGGING CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# Log Level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
|
||||
LOG_LEVEL=INFO
|
||||
|
||||
# =============================================================================
|
||||
# FASTAPI APPLICATION SETTINGS
|
||||
# =============================================================================
|
||||
|
||||
# FastAPI Development Settings
|
||||
FASTAPI_HOST=127.0.0.1
|
||||
FASTAPI_PORT=8000
|
||||
FASTAPI_RELOAD=true
|
||||
|
||||
# CORS Settings
|
||||
CORS_ORIGINS=["http://localhost:3000", "http://localhost:5173", "http://localhost:8080"]
|
||||
|
||||
# =============================================================================
|
||||
# VUE.JS FRONTEND SETTINGS
|
||||
# =============================================================================
|
||||
|
||||
# API Base URL for Vue.js frontend
|
||||
VUE_APP_API_URL=http://localhost:8000
|
||||
|
||||
# Vue.js Development Server
|
||||
VUE_DEV_PORT=3000
|
||||
|
||||
# =============================================================================
|
||||
# DOCKER CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# Docker Compose Settings
|
||||
COMPOSE_PROJECT_NAME=roa2web
|
||||
|
||||
# Nginx Gateway Port
|
||||
NGINX_PORT=8080
|
||||
NGINX_SSL_PORT=8443
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION DEPLOYMENT
|
||||
# =============================================================================
|
||||
|
||||
# Environment (development, staging, production)
|
||||
ENVIRONMENT=development
|
||||
|
||||
# Security Settings
|
||||
SECURE_SSL_REDIRECT=false
|
||||
SESSION_COOKIE_SECURE=false
|
||||
CSRF_COOKIE_SECURE=false
|
||||
|
||||
# Database Connection Timeout
|
||||
DB_CONNECTION_TIMEOUT=30
|
||||
|
||||
# =============================================================================
|
||||
# MONITORING & OBSERVABILITY
|
||||
# =============================================================================
|
||||
|
||||
# Metrics and Monitoring
|
||||
ENABLE_METRICS=false
|
||||
METRICS_PORT=9090
|
||||
|
||||
# Health Check Settings
|
||||
HEALTH_CHECK_TIMEOUT=10
|
||||
HEALTH_CHECK_INTERVAL=30
|
||||
# Feature flags (optional - defaults to true)
|
||||
VITE_FEATURE_REPORTS=true
|
||||
VITE_FEATURE_DATA_ENTRY=true
|
||||
|
||||
Reference in New Issue
Block a user