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>
37 lines
1.4 KiB
Python
37 lines
1.4 KiB
Python
"""Reports module router factory."""
|
|
|
|
from fastapi import APIRouter
|
|
|
|
|
|
def create_reports_router() -> APIRouter:
|
|
"""
|
|
Create and configure Reports module router.
|
|
|
|
Includes all report-related endpoints:
|
|
- /invoices - Invoice management
|
|
- /dashboard - Dashboard and metrics
|
|
- /treasury - Treasury operations
|
|
- /trial-balance - Trial balance reports
|
|
- /cache - Cache management
|
|
|
|
Returns:
|
|
APIRouter: Configured router for reports module
|
|
"""
|
|
router = APIRouter()
|
|
|
|
# Import routers here to avoid circular imports
|
|
from .invoices import router as invoices_router
|
|
from .dashboard import router as dashboard_router
|
|
from .treasury import router as treasury_router
|
|
from .trial_balance import router as trial_balance_router
|
|
from .cache import router as cache_router
|
|
|
|
# Include all sub-routers (no prefix - already prefixed in main.py with /api/reports)
|
|
router.include_router(invoices_router, prefix="/invoices", tags=["reports-invoices"])
|
|
router.include_router(dashboard_router, prefix="/dashboard", tags=["reports-dashboard"])
|
|
router.include_router(treasury_router, prefix="/treasury", tags=["reports-treasury"])
|
|
router.include_router(trial_balance_router, prefix="/trial-balance", tags=["reports-trial-balance"])
|
|
router.include_router(cache_router, prefix="/cache", tags=["reports-cache"])
|
|
|
|
return router
|