feat: Migrate to ultrathin monolith architecture
Consolidate 3 separate applications (reports-app, data-entry-app, telegram-bot) into a unified
architecture with single backend and frontend:
Backend Changes:
- Unified FastAPI backend at backend/ with modular structure
- Modules: reports, data_entry, telegram in backend/modules/
- Centralized config.py and main.py with all routers registered
- Single worker mode (--workers 1) for Telegram bot compatibility
- Shared Oracle connection pool and JWT authentication
- Unified requirements.txt and environment configuration
Frontend Changes:
- Single Vue.js SPA with module-based routing
- Unified frontend at src/ with modules in src/modules/{reports,data-entry}/
- Shared components and stores in src/shared/
- Error boundaries for module isolation
- Dual API proxy in Vite for module communication
Infrastructure:
- New unified startup scripts: start-prod.sh, start-test.sh, start-backend.sh
- Environment templates: .env.dev.example, .env.test.example, .env.prod.example
- Updated deployment scripts for Windows IIS
- Simplified SSH tunnel management
Documentation:
- Comprehensive CLAUDE.md with architecture overview
- Module-specific docs in docs/{data-entry,telegram}/
- Architecture decision records in docs/ARCHITECTURE-DECISIONS.md
- Deployment guides consolidated in deployment/windows/docs/
This migration reduces complexity, improves maintainability, and enables easier
deployment while maintaining all existing functionality.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
ROA2WEB - Auto-Deploy Monitor (Server-Side)
|
||||
ROA2WEB - Auto-Deploy Monitor (Server-Side) - Ultrathin Monolith
|
||||
|
||||
.DESCRIPTION
|
||||
Server-side script that monitors C:\Temp\ for new deployment packages
|
||||
and automatically deploys them using ROA2WEB-Console.ps1.
|
||||
|
||||
Designed for ULTRATHIN MONOLITH architecture:
|
||||
- Single unified backend service (ROA2WEB-Backend)
|
||||
- All modules deployed together (Reports, Data Entry, Telegram)
|
||||
- Automatic detection and deployment
|
||||
|
||||
Can run:
|
||||
- Via Scheduled Task (automated, silent)
|
||||
- Interactive mode (manual execution with menu)
|
||||
@@ -288,13 +293,10 @@ function Invoke-Deployment {
|
||||
try {
|
||||
Write-Step "Executing deployment via ROA2WEB-Console.ps1..."
|
||||
|
||||
# Set environment variable to tell ROA2WEB-Console where the package is
|
||||
$env:ROA2WEB_SOURCE = $Package.FullName
|
||||
|
||||
# Execute deployment (deploy all components)
|
||||
Push-Location (Split-Path $consoleScript -Parent)
|
||||
|
||||
& $consoleScript -NonInteractive -Action DeployAll
|
||||
& $consoleScript -NonInteractive -Action DeployAll -PackagePath $Package.FullName
|
||||
|
||||
# Capture exit code IMMEDIATELY (before any other command that might reset it)
|
||||
$exitCode = $LASTEXITCODE
|
||||
@@ -313,9 +315,7 @@ function Invoke-Deployment {
|
||||
Component = "All"
|
||||
Status = "Success"
|
||||
Services = @{
|
||||
backend = "Running"
|
||||
telegramBot = "Running"
|
||||
dataEntry = "Running"
|
||||
backend = "Running (Ultrathin Monolith - All modules)"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user