Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Offline UPI Mesh Payment System

This is our group project demonstrating how UPI payments could potentially work in completely offline environments (like basements or rural areas without internet).

The idea is that if you send someone money offline, your phone encrypts the payment and passes it via Bluetooth to nearby phones (a mesh network). The payment "hops" from phone to phone until someone walks into an area with internet, at which point their phone quietly uploads the transaction to the server to settle the payment.

This repository contains the backend server and a web dashboard that simulates this entire process.

Key Features

  1. Mesh Network Simulation & Dashboard We didn't use real Bluetooth hardware for this project. Instead, we built a mesh network simulator in core Java. We also built a simple HTML dashboard where you can see virtual phones gossiping payment packets to each other in real-time.

  2. Cryptographic Security Since offline payments have to hop through random strangers' phones, security was a big concern. We implemented a hybrid encryption system using Java's built-in cryptography libraries (AES-256-GCM and RSA-OAEP). This ensures that the people carrying your transaction data cannot read the amount or tamper with the receiver details.

  3. Duplicate Transaction Prevention (Idempotency) A major challenge we solved was concurrency. If two different phones happen to upload the exact same payment to the server at the exact same millisecond, the system might charge the sender twice. We solved this "duplicate storm" by building a thread-safe idempotency engine using Java's ConcurrentHashMap and SHA-256 hashing to safely drop duplicate uploads.

Technologies Used

  • Java: Core logic, multithreading, concurrency, and cryptographic functions.
  • HTML/CSS: Used for the frontend simulation dashboard.

How to Run the Project

You just need Java installed on your system.

On Windows:

mvnw.cmd spring-boot:run

On Mac/Linux:

./mvnw spring-boot:run

Once the server starts up, open your web browser and go to: http://localhost:8080

From the dashboard, you can create a test payment, run the gossip simulation to pass the packet around, and then force the "bridge" phones to upload it to the server.

License

This is an educational group project created for learning purposes.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages