feat: Migrate to ultrathin monolith architecture

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>
This commit is contained in:
2025-12-29 23:48:14 +02:00
parent 2a101f1ef5
commit c5e051ad80
378 changed files with 7566 additions and 73730 deletions

View File

@@ -137,6 +137,12 @@ const initializeInflowsChart = async () => {
await nextTick();
// Double-check canvas is still available after nextTick
if (!inflowsCanvas.value) {
console.warn('[CashFlowMetricCard] Inflows canvas ref not available after nextTick');
return;
}
const ctx = inflowsCanvas.value.getContext("2d");
// Generate labels
@@ -341,6 +347,12 @@ const initializeOutflowsChart = async () => {
await nextTick();
// Double-check canvas is still available after nextTick
if (!outflowsCanvas.value) {
console.warn('[CashFlowMetricCard] Outflows canvas ref not available after nextTick');
return;
}
const ctx = outflowsCanvas.value.getContext("2d");
// Generate labels

View File

@@ -193,6 +193,12 @@ const initializeChart = async () => {
await nextTick();
// Double-check canvas is still available after nextTick
if (!chartCanvas.value) {
console.warn('[ClientiBalanceCard] Canvas ref not available after nextTick');
return;
}
const ctx = chartCanvas.value.getContext("2d");
// Generate labels

View File

@@ -193,6 +193,12 @@ const initializeChart = async () => {
await nextTick();
// Double-check canvas is still available after nextTick
if (!chartCanvas.value) {
console.warn('[FurnizoriBalanceCard] Canvas ref not available after nextTick');
return;
}
const ctx = chartCanvas.value.getContext("2d");
// Generate labels

View File

@@ -1,7 +1,7 @@
import axios from 'axios'
const api = axios.create({
baseURL: '/api/reports',
baseURL: import.meta.env.BASE_URL + 'api/reports',
headers: { 'Content-Type': 'application/json' }
})
@@ -23,7 +23,7 @@ api.interceptors.response.use(
localStorage.removeItem('access_token')
localStorage.removeItem('refresh_token')
localStorage.removeItem('user')
window.location.href = '/login'
window.location.href = import.meta.env.BASE_URL + 'login'
}
return Promise.reject(error)
}

View File

@@ -520,8 +520,8 @@ const loadBankAccounts = async () => {
}
try {
const apiService = (await import("../services/api")).apiService;
const response = await api.get("/treasury/bank-cash-accounts", {
const apiService = (await import("../services/api")).default;
const response = await apiService.get("/treasury/bank-cash-accounts", {
params: {
company: companyStore.selectedCompany.id_firma,
register_type: filters.value.registerType,
@@ -673,8 +673,8 @@ const fetchAllData = async () => {
params.bank_account = filters.value.bankAccount;
}
const apiService = (await import("../services/api")).apiService;
const response = await api.get("/treasury/bank-cash-register", {
const apiService = (await import("../services/api")).default;
const response = await apiService.get("/treasury/bank-cash-register", {
params,
});