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

@@ -0,0 +1,334 @@
/* Global styles for Data Entry App */
/* Import shared layout styles - COMMENTED OUT: paths don't exist in unified app */
/* @import '../../../../../shared/frontend/styles/layout/header.css'; */
/* @import '../../../../../shared/frontend/styles/layout/navigation.css'; */
:root {
/* Layout variables */
--header-height: 60px;
--sidebar-width: 280px;
--z-header: 100;
--z-modal: 1000;
--z-modal-backdrop: 999;
/* Shadows */
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
/* Transitions */
--transition-fast: 0.15s ease;
--transition-normal: 0.3s ease;
/* Typography */
--font-semibold: 600;
--font-medium: 500;
--text-xs: 12px;
--text-sm: 14px;
--text-base: 16px;
--text-lg: 18px;
/* Radius */
--radius-md: 6px;
--radius-full: 9999px;
/* Spacing */
--space-xs: 4px;
--space-sm: 8px;
--space-md: 12px;
--space-lg: 24px;
/* Colors - Primary palette (matching reports-app) */
--color-primary: #2563eb;
--color-primary-dark: #1d4ed8;
--color-primary-light: #3b82f6;
/* Compatibility aliases */
--primary-color: var(--color-primary);
--text-color: #111827;
--text-color-secondary: #6b7280;
/* Surface colors for PrimeVue */
--surface-0: #ffffff;
--surface-50: #f8fafc;
--surface-100: #f1f5f9;
--surface-200: #e2e8f0;
/* Red color palette for errors */
--red-50: #fef2f2;
--red-200: #fecaca;
--red-800: #991b1b;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Card styles */
.roa-card {
background: white;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
padding: 1.5rem;
margin-bottom: 1.5rem;
}
.roa-card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
padding-bottom: 1rem;
border-bottom: 1px solid #eee;
}
.roa-card-title {
font-size: 1.25rem;
font-weight: 600;
color: #333;
margin: 0;
display: flex;
align-items: center;
gap: 0.5rem;
}
/* Form styles */
.form-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
}
.form-field {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.form-field label {
font-weight: 500;
color: #555;
font-size: 0.9rem;
}
.form-field .p-inputtext,
.form-field .p-dropdown,
.form-field .p-calendar,
.form-field .p-inputnumber {
width: 100%;
}
.form-field-full {
grid-column: 1 / -1;
}
/* Status badges */
.status-badge {
padding: 0.25rem 0.75rem;
border-radius: 20px;
font-size: 0.8rem;
font-weight: 600;
text-transform: uppercase;
}
.status-draft {
background-color: #e3f2fd;
color: #1976d2;
}
.status-pending {
background-color: #fff3e0;
color: #f57c00;
}
.status-approved {
background-color: #e8f5e9;
color: #388e3c;
}
.status-rejected {
background-color: #ffebee;
color: #d32f2f;
}
.status-synced {
background-color: #e0f2f1;
color: #00796b;
}
/* Table styles */
.data-table-container {
overflow-x: auto;
}
.p-datatable .p-datatable-header {
background: transparent;
border: none;
padding: 0 0 1rem 0;
}
.p-datatable .p-datatable-thead > tr > th {
background: #f8f9fa;
color: #495057;
font-weight: 600;
}
/* Button groups */
.button-group {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
}
/* Upload area */
.upload-area {
border: 2px dashed #ddd;
border-radius: 12px;
padding: 2rem;
text-align: center;
cursor: pointer;
transition: all 0.3s;
}
.upload-area:hover {
border-color: #667eea;
background-color: #f8f9ff;
}
.upload-area.has-files {
border-style: solid;
border-color: #667eea;
}
/* Image preview */
.image-preview-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 1rem;
margin-top: 1rem;
}
.image-preview-item {
position: relative;
border-radius: 8px;
overflow: hidden;
aspect-ratio: 1;
}
.image-preview-item img {
width: 100%;
height: 100%;
object-fit: cover;
}
.image-preview-item .remove-btn {
position: absolute;
top: 0.5rem;
right: 0.5rem;
}
/* Accounting entries table */
.entries-table {
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
}
.entries-table th,
.entries-table td {
padding: 0.75rem;
text-align: left;
border-bottom: 1px solid #eee;
}
.entries-table th {
background: #f8f9fa;
font-weight: 600;
color: #495057;
}
.entries-table .debit {
color: #d32f2f;
}
.entries-table .credit {
color: #388e3c;
}
/* Stats cards */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 1rem;
margin-bottom: 1.5rem;
}
.stat-card {
background: white;
border-radius: 12px;
padding: 1.25rem;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
text-align: center;
}
.stat-card .stat-value {
font-size: 2rem;
font-weight: 700;
color: #333;
}
.stat-card .stat-label {
color: #666;
font-size: 0.9rem;
margin-top: 0.25rem;
}
/* Loading state */
.loading-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 200px;
}
/* Empty state */
.empty-state {
text-align: center;
padding: 3rem;
color: #666;
}
.empty-state i {
font-size: 4rem;
color: #ddd;
margin-bottom: 1rem;
}
.empty-state h3 {
margin-bottom: 0.5rem;
}
/* Responsive utilities */
@media (max-width: 768px) {
.form-grid {
grid-template-columns: 1fr;
}
.stats-grid {
grid-template-columns: repeat(2, 1fr);
}
.button-group {
flex-direction: column;
}
.button-group .p-button {
width: 100%;
}
}