Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tengen logo

Tengen

Tengen is a complex event processing web app for ingesting business events, evaluating configurable rules, and triggering automated webhook, email, and SMS actions.

  • Payment fraud detection — Flag unusually large payments or repeated payment failures and notify a fraud service.
  • Login security monitoring — Detect multiple failed login attempts for the same user, account, or device within a time window.
  • Order workflow tracking — Confirm that events such as order placement, payment, and fulfillment happen in the expected sequence.
  • Missing-event detection — Identify when an expected event, such as a payment confirmation or delivery update, does not arrive before a deadline.
  • Operational alerts — Monitor business activity and send webhook notifications when important thresholds or patterns are reached.

For the full guide, see the Tengen documentation. For AI-assisted queries, use the Tengen LLM reference.

Quick Start

Requirements: Docker, Java 21, Node.js, and npm.

Start PostgreSQL and RabbitMQ:

docker compose -f tengen/docker-compose.yml --profile rabbitmq up -d db rabbitmq

Start the backend in one terminal:

cd tengen
./mvnw spring-boot:run

Start the frontend in another terminal:

cd frontend
npm ci
npm run dev

Open http://localhost:3000.

Local admin credentials: admin / admin

Screenshots

Deliveries, replay, RabbitMQ connector, and API keys

Rules, rule testing, Event Explorer, and settings

Rule creation, test results, event details, and delivery details

Replay details, RabbitMQ configuration, replay history, and login

Features

  • HTTP event ingestion — Accept JSON events through the REST API using scoped API keys. Useful for application and service integrations.
  • RabbitMQ event ingestion — Consume events from a durable RabbitMQ queue through the admin-managed connector. Useful for asynchronous and broker-based workloads.
  • Condition rules — Match individual events with configurable expressions for alerts and validation.
  • Aggregate rules — Evaluate counts, sums, averages, minimums, and maximums over time windows.
  • Sequence rules — Detect ordered multi-event behavior with optional correlation keys and time windows.
  • Absence rules — Trigger when an expected follow-up event does not arrive before a deadline.
  • Grouping — Maintain independent rule state per user, account, device, or another business key.
  • Trigger controls — Configure every-match, rising-edge, once-per-window, and cooldown behavior.
  • Webhook actions — Deliver actions asynchronously with retries, dead-letter handling, delivery history, and request signing.
  • Email and SMS actions — Configure encrypted SMTP/Amazon SES SMTP or Twilio destinations, versioned templates, {{data.field}} rendering, and asynchronous delivery with retries.
  • Rule management and testing — Create, edit, enable, archive, version, restore, and test rules from the admin console.
  • API key management — Create scoped ingestion keys and safely retry events with idempotency protection.
  • Event Explorer — Search accepted events, inspect payloads, and trace rule matches and webhook actions.
  • Delivery history and retries — Inspect webhook attempts and retry failed deliveries.
  • Replay and backfill analysis — Evaluate historical events against rule revisions without changing live state or sending webhooks.
  • Event-time processing — Handle out-of-order events with watermarks and allowed-lateness controls.
  • Operational visibility — Expose health checks and Prometheus metrics for deployment monitoring.

Technology

Area Technology
Backend Java 21, Spring Boot 4.1, Spring Security, Spring Data JPA
Frontend Next.js 15, React 19, MUI 6, TanStack Query, Axios
Database PostgreSQL 17, Flyway
Messaging RabbitMQ 4
Rule engine Aviator 5.4.3
Authentication JJWT 0.12.6, httpOnly cookies, hashed API keys
Testing and observability Testcontainers, Vitest, Playwright, Prometheus

Production

Set production values in an untracked .env file or a secret manager:

SPRING_PROFILES_ACTIVE=prod
ADMIN_PASSWORD=replace-with-a-strong-password
JWT_SECRET=replace-with-a-random-secret
WEBHOOK_SIGNING_SECRET=replace-with-a-random-secret
TENGEN_CONNECTOR_MASTER_KEY=base64-encoded-random-32-byte-key
CORS_ALLOWED_ORIGINS=https://your-domain.example

TENGEN_CONNECTOR_MASTER_KEY is required before an administrator can save an email or SMS provider connection. Amazon SES is currently configured through its SMTP endpoint; SMS currently uses Twilio.

Build and start the production stack:

docker compose --env-file .env -f tengen/docker-compose.yml up --build -d

Add --profile rabbitmq when RabbitMQ is part of the deployment.

License

Tengen is released under the MIT License.

About

Tengen is a rule-based complex event processor engine made with a Spring Boot 4 API, an Aviator-powered rule engine, and a Next.js admin console for managing rules and API keys in real time.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages