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>
46 lines
1.3 KiB
Markdown
46 lines
1.3 KiB
Markdown
# Backend Runtime Data
|
|
|
|
This directory contains runtime data generated by the unified backend.
|
|
|
|
## Directory Structure
|
|
|
|
```
|
|
data/
|
|
├── cache/ # Reports module cache (hybrid L1+L2)
|
|
│ └── *.db # SQLite L2 cache database
|
|
├── receipts/ # Data Entry module data
|
|
│ ├── *.db # SQLite receipts database
|
|
│ └── uploads/ # User-uploaded files (receipts, attachments)
|
|
└── telegram/ # Telegram bot data
|
|
└── *.db # SQLite bot auth/session database
|
|
```
|
|
|
|
## Git Behavior
|
|
|
|
- **Ignored**: All `*.db` files and `uploads/` contents
|
|
- **Committed**: Only `.gitkeep` files to preserve directory structure
|
|
|
|
## Environment-Specific Databases
|
|
|
|
Different environments use separate databases:
|
|
|
|
- **Development** (`.env.prod`):
|
|
- Cache: `roa2web_cache.db`
|
|
- Receipts: `receipts_dev.db`
|
|
- Telegram: `telegram.db`
|
|
|
|
- **Test** (`.env.test`):
|
|
- Cache: `roa2web_cache_test.db`
|
|
- Receipts: `receipts_test.db`
|
|
- Telegram: `telegram_test.db`
|
|
|
|
- **Production** (`.env.prod`):
|
|
- Cache: `roa2web_cache_prod.db`
|
|
- Receipts: `receipts_prod.db`
|
|
- Telegram: `telegram_prod.db`
|
|
|
|
## Auto-Created
|
|
|
|
All databases and directories are created automatically on first run.
|
|
No manual setup required.
|