Skip to content

Fortis-Ledger/payoova2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Payoova 2.0 - Complete Crypto Wallet Platform

A full-stack cryptocurrency wallet application similar to Redot Pay, built with React and Flask.

✨ Features

πŸ” User Features

  • Beautiful Login/Signup System - Professional crypto wallet interface
  • Multi-Network Wallet Generation - Support for Ethereum, Polygon, BSC
  • Send Crypto Functionality - Complete transaction system with validation
  • Receive Crypto - QR codes and address sharing
  • Transaction History - Track all wallet activities with filters
  • Real-time Balance Updates - Live portfolio tracking
  • Responsive Design - Works on desktop and mobile

πŸ‘¨β€πŸ’Ό Admin Features

  • User Management - Complete user oversight and control
  • Transaction Monitoring - Real-time transaction tracking with analytics
  • System Analytics - Platform statistics and insights
  • Settings Management - Complete system configuration
  • Security Controls - Advanced security and compliance features

πŸ› οΈ Tech Stack

Frontend

  • React 18 with TypeScript
  • Vite for fast development and building
  • Tailwind CSS for styling
  • Radix UI for components
  • React Router for navigation
  • Context API for state management

Backend

  • Flask with Python
  • SQLAlchemy for database ORM
  • SQLite database (production ready)
  • Flask-CORS for cross-origin requests
  • JWT Authentication for security
  • RESTful API design

πŸ“ Project Structure

payoova2/
β”œβ”€β”€ src/                          # Frontend React application
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ auth/                 # Login/Signup components
β”‚   β”‚   β”œβ”€β”€ wallet/               # Wallet functionality
β”‚   β”‚   β”œβ”€β”€ admin/                # Admin panel components
β”‚   β”‚   └── common/               # Shared components
β”‚   β”œβ”€β”€ contexts/                 # React contexts
β”‚   β”œβ”€β”€ hooks/                    # Custom React hooks
β”‚   └── App.jsx                   # Main application
β”œβ”€β”€ backend/                      # Flask backend application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ models/               # Database models
β”‚   β”‚   β”œβ”€β”€ routes/               # API routes
β”‚   β”‚   β”œβ”€β”€ static/               # Built frontend files
β”‚   β”‚   └── main.py               # Flask application
β”‚   └── requirements.txt          # Python dependencies
β”œβ”€β”€ public/                       # Static assets
β”œβ”€β”€ package.json                  # Node.js dependencies
└── README.md                     # This file

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and npm
  • Python 3.8+
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/ahmadfarazllc/payoova2.git
    cd payoova2
  2. Test Setup (Optional but Recommended)

    python test_startup.py

    This will verify that all components can be imported and the app can start.

  3. Quick Setup (Recommended)

    python start.py

    This will automatically install all dependencies and set up the project.

  4. Manual Setup

    Install frontend dependencies

    npm install --legacy-peer-deps

    Install backend dependencies

    cd backend
    python install_deps.py  # Or manually: pip install -r requirements.txt
  5. Optional: Install Web3 for Real Blockchain Functionality

    Windows Users (Easiest):

    # Double-click this file or run in command prompt
    install_web3_windows.bat

    Python Scripts:

    # Standard installation
    python install_web3.py
    
    # Conda installation (alternative)
    python install_web3_conda.py

    Manual Installation:

    # Try pre-compiled wheels first (recommended)
    pip install web3 eth-account eth-keys --only-binary=all
    
    # If that fails, try specific versions
    pip install web3==6.8.0 eth-account==0.8.0 eth-keys==0.4.0

    Note: For production, configure real RPC URLs and install web3 for blockchain features. Without this, blockchain-specific endpoints will be unavailable.

  6. Environment Configuration

    cp .env.example .env
    # Edit .env file with your configuration

Development

  1. Start the backend server

    cd backend
    source venv/bin/activate
    python src/main.py
  2. Start the frontend development server

    npm run dev
  3. Access the application

