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>
5.7 KiB
5.7 KiB
🔐 SSH Setup Instructions pentru ROA2WEB
Instrucțiuni pentru configurarea tunelului SSH din WSL către serverul Oracle.
📋 Pași de Setup
1. 🔑 Generarea cheii SSH
Dacă nu ai cheia SSH generată, creează-o astfel:
# Generează cheia SSH (RSA 4096-bit)
ssh-keygen -t rsa -b 4096 -f ~/.ssh/roa_oracle_server -N "" -C "roa2web-wsl-$(whoami)@$(hostname)"
# Verifică că s-a creat
ls -la ~/.ssh/roa_oracle_server*
Output așteptat:
Generating public/private rsa key pair.
Your identification has been saved in /home/user/.ssh/roa_oracle_server
Your public key has been saved in /home/user/.ssh/roa_oracle_server.pub
Cheia SSH existentă este în: ~/.ssh/roa_oracle_server
Pentru a afișa cheia PUBLICĂ:
cat ~/.ssh/roa_oracle_server.pub
Cheia PUBLICĂ pentru server:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCcRM+WWxoBqCSpaTo+vNCrvCLx1UFmKqqSh6smS4c/lh1Hkku+oiq65iUHwRMu5X9jDXSGUR1Fmig+OgIhoTnT4Hd3v4Fe2zienOFiJ/AZOTE+pgxpwmIrkScGTSv7ZSp4xFcXsFwho8W/Li0P0kyB+kGs2tFYaQM192E5Gx9qjlPGSM55fdksElRXKIrRHE4ARjt5+kMt4WFgUXpVNqhHQFEcz/oW6sC0OkufTbzQ+MHefBIlMNUlNHRxbHc3C6CTuMmzMM847y6rmQlDyScX0tizDhUnQ1UgA3ZyICJp9CVF4weAM6ihZhNTFi7drXiCEihUVLNU+EuEpWdWeVNebqBqlkJT0KXR3IgEQ3zKYKuAmICFO056WI3eKcJWuWEFNDrSYsxo+HydAbqBSqEprJFCUSU90175ngnpY4WoH7CFUbCnGjxEnRXUjUktaCdqYhH0ZjGHSGujK+KGPVxvBi1h7BjE33SEH6PAVZBYmdpGDri69n6H+v6dhaW26scFcc6ldrOcbaRsX7q4M8gFIwotAu6jTuid8FensF/j9yQRDkcOS8OWXHr5z2lZTCSDPik83p8mvvEZ/R7dP60ldwz2INX8rbCxi5frEdijqrwZCq9D2tzUJJgG8h3KUKfd3QfThCyq6AdE9X2+EnmU1yP2SJsolgM7euuDBH0/qQ== roa2web-wsl-marius@Mihai-HXG0G
2. 📤 Instalarea cheii pe Bitvise SSH Server
🔴 IMPORTANT: Serverul folosește Bitvise SSH Server pe Windows
Consultă BITVISE_SSH_SETUP.md pentru instrucțiuni detaliate!
Pași rapid:
- Deschide Bitvise SSH Server Control Panel
- Mergi la Users tab → selectează/creează utilizatorul
- În User Properties → Authentication → setează Public key authentication
- În Public Keys → Import/Add → paste cheia publică:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCcRM+WWxoBqCSpaTo+vNCrvCLx1UFmKqqSh6smS4c/lh1Hkku+oiq65iUHwRMu5X9jDXSGUR1Fmig+OgIhoTnT4Hd3v4Fe2zienOFiJ/AZOTE+pgxpwmIrkScGTSv7ZSp4xFcXsFwho8W/Li0P0kyB+kGs2tFYaQM192E5Gx9qjlPGSM55fdksElRXKIrRHE4ARjt5+kMt4WFgUXpVNqhHQFEcz/oW6sC0OkufTbzQ+MHefBIlMNUlNHRxbHc3C6CTuMmzMM847y6rmQlDyScX0tizDhUnQ1UgA3ZyICJp9CVF4weAM6ihZhNTFi7drXiCEihUVLNU+EuEpWdWeVNebqBqlkJT0KXR3IgEQ3zKYKuAmICFO056WI3eKcJWuWEFNDrSYsxo+HydAbqBSqEprJFCUSU90175ngnpY4WoH7CFUbCnGjxEnRXUjUktaCdqYhH0ZjGHSGujK+KGPVxvBi1h7BjE33SEH6PAVZBYmdpGDri69n6H+v6dhaW26scFcc6ldrOcbaRsX7q4M8gFIwotAu6jTuid8FensF/j9yQRDkcOS8OWXHr5z2lZTCSDPik83p8mvvEZ/R7dP60ldwz2INX8rbCxi5frEdijqrwZCq9D2tzUJJgG8h3KUKfd3QfThCyq6AdE9X2+EnmU1yP2SJsolgM7euuDBH0/qQ== roa2web-wsl-marius@Mihai-HXG0G
- OK → Apply Configuration → Restart SSH Server dacă necesar
3. ⚙️ Configurarea username-ului
✅ IMPORTANT: Folosește utilizatorul roa2web care are port forwarding activat în Bitvise!
În WSL, editează scriptul SSH:
nano /mnt/d/PROIECTE/roa-flask/ssh-tunnel-prod.sh
Actualizează linia:
SSH_USER="roa2web" # Utilizator cu port forwarding activat
💡 Notă: Utilizatorul roa2web poate să nu aibă shell access, dar poate face port forwarding.
4. 🚀 Testarea setup-ului
cd /mnt/d/PROIECTE/roa-flask/roa2web
# Afișează ajutorul
./ssh-tunnel-prod.sh help
# Testează și pornește tunelul
./ssh-tunnel-prod.sh start
# Verifică statusul
./ssh-tunnel-prod.sh status
🔧 Comenzi utile
Gestionarea tunelului SSH:
# Pornește tunelul
./ssh-tunnel-prod.sh start
# Oprește tunelul
./ssh-tunnel-prod.sh stop
# Verifică statusul
./ssh-tunnel-prod.sh status
# Repornește tunelul
./ssh-tunnel-prod.sh restart
Testarea pool-ului Oracle:
# Cu tunelul SSH activ
cd /mnt/d/PROIECTE/roa-flask/roa2web
source venv/bin/activate
python shared/database/test_pool.py
🔍 Troubleshooting
❌ "Permission denied (publickey)"
- Verifică că cheia publică este corect instalată pe server
- Verifică permisiunile:
chmod 600 ~/.ssh/authorized_keys - Verifică că SSH_USER este corect în script
❌ "Connection refused" sau "Connection timed out"
- Verifică că serverul SSH este accesibil:
telnet 83.103.197.79 22122 - Verifică că portul 22122 nu este blocat de firewall
❌ "Port 1521 not responding"
- Normal dacă Oracle listener nu este pornit pe server
- Tunelul SSH poate fi OK, dar Oracle nu răspunde
❌ Oracle connection errors
- Verifică că tunelul SSH este activ:
./ssh-tunnel-prod.sh status - Verifică că configurația Oracle din
.enveste corectă - Testează manual:
telnet 127.0.0.1 1521
📊 Output așteptat
SSH Tunnel Start:
================================
ROA2WEB SSH Tunnel Manager
================================
🔄 Starting SSH tunnel...
Server: 83.103.197.79:22122
Local: 127.0.0.1:1521
Remote: localhost:1521
🔍 Testing SSH connectivity...
✅ SSH connectivity OK
🚀 Creating SSH tunnel...
✅ SSH tunnel started successfully (PID: 12345)
🔍 Testing tunnel connectivity...
✅ Tunnel is working! Port 1521 is accessible
Oracle Pool Test:
🚀 ROA2WEB Oracle Pool Test - 2025-07-30 16:00:00
==================================================
🔄 Testing Oracle connection pool...
📊 Initializing Oracle pool...
✅ Pool initialized successfully
🔍 Testing database connection...
✅ Simple query successful: (1,)
...
🎉 ALL TESTS PASSED!
✅ Oracle pool is fully functional and ready for production!
Instrucțiuni SSH pentru ROA2WEB Development Environment 🔐