GSRN 7cf0819b58
Some checks failed
Docker Build and Push / build-and-push (push) Failing after 34s
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 1m7s
API Gateway (Java Spring Boot) / test (17) (push) Failing after 1m17s
LabFusion CI/CD Pipeline / service-adapters (push) Failing after 22s
LabFusion CI/CD Pipeline / api-docs (push) Successful in 47s
API Gateway (Java Spring Boot) / test (21) (push) Failing after 2m45s
API Gateway (Java Spring Boot) / build (push) Has been skipped
API Gateway (Java Spring Boot) / security (push) Has been skipped
LabFusion CI/CD Pipeline / frontend (push) Failing after 1m46s
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
Integration Tests / integration-tests (push) Failing after 2m22s
Integration Tests / performance-tests (push) Has been skipped
feat: Enforce test requirements - fail pipeline if no tests
## Test Requirements Enforcement

### 1. Remove Dummy Test Report Fallback
- Removed dummy test report creation
- Pipeline will now fail if no test reports are generated
- Ensures proper test coverage requirements

### 2. Early Test File Validation
- Added 'Check for test files' step before test execution
- Counts test files in src/test/java/ directory
- Sets TEST_FILES_EXIST environment variable

### 3. Fail Fast for Missing Test Files
- Added 'Fail if no test files exist' step
- Fails pipeline immediately if no test files found
- Provides clear guidance on test file requirements
- Shows example of proper test file naming

### 4. Enhanced Test Report Validation
- Added 'Fail if no test reports found' step
- Fails pipeline if no test reports are generated after test execution
- Provides detailed error messages explaining possible causes
- Ensures test execution actually produces reports

### 5. Clear Error Messages
- Specific guidance on test file naming conventions
- Examples of proper test file structure
- Clear indication of what's required for pipeline success

## Pipeline Behavior
-  **Fails early** if no test files exist
-  **Fails** if tests don't generate reports
-  **Provides clear guidance** on test requirements
-  **Enforces test coverage** as a quality gate

## Expected Results
- Pipeline will fail if no test files are present
- Pipeline will fail if test execution doesn't produce reports
- Clear error messages guide developers to add proper tests
- Ensures all code changes include corresponding tests
2025-09-15 19:06:51 +02:00
2025-09-11 22:08:12 +02:00
2025-09-11 22:08:12 +02:00
2025-09-11 21:40:56 +02:00

LabFusion

A unified dashboard and integration hub for your homelab services. LabFusion provides a centralized view of your Home Assistant, Frigate, Immich, n8n, and other homelab services with real-time monitoring, data correlation, and customizable dashboards.

Features

  • Unified Dashboard: Single interface for all homelab services
  • Real-time Monitoring: System metrics, service status, and event tracking
  • Service Integration: Connect to Home Assistant, Frigate, Immich, n8n, and more
  • Data Correlation: Cross-service insights and event correlation
  • Customizable Widgets: Build dashboards with charts, tables, and status cards
  • Polyglot Architecture: Java Spring Boot API gateway with Python FastAPI adapters
  • Dockerized Deployment: Easy setup with Docker Compose

Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   React         │    │   Spring Boot   │    │   FastAPI       │
│   Frontend      │◄──►│   API Gateway   │◄──►│   Adapters      │
│                 │    │                 │    │                 │
└─────────────────┘    └─────────────────┘    └─────────────────┘
                                │                        │
                                ▼                        ▼
                       ┌─────────────────┐    ┌─────────────────┐
                       │   PostgreSQL    │    │     Redis       │
                       │   Database      │    │  Message Bus    │
                       └─────────────────┘    └─────────────────┘

Quick Start

Prerequisites

  • Docker and Docker Compose
  • Git

Installation

  1. Clone the repository:
git clone <repository-url>
cd labfusion
  1. Copy the environment configuration:
cp env.example .env
  1. Edit .env file with your service URLs and tokens:
# Update these with your actual service URLs and tokens
HOME_ASSISTANT_URL=http://homeassistant.local:8123
HOME_ASSISTANT_TOKEN=your-ha-token-here
FRIGATE_URL=http://frigate.local:5000
FRIGATE_TOKEN=your-frigate-token-here
IMMICH_URL=http://immich.local:2283
IMMICH_API_KEY=your-immich-api-key-here
  1. Start the services:
docker-compose up -d
  1. Access the application:

Services

API Gateway (Spring Boot)

  • Port: 8080
  • Purpose: Core API, authentication, user management
  • Database: PostgreSQL
  • Features: JWT authentication, dashboard management, event storage

Service Adapters (FastAPI)

  • Port: 8000
  • Purpose: Integration with external services
  • Features: Home Assistant, Frigate, Immich, n8n integrations

Frontend (React)

  • Port: 3000
  • Purpose: Dashboard UI
  • Features: Real-time updates, customizable widgets, responsive design, offline mode, clean code architecture

Database (PostgreSQL)

  • Port: 5432
  • Purpose: Persistent storage
  • Data: Users, dashboards, widgets, events, device states

Message Bus (Redis)

  • Port: 6379
  • Purpose: Inter-service communication
  • Features: Event publishing, real-time updates

API Documentation (Node.js)

  • Port: 8083
  • Purpose: Unified API documentation
  • Features: Swagger UI, service health monitoring, dynamic spec generation

Development

Backend Development

Java API Gateway

cd services/api-gateway
mvn spring-boot:run

Python Service Adapters

cd services/service-adapters
pip install -r requirements.txt
uvicorn main:app --reload

Frontend Development

cd frontend
npm install
npm start

Configuration

Service Integration

  1. Home Assistant:

    • Get your token from Profile → Long-lived access tokens
    • Update HOME_ASSISTANT_URL and HOME_ASSISTANT_TOKEN in .env
  2. Frigate:

    • Get your API key from Frigate settings
    • Update FRIGATE_URL and FRIGATE_TOKEN in .env
  3. Immich:

    • Get your API key from Immich settings
    • Update IMMICH_URL and IMMICH_API_KEY in .env

Dashboard Customization

  • Access the Settings page to configure service integrations
  • Use the dashboard builder to create custom layouts
  • Add widgets for different data sources and visualizations

API Documentation

Roadmap

  • Basic project structure and Docker setup
  • Spring Boot API gateway with authentication
  • FastAPI service adapters with modular structure
  • React frontend with dashboard
  • Unified API documentation service
  • OpenAPI/Swagger integration
  • Frontend clean code refactoring
  • Offline mode and error resilience
  • Home Assistant integration
  • Frigate integration
  • Immich integration
  • Real-time WebSocket updates
  • Advanced dashboard builder
  • Data correlation engine
  • Notification system
  • Kubernetes deployment

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For questions and support, please open an issue on GitHub.

Description
No description provided
Readme MIT 1.7 MiB
Languages
Python 45%
JavaScript 33.2%
Java 8.1%
CSS 5.4%
PowerShell 4.6%
Other 3.7%