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:
2025-12-29 23:48:14 +02:00
parent 2a101f1ef5
commit c5e051ad80
378 changed files with 7566 additions and 73730 deletions

View File

@@ -14,8 +14,8 @@ function htmlTimestampPlugin() {
export default defineConfig({
plugins: [vue(), htmlTimestampPlugin()],
// Base path - single site deployment (no subdirectory)
base: process.env.NODE_ENV === 'production' ? '/' : '/',
// Base path for IIS sub-application at /roa2web
base: process.env.NODE_ENV === 'production' ? '/roa2web/' : '/',
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
@@ -32,27 +32,12 @@ export default defineConfig({
watch: null,
// Disable HMR completely
hmr: false,
// Dual proxy configuration for unified app
// Single proxy configuration for unified backend
proxy: {
'/api/reports': {
target: 'http://localhost:8001',
'/api': {
target: 'http://localhost:8000',
changeOrigin: true,
secure: false,
rewrite: (path) => path.replace(/^\/api\/reports/, '/api'),
configure: (proxy, options) => {
proxy.on('proxyReq', (proxyReq, req, res) => {
// Preserve authorization header during redirects
if (req.headers.authorization) {
proxyReq.setHeader('Authorization', req.headers.authorization);
}
});
}
},
'/api/data-entry': {
target: 'http://localhost:8003',
changeOrigin: true,
secure: false,
rewrite: (path) => path.replace(/^\/api\/data-entry/, '/api'),
configure: (proxy, options) => {
proxy.on('proxyReq', (proxyReq, req, res) => {
// Preserve authorization header during redirects
@@ -67,7 +52,7 @@ export default defineConfig({
}
},
'/uploads': {
target: 'http://localhost:8003',
target: 'http://localhost:8000',
changeOrigin: true,
secure: false
}