$ show rememberber/WePush
WePush is a Java application monorepo with two coexisting generations of a multi-channel bulk messaging system. The legacy `src/main` tree is a Swing desktop client that manages accounts, message templates, recipient lists, tasks, and run history, and sends via WeChat (official accounts, mini programs, WeCom), SMS vendors, email, HTTP, DingTalk/Feishu bots, and carrier SMS protocols (CMPP/SMGP/SGIP/SMPP). It persists to SQLite through MyBatis and generates UI with IntelliJ GUI Designer forms. The `next/` tree is a modular, distributed push orchestration platform: a Spring Boot control plane (REST + gRPC), remote agents connected via an mTLS gRPC stream, a provider SPI with built-in HTTP, Aliyun SMS, SMTP, WeChat, and bot providers, and pluggable signed PF4J plugins for carrier protocols. It adds multi-tenant workspaces, secret envelope encryption, artifact storage (local/S3), audience streaming import, run state machines with idempotency and retry, schedule management, a React/Vite web UI, an Electron desktop shell, and a Java SDK. Persistence is SQLite for standalone mode or PostgreSQL for server mode, with Flyway migrations and JDBC repositories. The Next codebase is well-architected with core-api/engine/provider-spi/service/domain/infrastructure separation, ADRs, architecture tests, integration tests, CI, and installers. However, the repository as a whole carries the legacy desktop codebase in parallel, duplicating several domain concepts and retaining generated UI code and older dependencies. This split and the aging legacy portions are the main sources of technical debt.
The LLM identified 5 files worth highlighting for reuse:
Defines the provider SPI contract (descriptor, validation, connection test, session opening) that decouples messaging channels from the execution engine. Any channel can be added by implementing this interface, making it a reusable extension point for generic push/notification systems.
Core engine that streams recipients, applies execution policies (concurrency, rate limit, exponential backoff with jitter, timeout, retry), supports pause/resume/cancel, and reports per-item results and events. It is tested against large-scale runs and is sufficiently isolated to be reused as a batch execution kernel outside WePush.
Implements X25519 key agreement plus AES-GCM sealing for lease-bound secret delivery between service and agent. This is a reusable secure-envelope pattern for distributing credentials to remote workers without exposing secrets to the transport.
Manages per-account OkHttp connection pools with protocol selection and latency/connection-reuse metrics including percentiles. This self-contained infrastructure utility can be lifted into any Java service needing metered, isolated HTTP clients.
Accumulates rows and flushes them to SQLite in configurable batches with an AutoCloseable lifecycle. A practical, extractable pattern for high-volume recipient/audience ingestion without ORM overhead.