Skip to content

rodolfodpk/devices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IoT Devices Management System

CI codecov License

IoT device management system built with Spring Boot 3.5.7 and reactive programming (Spring WebFlux).

Technology Stack

  • Framework: Spring Boot 3.5.7 (Java 25)
  • Reactive Stack: Spring WebFlux, Project Reactor, R2DBC
  • Database: PostgreSQL 17.2 (accessed via R2DBC)
  • Resilience: Resilience4j (Circuit Breaker, Retry, Timeout)
  • Observability: Prometheus, Grafana, Spring Boot Actuator
  • Testing: JUnit 5.12.2, Testcontainers, K6

Quick Start

Prerequisites

  • For Development: Java 25, Maven 3.9+, Docker & Docker Compose
  • For Testing Only: Java 25, Maven 3.9+ (Testcontainers provides PostgreSQL automatically)

Running the Application

# Start application with PostgreSQL
make start

# Start application with observability stack (Prometheus + Grafana)
make start-obs

# Stop application
make stop

Running Tests

# Run all tests (uses Testcontainers, no Docker Compose needed)
make test

Available URLs

Quick Commands

make start       # Start application with PostgreSQL
make test        # Run all tests (68 tests, uses Testcontainers)
make stop        # Stop all services
make logs        # Show application logs

See Development Guide for all available commands and development workflows.

Documentation

Key Features

  • Reactive Programming: Non-blocking architecture
  • Resilience Patterns: Circuit breakers, retries, timeouts
  • Observability: Structured logging, metrics, dashboards
  • API Documentation: Auto-generated Swagger UI
  • Testing: 68 tests (Testcontainers, no Docker Compose needed)
  • Performance Testing: K6 load, stress, and spike tests

Domain Model

Device States:

  • AVAILABLE - Device is available for use
  • IN_USE - Device is currently being used
  • INACTIVE - Device is no longer active in the system

Domain Rules:

  • Creation time cannot be updated
  • Name and brand cannot be updated if device is IN_USE
  • Devices in IN_USE or INACTIVE state cannot be deleted
  • INACTIVE devices can be updated (to allow reactivation)

License

This project is licensed under the MIT License. See LICENSE for details.

About

Basic CRUD using Spring reactive stack with observability, resilience and load tests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors