labfusion/
├── docker-compose.yml          # Production Docker setup
├── docker-compose.dev.yml      # Development Docker setup
├── env.example                 # Environment configuration template
├── .gitignore                  # Git ignore rules
├── README.md                   # Comprehensive documentation
├── .gitea/                     # Gitea Actions CI/CD
│   └── workflows/              # Pipeline definitions
│       ├── all-services.yml    # Main CI pipeline for all services
│       ├── api-gateway.yml     # Java Spring Boot pipeline
│       ├── service-adapters.yml # Python FastAPI pipeline
│       ├── api-docs.yml        # Node.js Express pipeline
│       ├── frontend.yml        # React frontend pipeline
│       ├── integration-tests.yml # Integration testing
│       └── docker-build.yml    # Docker image building pipeline
├── services/                   # Modular microservices
│   ├── api-gateway/           # Java Spring Boot API Gateway (Port 8080)
│   │   ├── src/main/java/com/labfusion/
│   │   │   ├── model/         # JPA entities (User, Dashboard, Widget, Event, DeviceState)
│   │   │   ├── repository/    # Data repositories
│   │   │   ├── service/       # Business logic
│   │   │   └── controller/    # REST controllers
│   │   ├── src/main/resources/
│   │   │   └── application.yml # Spring configuration
│   │   ├── pom.xml            # Maven dependencies
│   │   ├── Dockerfile         # Production container
│   │   ├── Dockerfile.dev     # Development container
│   │   ├── README.md          # Service documentation
│   │   ├── CLEAN_CODE.md      # Clean code implementation details
│   │   └── target/            # Maven build output
│   ├── service-adapters/      # Python FastAPI Service Adapters (Port 8000)
│   │   ├── main.py            # FastAPI application (modular)
│   │   ├── models/            # Pydantic schemas
│   │   │   ├── __init__.py
│   │   │   └── schemas.py     # Request/response models
│   │   ├── routes/            # API endpoints
│   │   │   ├── __init__.py
│   │   │   ├── general.py     # Root, health, services
│   │   │   ├── home_assistant.py # HA integration
│   │   │   ├── frigate.py     # Frigate integration
│   │   │   ├── immich.py      # Immich integration
│   │   │   └── events.py      # Event management
│   │   ├── services/          # Business logic
│   │   │   ├── __init__.py
│   │   │   ├── config.py      # Service configurations
│   │   │   └── redis_client.py # Redis connection
│   │   ├── requirements.txt   # Python dependencies
│   │   ├── pyproject.toml     # Python project configuration
│   │   ├── pytest.ini        # Pytest configuration
│   │   ├── Dockerfile         # Production container
│   │   ├── Dockerfile.dev     # Development container
│   │   ├── README.md          # Service documentation
│   │   ├── CLEAN_CODE.md      # Clean code implementation details
│   │   ├── tests/             # Test suite
│   │   │   ├── __init__.py
│   │   │   ├── conftest.py
│   │   │   ├── test_general_routes.py
│   │   │   ├── test_home_assistant_routes.py
│   │   │   ├── test_main.py
│   │   │   ├── test_models.py
│   │   │   └── reports/        # Test reports
│   │   ├── htmlcov/           # Coverage reports
│   │   ├── bandit-report.json # Security scan results
│   │   └── safety-report.json # Dependency vulnerability scan
│   ├── metrics-collector/     # Go Metrics Collector (Port 8081) 🚧
│   │   ├── main.go            # Go application (planned)
│   │   ├── go.mod             # Go dependencies (planned)
│   │   ├── Dockerfile         # Production container (planned)
│   │   ├── Dockerfile.dev     # Development container (planned)
│   │   └── README.md          # Service documentation
│   ├── notification-service/  # Node.js Notification Service (Port 8082) 🚧
│       ├── src/               # TypeScript source (planned)
│       ├── package.json       # Node.js dependencies (planned)
│       ├── Dockerfile         # Production container (planned)
│       ├── Dockerfile.dev     # Development container (planned)
│       └── README.md          # Service documentation
│   └── api-docs/              # API Documentation Service (Port 8083) ✅
│       ├── server.js          # Express server for unified docs
│       ├── package.json       # Node.js dependencies
│       ├── jest.config.js     # Jest test configuration
│       ├── jest.setup.js      # Jest setup file
│       ├── Dockerfile         # Production container
│       ├── Dockerfile.dev     # Development container
│       ├── README.md          # Service documentation
│       ├── CLEAN_CODE.md      # Clean code implementation details
│       ├── __tests__/         # Test suite
│       │   └── server.test.js # Server tests
│       └── node_modules/      # Node.js dependencies
├── frontend/                  # React Frontend (Port 3000)
│   ├── src/
│   │   ├── components/        # React components
│   │   │   ├── common/        # Reusable UI components
│   │   │   │   ├── ErrorBoundary.js    # Error boundary component
│   │   │   │   ├── LoadingSpinner.js   # Loading state component
│   │   │   │   └── StatusIcon.js       # Status icon component
│   │   │   ├── dashboard/     # Dashboard-specific components
│   │   │   │   ├── SystemStatsCards.js # System statistics cards
│   │   │   │   ├── ServiceStatusList.js # Service status list
│   │   │   │   └── RecentEventsList.js # Recent events list
│   │   │   ├── Dashboard.js   # Main dashboard (refactored)
│   │   │   ├── SystemMetrics.js # Metrics visualization
│   │   │   ├── Settings.js    # Configuration UI
│   │   │   ├── ServiceStatusBanner.js # Service status banner
│   │   │   └── OfflineMode.js # Offline mode component
│   │   ├── hooks/             # Custom React hooks
│   │   │   └── useServiceStatus.js # Service status and data hooks
│   │   ├── services/          # API and external services
│   │   │   └── api.js         # Centralized API client
│   │   ├── utils/             # Utility functions
│   │   │   └── errorHandling.js # Error handling utilities
│   │   ├── constants/         # Configuration constants
│   │   │   └── index.js       # UI constants, colors, messages
│   │   ├── App.js             # Main app component (with ErrorBoundary)
│   │   ├── index.js           # App entry point
│   │   └── index.css          # Global styles
│   ├── public/
│   │   └── index.html         # HTML template
│   ├── package.json           # Node.js dependencies (with prop-types)
│   ├── package-lock.json      # Dependency lock file
│   ├── rsbuild.config.js      # Rsbuild configuration
│   ├── vitest.config.js       # Vitest test configuration
│   ├── Dockerfile             # Production container
│   ├── Dockerfile.dev         # Development container
│   ├── README.md              # Frontend documentation
│   ├── CLEAN_CODE.md          # Clean code documentation
│   ├── RESILIENCE.md          # Frontend resilience features
│   ├── build/                 # Production build output
│   ├── coverage/              # Test coverage reports
│   └── node_modules/          # Node.js dependencies
# Docker Compose for Runners
runners/
├── docker-compose.runners.yml # Multi-runner Docker Compose setup
├── env.runners.example        # Environment template for runners
├── manage-runners.sh          # Linux/macOS runner management script
├── manage-runners.ps1         # Windows PowerShell runner management script
├── config_heavy.yaml          # Configuration for heavy workloads (Java/Python)
├── config_light.yaml          # Configuration for light workloads (Node.js/Frontend)
├── config_docker.yaml         # Configuration for Docker workloads
├── config_security.yaml       # Configuration for security workloads
├── fix-cache-issues.sh        # Linux/macOS cache fix script
├── fix-cache-issues.ps1       # Windows PowerShell cache fix script
├── compose.yaml               # Alternative compose file
└── data/                      # Shared data directory
    ├── data_heavy/            # Heavy runner data directory
    ├── data_light/            # Light runner data directory
    ├── data_docker/           # Docker runner data directory
    └── data_security/         # Security runner data directory

# Scripts
scripts/
├── check-registry.ps1        # Windows PowerShell registry check script
└── check-registry.sh         # Linux/macOS registry check script

└── docs/                      # Documentation
    ├── specs.md              # Project specifications
    ├── structure.txt         # Project structure
    ├── progress.md           # Development progress tracking
    ├── RUNNERS.md            # Gitea runners setup and management
    ├── RUNNER_LABELS.md      # Runner labels technical documentation
    ├── OPTIMIZATION_RECOMMENDATIONS.md # CI/CD optimization recommendations
    ├── CI_CD.md              # CI/CD pipeline documentation
    ├── CACHE_TROUBLESHOOTING.md # Cache troubleshooting guide
    ├── SONARQUBE_INTEGRATION.md # SonarQube integration documentation