Files
roa2web-service-auto/QUICK-START.md
Marius Mutu c5e051ad80 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>
2025-12-29 23:48:14 +02:00

3.7 KiB

ROA2WEB Ultrathin Monolith - Quick Start 🚀

Pornire Rapidă

PROD Environment (server PRODUCȚIE 10.0.20.36)

./start-prod.sh              # Pornește tot: SSH tunnel + backend + frontend
./start-prod.sh stop         # Oprește toate serviciile

TEST Environment (server TEST 10.0.20.121)

./start-test.sh             # Pornește tot: SSH tunnel + backend + frontend
./start-test.sh stop        # Oprește toate serviciile

Verificare Status

./status.sh                 # Arată status-ul tuturor serviciilor

Ce s-a Schimbat?

Înainte (3 Backend-uri Separate)

Reports Backend    → Port 8001
Data Entry Backend → Port 8003
Telegram Bot       → Port 8002

Acum (1 Backend Unificat)

Unified Backend    → Port 8000
  ├── Reports API:    /api/reports/*
  ├── Data Entry:     /api/data-entry/*
  ├── Telegram:       /api/telegram/*
  └── Bot:            Running ca background task

Scripturi Disponibile

Script Descriere
./start-prod.sh Pornește tot pentru PROD (Oracle PROD: 10.0.20.36)
./start-test.sh Pornește tot pentru TEST (Oracle TEST: 10.0.20.121)
./status.sh Verifică status-ul serviciilor
./start-backend.sh start/stop/restart Control granular backend
./start-frontend.sh restart Restart rapid frontend (~7s)
./test-unified-backend.sh Rulează testele comprehensive

API Endpoints

Backend Unificat: http://localhost:8000

Frontend: http://localhost:3000

Log Files

# Backend logs
tail -f /tmp/unified_backend_dev.log     # DEV
tail -f /tmp/unified_backend_test.log    # TEST

# Frontend logs
tail -f /tmp/unified_frontend_dev.log    # DEV
tail -f /tmp/unified_frontend_test.log   # TEST

Troubleshooting

Backend nu pornește

# Verifică logurile
tail -n 50 /tmp/unified_backend_dev.log

# Verifică dacă portul este ocupat
lsof -i :8000

# Oprește procesul vechi
./start-prod.sh stop

Frontend nu pornește

# Verifică logurile
tail -n 50 /tmp/unified_frontend_dev.log

# Reinstalează dependențele
rm -rf node_modules package-lock.json
npm install

SSH Tunnel nu se conectează

# DEV (PRODUCȚIE)
./ssh-tunnel-prod.sh stop
./ssh-tunnel-prod.sh start

# TEST
./ssh-tunnel-test.sh stop
./ssh-tunnel-test.sh start

Configurare Inițială

  1. Backend: Creează backend/.env din backend/.env.example
  2. Configurează variabilele pentru mediul dorit (DEV/TEST)
  3. Pornește serviciile: ./start-prod.sh sau ./start-test.sh

Diferențe DEV vs TEST

Aspect DEV TEST
SSH Tunnel ./ssh-tunnel-prod.sh ./ssh-tunnel-test.sh
Server Oracle 10.0.20.36 (PROD) 10.0.20.121 (TEST)
Schema Test ROMFAST (id=114) MARIUSM_AUTO (id=110)
.env File backend/.env backend/.env.testbackend/.env
Hot Reload DA (--reload) NU (pentru stabilitate)

Avantaje

1 comandă în loc de 3 pentru pornire 1 proces în loc de 3 de monitorizat Loguri unificate într-un singur fișier Debugging mai ușor - tot în același proces Resurse optimizate - Oracle pool partajat Pornire mai rapidă - inițializare paralelă

Documentație Completă

  • Implementare: ULTRATHIN-MONOLITH-IMPLEMENTATION.md
  • Teste: ./test-unified-backend.sh
  • Plan Detaliat: .auto-build/specs/ultrathin-monolith/plan.md