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
193 lines
7.1 KiB
Markdown
193 lines
7.1 KiB
Markdown
# 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
|
|
- [x] Git setup și structură proiect
|
|
- [x] Shared database pool Oracle
|
|
- [x] JWT authentication system
|
|
- [x] FastAPI backend complet
|
|
- [x] API endpoints pentru facturi și încasări
|
|
- [x] Testing suites complete
|
|
|
|
### ✅ IMPLEMENTAT RECENT
|
|
- [x] Vue.js 3 frontend cu PrimeVue ✅ COMPLET
|
|
- [x] Pinia stores pentru state management ✅ COMPLET
|
|
- [x] Componente UI responsive ✅ COMPLET
|
|
- [x] LoginView, DashboardView, InvoicesView, PaymentsView ✅ COMPLET
|
|
- [x] Vue Router cu navigation guards ✅ COMPLET
|
|
- [x] API integration cu FastAPI backend ✅ COMPLET
|
|
- [x] 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
|
|
- **Documentația oficială**: https://vuejs.org/guide/
|
|
- **Composition API**: https://vuejs.org/guide/extras/composition-api-faq.html
|
|
- **PrimeVue**: https://www.primefaces.org/primevue/
|
|
|
|
### Docker & Deployment
|
|
- **Docker Compose**: https://docs.docker.com/compose/
|
|
- **Nginx Configuration**: Exemple practice în proiect
|
|
|
|
---
|
|
|
|
*Acest blueprint este FARUL CĂLĂUZITOR pentru dezvoltarea aplicației ROA2WEB. Următoarea etapă: Frontend Vue.js!* 🚀 |