Skip to content

Shivam-Shukl/upi_transaction_simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UPI Transaction Simulator (PhonePe Mini Clone)

A Flask-based UPI payment simulation system that mimics core digital payment features.

Features

  • User Registration & Authentication
  • Secure Password Hashing
  • Money Transfer via UPI ID
  • Balance Checking
  • Transaction History
  • MySQL Database Integration

Setup Instructions

  1. Clone Repository

    git clone <your-repo-url>
    cd upi_transaction_simulator
  2. Install Dependencies

    pip install -r requirements.txt
  3. Setup MySQL Database

    • Create database: CREATE DATABASE upi_db;
    • Run the SQL commands provided in the code comments
  4. Configure Environment

    • Copy .env.example to .env
    • Update database credentials
  5. Run Application

    python app.py

API Endpoints

Authentication

  • POST /api/auth/register - User registration
  • POST /api/auth/login - User login

Wallet Operations

  • GET /api/wallet/balance/<upi_id> - Check balance
  • POST /api/wallet/transfer - Transfer money
  • GET /api/wallet/history/<upi_id> - Transaction history

Technology Stack

  • Backend: Flask (Python)
  • Database: MySQL
  • Password Security: flask-bcrypt
  • Environment Management: python-dotenv

Project Structure

upi_transaction_simulator/
├── app.py              # Main Flask application
├── db.py               # Database connection
├── models/
│   ├── user.py         # User model
│   └── transaction.py  # Transaction model
├── routes/
│   ├── auth.py         # Authentication routes
│   └── transaction.py  # Transaction routes
├── utils/
│   └── helpers.py      # Utility functions
├── .env                # Environment variables
├── requirements.txt    # Dependencies
└── README.md          # Documentation

Testing with Postman

Import the sample API calls provided in the code comments to test all endpoints.

Future Enhancements

  • JWT Authentication
  • Rate Limiting
  • Transaction Status Updates
  • Payment Gateway Integration
  • Frontend UI """

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages