This is the backend implementation of a Centralized UPI Payment Gateway system integrating blockchain, lightweight cryptography (SPECK), and quantum cryptography simulations.
The backend is built with FastAPI and PostgreSQL, providing REST APIs for:
- Merchant management
- User accounts and authentication
- Transaction processing with UPI logic
- QR code scanning and decryption
- Blockchain-based transaction recording
- Lightweight cryptography for data encryption/decryption
- A simulation of Shor's algorithm (quantum cryptography) kept separate
- Python 3.10+
- FastAPI
- SQLAlchemy ORM
- PostgreSQL
- SPECK Lightweight Cryptography
- SHA256 hashing
-
Create a
.envfile in the root with your PostgreSQL connection string, e.g.:
DATABASE_URL=postgresql://username:password@localhost:5432/yourdb -
Install dependencies:
pip install -r requirements.txt -
Run the server locally:
uvicorn main:app --reload -
Access API docs at:
http://localhost:8000/docs
- The Shor's algorithm quantum simulation is kept separate for demonstration and is not part of the live API.
- This backend is under active development and currently supports only core UPI transaction flows.