Production Build

  1. Build the frontend

    npm run build
  2. Copy built files to backend

    cp -r dist/* backend/src/static/
  3. Deploy the backend

    cd backend
    python src/main.py

πŸ”§ Configuration

Environment Variables

Create a .env file in the root directory:

# Application URLs
APP_BASE_URL=https://payoova.com
APP_DEV_URL=http://localhost:3000

# Database Configuration
DATABASE_URL=sqlite:///payoova.db

# Authentication Secrets
SESSION_SECRET=your-unique-session-secret
JWT_ACCESS_SECRET=your-jwt-access-secret
JWT_REFRESH_SECRET=your-jwt-refresh-secret

# Server Configuration
PORT=5000
NODE_ENV=development

πŸ“± Usage Guide

For Users

  1. Getting Started

    • Visit the application URL
    • Create a new account with email/password
  2. Creating Wallets

    • Navigate to Dashboard
    • Click "Generate Wallet"
    • Select network (Ethereum, Polygon, BSC)
    • Your wallet will be created instantly
  3. Sending Crypto

    • Go to Send section
    • Select source wallet and network
    • Enter recipient address and amount
    • Confirm transaction
  4. Receiving Crypto

    • Go to Receive section
    • Select network
    • Share QR code or copy address
    • Monitor incoming transactions

For Admins

  1. Access Admin Panel

    • Login with admin credentials
    • Navigate to admin dashboard
    • View system overview and statistics
  2. User Management

    • View all registered users
    • Suspend/activate accounts
    • Monitor user activities
  3. Transaction Monitoring

    • Real-time transaction tracking
    • Filter by network, status, type
    • Export transaction data

πŸ”’ Security Features

  • JWT Authentication - Secure token-based authentication
  • Private Key Encryption - All private keys are encrypted at rest
  • CORS Protection - Cross-origin request security
  • Input Validation - Comprehensive input sanitization
  • Rate Limiting - API rate limiting for security
  • Secure Headers - Security headers for web protection

🌐 API Documentation

Authentication Endpoints

  • POST /api/auth/login - User login
  • POST /api/auth/signup - User registration
  • GET /api/auth/verify - Verify authentication token
  • POST /api/auth/logout - User logout

Wallet Endpoints

  • GET /api/wallet/list - Get user wallets with balances
  • POST /api/wallet/generate - Generate new wallet
  • POST /api/wallet/send - Send cryptocurrency (legacy)
  • GET /api/wallet/transactions - Get transaction history
  • GET /api/wallet/balances - Get wallet balances
  • GET /api/wallet/prices - Get cryptocurrency prices
  • GET /api/wallet/transaction/<tx_hash>/status - Get transaction status

Simple Wallet Endpoints

  • GET /api/wallet/balance/<network> - Get wallet balance for network
  • POST /api/wallet/create/<network> - Create wallet for network
  • POST /api/wallet/transfer - Transfer cryptocurrency
  • GET /api/wallet/history/<network> - Get transaction history for network

QR Code Endpoints

  • GET /api/qr/address/<network> - Generate QR code for wallet address
  • GET /api/qr/transaction/<tx_hash> - Generate QR code for transaction
  • POST /api/qr/payment - Generate QR code for payment request
  • GET /api/qr/download/<qr_type> - Download QR code as PNG
  • POST /api/qr/validate - Validate QR code data

Admin Endpoints

  • GET /api/admin/dashboard - Get admin dashboard statistics
  • GET /api/admin/users - Get all users with pagination
  • POST /api/admin/users/<user_id>/toggle-status - Toggle user active status
  • GET /api/admin/transactions - Get all transactions with pagination
  • GET /api/admin/export/users - Export users data (CSV/Excel)
  • GET /api/admin/export/transactions - Export transactions data (CSV/Excel)
  • GET /api/admin/analytics - Get detailed system analytics

System Endpoints

  • GET /api/health - Health check endpoint

πŸš€ Deployment

Production Deployment

The application is deployed and accessible at: https://qjh9iec79z56.manus.space

Self-Hosting

  1. Build the application

    npm run build
    cp -r dist/* backend/src/static/
  2. Configure production environment

    export NODE_ENV=production
    export DATABASE_URL=your-production-db-url
  3. Start the production server

    cd backend
    python src/main.py

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

For support and questions:

πŸ”§ Troubleshooting

Common Issues

Microsoft Visual C++ Build Error (Windows)

# This error occurs when pip tries to compile packages from source

# Solution 1: Use conda (recommended for Windows)
python install_web3_conda.py

# Solution 2: Use pre-compiled wheels only
pip install web3 eth-account eth-keys --only-binary=all

# Solution 3: Install Microsoft C++ Build Tools
# Download from: https://visualstudio.microsoft.com/visual-cpp-build-tools/
# Then try: pip install web3 eth-account eth-keys

# Solution 4: Use older versions that have pre-compiled wheels
pip install web3==6.8.0 eth-account==0.8.0 eth-keys==0.4.0

ModuleNotFoundError for web3 or other dependencies

# Option 1: Use our automated installer
python install_web3.py

# Option 2: Use conda installer (Windows)
python install_web3_conda.py

# Option 3: The application works without web3 using mock data
# Just run the application - it will show a warning but work fine
python backend/src/main.py

# Option 4: Manual installation with pre-compiled wheels
pip install --upgrade pip
pip install web3 eth-account eth-keys --only-binary=all

Application runs but shows "Web3 not available" warnings

This is normal! The application is designed to work with or without web3.
- With web3: Real blockchain interactions
- Without web3: Mock data for development and testing
- All features work in both modes
- You can install web3 later when needed

Database connection issues

# Run database migration
python backend/migrations/001_initial_schema.py

# Or reset database
rm backend/src/database/app.db
python src/main.py  # This will recreate tables

Port already in use

# Kill process using port 5000
netstat -ano | findstr :5000
taskkill /PID <PID> /F

# Or change port in main.py
app.run(host='0.0.0.0', port=5001, debug=True)

Frontend build issues

# Clear node modules and reinstall
rm -rf node_modules package-lock.json
npm install --legacy-peer-deps

🎯 Roadmap

  • Real blockchain integration
  • Hardware wallet support
  • Mobile app development
  • Advanced trading features
  • DeFi protocol integration
  • Multi-language support

Built with ❀️ by the Payoova Team

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors