Files
roa2web-service-auto/docs/DEVELOPMENT_BLUEPRINT.md
Marius Mutu 6b13ffa183 Initial commit: ROA2WEB - FastAPI + Vue.js + Telegram Bot
Modern ERP Reports Application with microservices architecture

Tech Stack:
- Backend: FastAPI + python-oracledb (Oracle DB integration)
- Frontend: Vue.js 3 + PrimeVue + Vite
- Telegram Bot: python-telegram-bot + SQLite
- Infrastructure: Shared database pool, JWT authentication, SSH tunnel

Features:
- FastAPI backend with async Oracle connection pool
- Vue.js 3 responsive frontend with PrimeVue components
- Telegram bot alternative interface
- Microservices architecture with shared components
- Complete deployment support (Linux Docker + Windows IIS)
- Comprehensive testing (Playwright E2E + pytest)

Repository Structure:
- reports-app/ - Main application (backend, frontend, telegram-bot)
- shared/ - Shared components (database pool, auth, utils)
- deployment/ - Deployment scripts (Linux & Windows)
- docs/ - Project documentation
- security/ - Security scanning and git hooks
2025-10-25 14:55:08 +03:00

7.1 KiB

ROA2WEB DEVELOPMENT BLUEPRINT

Ghid Complet pentru Dezvoltarea Aplicației FastAPI + Vue.js


🎯 VIZIUNEA PROIECTULUI

Obiectiv Principal

Transformarea aplicației Flask existente într-un ecosistem modern FastAPI + Vue.js pentru rapoarte ERP (facturi și încasări), cu arhitectură modulară pentru extensii viitoare.

Directorul Principal: roa2web


📋 STATUS GENERAL DEZVOLTARE

Componentă Status Progres Următorul Pas
Git Setup COMPLET 100% -
Structură Proiect COMPLET 100% -
Shared Database Pool COMPLET 100% -
Shared Authentication COMPLET 100% -
Backend FastAPI COMPLET 100% -
Backend Testing COMPLET 100% -
Frontend Vue.js COMPLET 100% -
Docker Compose COMPLET 100% -
Nginx Gateway COMPLET 100% -
SSH Tunnel Oracle COMPLET 100% -
Production Ready COMPLET 100% -

🏗️ ARHITECTURA FINALĂ

Structură Completă roa2web


├── shared/                          # 🔧 Componente Comune ✅ COMPLET
│   ├── database/                    # Oracle connection pool
│   ├── auth/                       # JWT authentication
│   └── utils/                      # Utilități comune
│
├── reports-app/                     # 📊 Aplicația Rapoarte
│   ├── backend/                    # FastAPI Backend ✅ COMPLET
│   │   ├── app/
│   │   │   ├── main.py             # FastAPI entry point
│   │   │   ├── models/             # Pydantic models
│   │   │   ├── routers/            # API endpoints
│   │   │   ├── services/           # Business logic
│   │   │   └── schemas/            # Response schemas
│   │   ├── requirements.txt
│   │   ├── Dockerfile
│   │   └── .env.example
│   │
│   ├── frontend/                   # Vue.js Frontend ✅ COMPLET
│   │   ├── src/
│   │   │   ├── main.js             # Vue app entry
│   │   │   ├── App.vue             # Root component
│   │   │   ├── router/             # Vue Router
│   │   │   ├── stores/             # Pinia stores
│   │   │   ├── views/              # Page components
│   │   │   ├── components/         # Reusable components
│   │   │   ├── services/           # API communication
│   │   │   ├── composables/        # Vue composables
│   │   │   ├── assets/             # Static assets
│   │   │   └── utils/              # Helper functions
│   │   ├── package.json
│   │   ├── vite.config.js
│   │   ├── Dockerfile
│   │   └── .env.example
│   │
│   └── README.md
│
├── future-apps/                     # 🚀 Pentru Aplicații Viitoare
├── nginx/                          # 🌐 Gateway ✅ COMPLET
├── docker-compose.yml              # 🐳 Orchestration ✅ COMPLET
├── ssh-tunnel/                     # 🔐 SSH Tunnel ✅ COMPLET
├── scripts/                        # 📜 Integration Tests ✅ COMPLET
├── .env.example
├── .gitignore
├── README.md
├── DEVELOPMENT_BLUEPRINT.md        # 📋 ACEST FIȘIER
└── MICROSERVICES_GUIDE.md

🚀 COMPONENTE IMPLEMENTATE

SHARED COMPONENTS (COMPLET)

  • Oracle Database Pool: Connection pooling cu oracledb, singleton pattern
  • JWT Authentication: Access/refresh tokens, middleware, dependencies
  • Models: User, Company, DatabaseConfig cu Pydantic
  • Testing: Comprehensive test suites pentru toate componentele

BACKEND FASTAPI (COMPLET)

  • FastAPI App: Main application cu lifespan management
  • Models: Invoice, Payment cu validatori și CSS classes
  • Routers: Auth, Companies, Invoices, Payments cu toate endpoint-urile
  • Services: Business logic pentru facturi și încasări
  • Integration: Complete cu shared database pool și authentication

FRONTEND VUE.JS - COMPLET IMPLEMENTAT!

Obiectiv: REALIZAT

Implementarea completă a frontend-ului Vue.js cu PrimeVue pentru aplicația de rapoarte.

Pași implementați:

  1. Setup Vue.js 3 cu Vite în reports-app/frontend/
  2. Configurare PrimeVue și componente UI (Aura theme)
  3. Implementare Pinia stores pentru state management
  4. Componente principale:
    • LoginView.vue - Autentificare completă cu validare
    • DashboardView.vue - Dashboard cu statistici și acțiuni rapide
    • InvoicesView.vue - Pagină facturi cu filtrare și paginare
    • PaymentsView.vue - Pagină încasări cu management complet
  5. Routing și navigation cu Vue Router și navigation guards
  6. Integrare API cu interceptors și error handling
  7. Styling responsive pentru mobile și desktop + composables

Deliverables: REALIZATE

  • Aplicație Vue.js complet funcțională
  • Interface responsive și user-friendly
  • Integrare completă cu backend-ul FastAPI
  • Composables pentru responsive design
  • CSS global și mobile optimizations

URMĂTOAREA ETAPĂ: DOCKER & DEPLOYMENT

Obiectiv

Containerizarea aplicației și setup pentru producție cu Docker Compose și Nginx.


🐳 FAZA FINALĂ: DOCKER & DEPLOYMENT

Docker Compose și Nginx

Status: PLANIFICAT - după finalizarea frontend-ului

Servicii Docker:

  • reports-backend: FastAPI backend containerizat
  • reports-frontend: Vue.js frontend cu Nginx
  • nginx: Gateway pentru routing între servicii

Nginx Configuration:

  • Routing /api către backend FastAPI
  • Serving static files pentru frontend Vue.js
  • Load balancing pentru extensii viitoare

📊 CHECKLIST FINAL

IMPLEMENTAT

  • Git setup și structură proiect
  • Shared database pool Oracle
  • JWT authentication system
  • FastAPI backend complet
  • API endpoints pentru facturi și încasări
  • Testing suites complete

IMPLEMENTAT RECENT

  • Vue.js 3 frontend cu PrimeVue COMPLET
  • Pinia stores pentru state management COMPLET
  • Componente UI responsive COMPLET
  • LoginView, DashboardView, InvoicesView, PaymentsView COMPLET
  • Vue Router cu navigation guards COMPLET
  • API integration cu FastAPI backend COMPLET
  • Responsive design pentru mobile și desktop COMPLET

DE IMPLEMENTAT

  • Docker Compose orchestration
  • Nginx gateway configuration
  • Production deployment setup

🎓 RESURSE DE ÎNVĂȚARE

Vue.js 3

Docker & Deployment


Acest blueprint este FARUL CĂLĂUZITOR pentru dezvoltarea aplicației ROA2WEB. Următoarea etapă: Frontend Vue.js! 🚀