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:
@@ -66,10 +66,10 @@ lgM7euuDBH0/qQ==
|
||||
|
||||
## 🔧 Configurare WSL SSH Tunnel Script
|
||||
|
||||
**Editează `ssh_tunnel.sh` cu username-ul corect:**
|
||||
**Editează `ssh-tunnel-prod.sh` cu username-ul corect:**
|
||||
|
||||
```bash
|
||||
nano /mnt/d/PROIECTE/roa-flask/ssh_tunnel.sh
|
||||
nano /mnt/d/PROIECTE/roa-flask/ssh-tunnel-prod.sh
|
||||
|
||||
# Găsește și actualizează:
|
||||
SSH_USER="your_bitvise_username" # Numele utilizatorului din Bitvise
|
||||
@@ -85,7 +85,7 @@ ssh -p 22122 -i ~/.ssh/roa_oracle_server your_username@83.103.197.79
|
||||
### 2. Test tunnel SSH:
|
||||
```bash
|
||||
cd /mnt/d/PROIECTE/roa-flask/roa2web
|
||||
./ssh_tunnel.sh start
|
||||
./ssh-tunnel-prod.sh start
|
||||
```
|
||||
|
||||
### 3. Test Oracle pool:
|
||||
|
||||
@@ -60,7 +60,7 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCcRM+WWxoBqCSpaTo+vNCrvCLx1UFmKqqSh6smS4c/
|
||||
**În WSL, editează scriptul SSH:**
|
||||
|
||||
```bash
|
||||
nano /mnt/d/PROIECTE/roa-flask/ssh_tunnel.sh
|
||||
nano /mnt/d/PROIECTE/roa-flask/ssh-tunnel-prod.sh
|
||||
```
|
||||
|
||||
**Actualizează linia:**
|
||||
@@ -76,13 +76,13 @@ SSH_USER="roa2web" # Utilizator cu port forwarding activat
|
||||
cd /mnt/d/PROIECTE/roa-flask/roa2web
|
||||
|
||||
# Afișează ajutorul
|
||||
./ssh_tunnel.sh help
|
||||
./ssh-tunnel-prod.sh help
|
||||
|
||||
# Testează și pornește tunelul
|
||||
./ssh_tunnel.sh start
|
||||
./ssh-tunnel-prod.sh start
|
||||
|
||||
# Verifică statusul
|
||||
./ssh_tunnel.sh status
|
||||
./ssh-tunnel-prod.sh status
|
||||
```
|
||||
|
||||
## 🔧 Comenzi utile
|
||||
@@ -90,16 +90,16 @@ cd /mnt/d/PROIECTE/roa-flask/roa2web
|
||||
### Gestionarea tunelului SSH:
|
||||
```bash
|
||||
# Pornește tunelul
|
||||
./ssh_tunnel.sh start
|
||||
./ssh-tunnel-prod.sh start
|
||||
|
||||
# Oprește tunelul
|
||||
./ssh_tunnel.sh stop
|
||||
./ssh-tunnel-prod.sh stop
|
||||
|
||||
# Verifică statusul
|
||||
./ssh_tunnel.sh status
|
||||
./ssh-tunnel-prod.sh status
|
||||
|
||||
# Repornește tunelul
|
||||
./ssh_tunnel.sh restart
|
||||
./ssh-tunnel-prod.sh restart
|
||||
```
|
||||
|
||||
### Testarea pool-ului Oracle:
|
||||
@@ -126,7 +126,7 @@ python shared/database/test_pool.py
|
||||
- Tunelul SSH poate fi OK, dar Oracle nu răspunde
|
||||
|
||||
### ❌ Oracle connection errors
|
||||
- Verifică că tunelul SSH este activ: `./ssh_tunnel.sh status`
|
||||
- Verifică că tunelul SSH este activ: `./ssh-tunnel-prod.sh status`
|
||||
- Verifică că configurația Oracle din `.env` este corectă
|
||||
- Testează manual: `telnet 127.0.0.1 1521`
|
||||
|
||||
|
||||
@@ -136,4 +136,4 @@ docker-compose down && docker-compose up --build
|
||||
✅ **Containerizat**: Izolat în propriul container
|
||||
✅ **Dependencies**: Backend așteaptă tunnel-ul să fie gata
|
||||
|
||||
Nu mai trebuie să rulezi `./ssh_tunnel.sh start` manual - totul e automat în Docker! 🎉
|
||||
Nu mai trebuie să rulezi `./ssh-tunnel-prod.sh start` manual - totul e automat în Docker! 🎉
|
||||
Reference in New Issue
Block a user