# API Gateway Service The core API gateway for LabFusion, built with Java Spring Boot following clean code principles. ## Purpose - Central API endpoint for all frontend requests - User authentication and authorization - Dashboard and widget management - Event and device state storage - System metrics and health monitoring ## Technology Stack - **Language**: Java 17 - **Framework**: Spring Boot 3.2.0 - **Port**: 8080 - **Database**: PostgreSQL - **Message Bus**: Redis - **Documentation**: OpenAPI/Swagger - **Testing**: JUnit 5, Mockito - **Quality**: SpotBugs, Checkstyle, PMD, JaCoCo ## Features - JWT-based authentication framework - RESTful API endpoints with comprehensive documentation - WebSocket support for real-time updates - Dashboard CRUD operations - Event and device state management - System health monitoring - OpenAPI documentation generation - Comprehensive error handling - Clean code architecture with layered design ## Architecture - **Controller Layer**: REST endpoints with validation - **Service Layer**: Business logic and orchestration - **Repository Layer**: Data access abstraction - **Model Layer**: JPA entities and DTOs - **Configuration**: Spring Boot auto-configuration ## API Endpoints - `GET /actuator/health` - Health check - `GET /swagger-ui.html` - API documentation - `GET /api/dashboards` - Dashboard management - `GET /api/system/metrics` - System metrics - `POST /api/events` - Event publishing ## Development Status ✅ **Complete** - Core functionality implemented with clean code principles