EchoChat
Real-time WebSocket chat rooms with built-in @gemini AI.
Real-time WebSocket chat rooms with built-in @gemini AI.
Real-time collaboration platform built with Spring Boot WebSockets and Redis multi-instance sync. Supports instant public rooms, password-protected private rooms, automatic 60-minute idle cleanup, and an integrated @gemini AI assistant.
Security-hardened CLI for auditing and verifying JWTs.
Developer CLI (jwti) for inspecting, verifying, linting, and diffing JSON Web Tokens across auth flows and CI/CD pipelines. Enforces strict algorithm allowlists, supports SSRF-protected remote JWKS, and detects leaked PII or weak secrets.
Cryptographic password Chrome extension.
Manifest V3 Chrome extension built with TypeScript and esbuild for generating strong passwords directly in the browser. Uses Web Crypto crypto.getRandomValues() with unbiased Fisher-Yates shuffling and guaranteed character-class rules.
Personal finance platform with Keycloak SSO and Gemini AI.
Personal finance management platform built with Spring Boot 3, React 19, and PostgreSQL for cash-flow analysis and multi-horizon savings goal tracking. Secures authentication with Keycloak OAuth2/OIDC SSO and surfaces tailored financial insights via Google Gemini.
Resilient HTTP health monitor with backoff retries.
Self-hosted Java 21 and Spring Boot health monitor that polls configurable HTTP(S) endpoints on isolated worker pools. Prevents false alarms with consecutive-check state machines, retries failures with exponential backoff, and stores recent history in ring buffers.
Real-time filesystem monitor with streaming file hashing.
Self-hosted filesystem sentry watching directories via debounced watch events and indexing metadata in PostgreSQL. Streams multi-gigabyte files through a backpressure-aware hash worker pool in constant memory to flag tampering, duplicates, and trigger quarantine policies.
A lightweight HTTP(S) uptime monitoring daemon with flap prevention, exponential backoff, and Actuator telemetry.
Used fixed-capacity circular ring buffers and consecutive failure thresholds to guard memory and prevent transient alert flapping.
HTTP-Medic is a self-hosted, lightweight, and resilient HTTP health checker built with Java 21 and Spring Boot 3.x. It continuously monitors configurable HTTP(S) endpoints, tracks health states with threshold-based flap prevention, executes retries with exponential backoff, stores in-memory history using a ring buffer, and exposes a clean REST API and Actuator health endpoints.
ThreadPoolTaskScheduler and dispatched to an isolated worker thread pool.UNKNOWN, HEALTHY, and UNHEALTHY only occur after configurable consecutive successes/failures to prevent flapping on transient blips.maxRetries with exponential backoff (initialBackoffMs * (multiplier ^ attempt)) before registering as a failure.CircularHistoryBuffer) retains the last $N$ check results in memory without unbounded memory growth.application.yml or loaded/mounted from an external targets.yaml via TARGETS_CONFIG_PATH.$PORT, includes Actuator health endpoints (/actuator/health), explicit CORS configuration, and a multi-stage Dockerfile.src/main/java/com/httpmedic/
├── api/
│ ├── dto/
│ │ ├── CheckResultDto.java
│ │ ├── StateTransitionDto.java
│ │ ├── TargetDetailDto.java
│ │ └── TargetSummaryDto.java
│ └── StatusController.java
├── checker/
│ └── HttpEndpointChecker.java
├── config/
│ ├── CheckerProperties.java
│ ├── ConcurrencyConfig.java
│ ├── CorsConfig.java
│ ├── CorsProperties.java
│ ├── ExternalTargetConfigLoader.java
│ ├── RetryProperties.java
│ ├── TargetProperties.java
│ └── WebClientConfig.java
├── scheduler/
│ └── TargetSchedulerManager.java
├── state/
│ ├── CheckResult.java
│ ├── CircularHistoryBuffer.java
│ ├── HealthStateManager.java
│ ├── HealthStatus.java
│ ├── StateTransition.java
│ └── TargetHealthState.java
└── HttpMedicApplication.java
# Clone the repository
git clone https://github.com/your-org/http-medic.git
cd http-medic
# Run tests
./mvnw clean test
# Run application
./mvnw spring-boot:run
The service will start on http://localhost:8080 (or the port specified by $PORT).
Targets can be specified in application.yml or in an external YAML file pointed to by the TARGETS_CONFIG_PATH environment variable.
| Field | Type | Default | Description |
|---|---|---|---|
name | String | Required | Unique target identifier |
url | String | Required | HTTP or HTTPS endpoint |
method | String | GET | HTTP method (GET or HEAD) |
intervalSeconds | Integer | 30 | Check interval in seconds |
timeoutMs | Integer | 5000 | Request timeout in milliseconds |
expectedStatusCodes | List<Integer> | [200-208, 226] | Accepted HTTP status codes |
expectedBodyContains | String | null | Substring or regex pattern expected in response body (for GET) |
failureThreshold | Integer | 3 | Consecutive failures needed to transition to UNHEALTHY |
successThreshold | Integer | 2 | Consecutive successes needed to transition to HEALTHY |
retry.maxRetries | Integer | 2 | Number of retry attempts per check execution |
retry.initialBackoffMs | Long | 500 | Initial retry backoff in ms |
retry.multiplier | Double | 2.0 | Multiplier for exponential backoff |
retry.maxBackoffMs | Long | 3000 | Upper limit for retry backoff delay in ms |
targets.yamltargets:
- name: "production-api"
url: "https://api.example.com/health"
method: "GET"
intervalSeconds: 15
timeoutMs: 3000
expectedStatusCodes: [200]
expectedBodyContains: "UP"
failureThreshold: 3
successThreshold: 2
retry:
maxRetries: 2
initialBackoffMs: 500
multiplier: 2.0
maxBackoffMs: 2000
- name: "auth-service"
url: "https://auth.example.com/.well-known/openid-configuration"
method: "HEAD"
intervalSeconds: 30
timeoutMs: 4000
expectedStatusCodes: [200, 204]
failureThreshold: 2
successThreshold: 1
Returns health state, last check details, and rolling uptime percentage for all configured targets.
curl -s http://localhost:8080/api/status
Response (200 OK):
[
{
"name": "example-http-service",
"status": "HEALTHY",
"url": "https://httpbin.org/status/200",
"method": "GET",
"lastChecked": "2026-08-30T17:35:10.123Z",
"lastResponseTimeMs": 142,
"lastStatusCode": 200,
"uptimePercentage": 100.0,
"consecutiveSuccesses": 4,
"consecutiveFailures": 0
}
]
Returns detailed status, configuration summary, recent checks, and state transition history for a single target.
curl -s http://localhost:8080/api/status/example-http-service
Response (200 OK):
{
"name": "example-http-service",
"status": "HEALTHY",
"url": "https://httpbin.org/status/200",
"method": "GET",
"intervalSeconds": 15,
"timeoutMs": 4000,
"expectedStatusCodes": [200, 204],
"expectedBodyContains": null,
"failureThreshold": 3,
"successThreshold": 2,
"lastChecked": "2026-08-30T17:35:10.123Z",
"lastResponseTimeMs": 142,
"lastStatusCode": 200,
"uptimePercentage": 100.0,
"consecutiveSuccesses": 4,
"consecutiveFailures": 0,
"recentChecks": [
{
"timestamp": "2026-08-30T17:35:10.123Z",
"success": true,
"httpStatusCode": 200,
"responseTimeMs": 142,
"attemptCount": 1,
"errorMessage": null
}
],
"transitionHistory": [
{
"fromState": "UNKNOWN",
"toState": "HEALTHY",
"timestamp": "2026-08-30T17:34:40.050Z",
"reason": "Success threshold met (2/2)",
"consecutiveCount": 2
}
]
}
Returns the last $N$ checks for a target (newest first).
curl -s "http://localhost:8080/api/status/example-http-service/history?limit=10"
Response (200 OK):
[
{
"timestamp": "2026-08-30T17:35:10.123Z",
"success": true,
"httpStatusCode": 200,
"responseTimeMs": 142,
"attemptCount": 1,
"errorMessage": null
},
{
"timestamp": "2026-08-30T17:34:55.101Z",
"success": true,
"httpStatusCode": 200,
"responseTimeMs": 150,
"attemptCount": 1,
"errorMessage": null
}
]
Used by hosting platforms (Render, Railway) for service liveness checks.
curl -s http://localhost:8080/actuator/health
Response (200 OK):
{
"status": "UP"
}
# Build Docker image
docker build -t http-medic:latest .
# Run container with default targets
docker run -d -p 8080:8080 --name http-medic http-medic:latest
# Run container with custom mounted targets.yaml
docker run -d -p 8080:8080 \
-e TARGETS_CONFIG_PATH=/config/targets.yaml \
-v $(pwd)/targets.example.yaml:/config/targets.yaml:ro \
--name http-medic http-medic:latest
docker compose up -d
HttpEndpointChecker vs Interface:
HttpEndpointChecker is implemented as a direct concrete component rather than an interface with a single implementation. Since HTTP/HTTPS is the exclusive protocol in scope, an interface layer would represent unused indirection.CircularHistoryBuffer. This removes any external database dependency for lightweight, zero-maintenance single-container deployments.checker-sched-) and HTTP network executions (checker-exec-) run on separated thread pools with mandatory timeouts. A stalled target endpoint will never exhaust scheduler threads or delay checks for other endpoints.