How lakshyar36/offline-payment works
UPI Offline Mesh is a Spring Boot demo backend plus a software mesh simulator. Its user-to-result workflow composes and encrypts a payment, gossips its packet across virtual devices, uploads it through an internet-enabled bridge, then deduplicates, decrypts, checks freshness, and settles it to the ledger. The README documents these relationships; source excerpts were not provided, so links not established there are omitted. Persistence details and production integrations are not expanded beyond the documented demo behavior.
Main entry points: DemoService.java Payment composer · BridgeIngestionService.java Bridge ingestion · dashboard.html Dashboard · SettlementService.java Settlement service
Components 18
Demo Experience
- Dashboard
src/main/resources/templates/dashboard.html - Dashboard controller
src/main/java/com/demo/upimesh/controller/DashboardController.java - Payment composer
src/main/java/com/demo/upimesh/service/DemoService.java - API controller
src/main/java/com/demo/upimesh/controller/ApiController.java
Offline Mesh
- Payment instruction
src/main/java/com/demo/upimesh/model/PaymentInstruction.java - Mesh packet
src/main/java/com/demo/upimesh/model/MeshPacket.java - Hybrid encryption
src/main/java/com/demo/upimesh/crypto/HybridCryptoService.java - Server key holder
src/main/java/com/demo/upimesh/crypto/ServerKeyHolder.java - Mesh simulator
src/main/java/com/demo/upimesh/service/MeshSimulatorService.java - Virtual device
src/main/java/com/demo/upimesh/service/VirtualDevice.java
Backend Ingestion
- Bridge ingestion
src/main/java/com/demo/upimesh/service/BridgeIngestionService.java - Idempotency claim
src/main/java/com/demo/upimesh/service/IdempotencyService.java
Settlement Ledger
- Settlement service
src/main/java/com/demo/upimesh/service/SettlementService.java - Account
src/main/java/com/demo/upimesh/model/Account.java - Account repository
src/main/java/com/demo/upimesh/model/AccountRepository.java - Transaction record
src/main/java/com/demo/upimesh/model/Transaction.java - Transaction repository
src/main/java/com/demo/upimesh/model/TransactionRepository.java
Other components
- Demo user
Connections 18
- Demo user → Dashboard: operates
README.md - Dashboard → Dashboard controller: displays
README.md - Dashboard → Payment composer: composes payment
README.md - Payment composer → Payment instruction: builds
README.md - Payment composer → Hybrid encryption: encrypts
README.md - Hybrid encryption → Server key holder: uses server key
README.md - Payment composer → Mesh packet: wraps ciphertext
README.md - Payment composer → Mesh simulator: hands off packet
README.md - Mesh simulator → Virtual device: simulates gossip
README.md - Virtual device → API controller: uploads packet
README.md - API controller → Bridge ingestion: routes ingest
README.md - Bridge ingestion → Idempotency claim: claims hash
README.md - Bridge ingestion → Hybrid encryption: decrypts packet
README.md - Bridge ingestion → Settlement service: settles fresh payment
README.md - Settlement service → Account repository: debits and credits
README.md - Account repository → Account: stores accounts
- Settlement service → Transaction repository: writes ledger
README.md - Transaction repository → Transaction record: stores record