- Persist 2FA state in sessionStorage to survive mobile page reloads
- Reuse existing valid OTP on re-login to avoid rate limiting and duplicate emails
- Add embedded sparkline charts to SolduriCompactCard with expand toggle
- Mobile dashboard redesigned: 2 pages with enriched compact cards + cashflow type
- Login UI simplified: remove gradient bg, subtitle, icon; use design tokens
- Focus OTP input when session is restored from 2FA state
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove legacy pool support (DSN, env vars fallback)
- Use first registered server when server_id not specified
- Show server dropdown even with single server in ORACLE_SERVERS
- Email login only available for 2+ servers
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Complete implementation of multi-server Oracle database support:
Backend:
- Multi-pool Oracle with lazy loading per server
- Email-to-server cache for automatic server discovery
- JWT tokens include server_id claim
- /auth/check-identity and /auth/check-email endpoints
- /auth/my-servers endpoint for listing user's accessible servers
- Server switch with password re-authentication
Frontend:
- New ServerSelector component for header dropdown
- Multi-step login flow (identity → server → password)
- Server switching from header with password modal
- Mobile drawer menu with server selection
- Dark mode support for all new components
- URL bookmark support with ?server= query param
Scripts:
- Unified start.sh replacing start-prod.sh/start-test.sh
- Unified ssh-tunnel.sh with multi-server support
- Updated status.sh for new architecture
Tests:
- E2E tests for multi-server and single-server login flows
- Backend unit tests for all new endpoints
- Oracle multi-pool integration tests
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add PWA manifest, icons (192x192, 512x512), and service worker
- Register service worker in index.html with Apple mobile web app support
- Consolidate CSS variables and design tokens documentation
- Update PrimeVue overrides for consistent theming
- Refactor data-entry components to use shared CSS patterns
- Add frontend-style-auditor agent for style consistency checks
- Minor OCR validation and job worker improvements
- Update start-prod.sh configuration
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add deployment/linux/ with deploy.sh for deploying from Claude-Agent LXC to Windows server
- Add ServerLogsView.vue for viewing server logs from frontend
- Add shared/routes/system.py for system health endpoints
- Update CLAUDE.md with quick deploy instructions
- Improve Windows deployment scripts (ROA2WEB-Console.ps1)
- Fix OCR service validation and worker pool improvements
- Update environment config examples
- Various script permission and startup fixes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace separate [Trezorerie Casa] and [Trezorerie Banca] buttons
with single unified [Trezorerie] button in main menu
- Add format_treasury_combined_response() formatter showing:
- Grand total (Sold Trezorerie)
- Casa section with total + all accounts
- Banca section with total + all accounts
- Compact menu layout: Row 2 [Sold Companie][Trezorerie],
Row 3 [Sold Clienti][Sold Furnizori], Row 4 [Evolutie Incasari]
- Use Romanian number format (period as thousands separator)
Also includes:
- Oracle pool: Support both SERVICE_NAME and SID connections
(ORACLE_SERVICE_NAME takes priority over ORACLE_SID)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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>
- Add dedupe option for vue, vue-router, pinia, primevue in both Vite configs
to prevent duplicate module issues when using shared components
- Add optimizeDeps and commonjsOptions for better shared module handling
- Fix CompanySelector and PeriodSelector header variants to support both
light headers (using CSS variables) and gradient headers (white text)
- Make hamburger button always display:flex for consistent mobile layout
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Integrate shared JWT authentication into data-entry-app:
- Add Oracle pool initialization for auth service
- Add AuthenticationMiddleware to protect API routes
- Update all receipt endpoints to use CurrentUser from JWT
- Add shared auth router (/api/auth/login, /api/auth/refresh)
Add nomenclature synchronization feature:
- Create SQLite models for synced suppliers, local suppliers, and cash registers
- Add nomenclature router with sync triggers and CRUD endpoints
- Add sync service for Oracle → SQLite nomenclature data
- Update nomenclature_service to use synced SQLite data with fallbacks
Create shared frontend components:
- Add shared/frontend/ with LoginView.vue, auth store factory, login.css
- Integrate shared login and auth into data-entry-app frontend
- Add axios-based API service with token refresh interceptor
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Cache System (Backend):
- Implemented two-tier hybrid cache: L1 (in-memory) + L2 (SQLite)
- L1 cache: Fast dictionary-based with 5-minute TTL for hot data
- L2 cache: Persistent SQLite with 1-hour TTL for warm data
- Cache decorator with automatic tier management and fallback
- Cache key generation with per-user isolation
- Event monitoring system for cache statistics
- Cache benchmarking utilities for performance testing
- Added cache management endpoints: /api/cache/stats, /api/cache/clear, /api/cache/benchmark
- Cache configuration via environment variables (CACHE_ENABLED, CACHE_L1_TTL, etc.)
Backend Services:
- Updated dashboard_service to use @cached decorator with request context
- Added cache support to invoice_service and treasury_service
- Integrated cache manager into main.py with lifespan events
- Added Request parameter to service methods for cache metadata
Frontend Enhancements:
- New CacheStatsView.vue for real-time cache monitoring dashboard
- Cache store (cacheStore.js) for state management
- Updated router to include /cache-stats route
- Navigation updates in DashboardHeader and HamburgerMenu
- Cache stats accessible from main navigation
Telegram Bot Improvements:
- Enhanced formatters with YTD comparison data
- Improved menu navigation and button layout
- Better error handling and user feedback
- Bot startup improvements with graceful shutdown
Auth & Middleware:
- Enhanced middleware with cache metadata injection
- Improved request state handling for cache source tracking
Development:
- Updated start-dev.sh with better error handling
- Added TELEGRAM_EMAIL_AUTH_PLAN.md documentation
- Updated requirements.txt with aiosqlite for async SQLite
Performance:
- L1 cache provides <1ms response for hot data
- L2 cache provides ~5ms response for warm data
- Database queries only for cold data or cache misses
- Cache hit rates tracked and displayed in real-time
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Creates detailed 60-page implementation roadmap for transforming ROA2WEB from
single-tenant to multi-tenant SaaS architecture. Plan includes 6 phases with
backward compatibility, hybrid connection support (SSH tunnel + direct), and
complete deployment strategies for dev/Docker/Windows environments.
Key features:
- Tenant isolation with separate Oracle connection pools per tenant
- Dynamic SSH tunnel management with auto-restart
- Encrypted credentials in PostgreSQL/SQLite tenant config DB
- JWT-based tenant identification and access validation
- Redis cache namespacing per tenant
- Comprehensive testing and migration strategies
Timeline: 14-20 days implementation
Target: <10% performance overhead, zero downtime migration
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit addresses the overly restrictive .gitignore pattern that
was excluding all test files (test_*.py), including legitimate pytest
and unittest test suites essential for code quality and CI/CD.
Changes to .gitignore:
- Added negation patterns !**/tests/test_*.py and !**/test_*.py
to allow proper test files while still blocking temporary scripts
- This enables pytest test suites to be tracked by git
Added test files (17 files):
Telegram Bot Tests (15 files):
- reports-app/telegram-bot/tests/test_auth.py
Tests for authentication and account linking flow
- reports-app/telegram-bot/tests/test_callbacks.py
Tests for callback query handlers
- reports-app/telegram-bot/tests/test_formatters.py
Tests for message formatting utilities
- reports-app/telegram-bot/tests/test_formatters_extended.py
Extended formatter tests
- reports-app/telegram-bot/tests/test_handlers_menu.py
Tests for menu handlers
- reports-app/telegram-bot/tests/test_helpers.py
Tests for helper functions
- reports-app/telegram-bot/tests/test_helpers_extended.py
Extended helper tests
- reports-app/telegram-bot/tests/test_helpers_real.py
Real integration tests for helpers
- reports-app/telegram-bot/tests/test_helpers_real_simple.py
Simplified integration tests
- reports-app/telegram-bot/tests/test_login_flow.py
Complete login flow integration tests
- reports-app/telegram-bot/tests/test_menus.py
Menu system tests
- reports-app/telegram-bot/tests/test_session_company.py
Session and company management tests
- reports-app/telegram-bot/test_claude_integration.py
Manual integration test (Claude AI)
- reports-app/telegram-bot/test_claude_response.py
Response formatting test
- reports-app/telegram-bot/test_db.py
Database operations manual test
Shared Module Tests (2 files):
- shared/auth/test_auth.py
Authentication system tests
- shared/database/test_pool.py
Oracle connection pool tests
Security verification:
✅ All test files use mock objects, fixtures, and environment variables
✅ No hardcoded credentials or secrets found
✅ Safe for version control
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit fixes overly broad .gitignore patterns that were excluding
important source code files from version control. Previously, wildcard
patterns like *auth*, *token*, *secret*, *connection*, and *credential*
were excluding ALL files containing these words, including critical
application code.
Changes:
- Updated .gitignore with specific patterns for sensitive config files
(*.json, *.txt, *.yml, *.yaml extensions only)
- Removed broad wildcards that excluded source code files
Added missing source files:
- shared/auth/ (9 files): Complete authentication system
- JWT handler, middleware, auth service, models, routes
- reports-app/backend/app/routers/auth.py: Authentication API router
- reports-app/backend/app/auth_middleware_wrapper.py: Middleware wrapper
- reports-app/frontend/src/stores/auth.js: Vue.js auth store
- reports-app/frontend/tests/: E2E tests and fixtures for auth
- reports-app/telegram-bot/app/auth/: Telegram auth linking module
- deployment/windows/scripts/Setup-ClaudeAuth.ps1: Windows deployment script
- security/secrets_scanner.py: Security scanning utility
These files are essential for the application to function and should
have been included in the initial commit.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>