Skip to content

Moses-main/paypruf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

35 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PayPruf β€” Flare Network Payment Verification

License: MIT Built on Flare

PayPruf is a decentralized solution for generating and verifying audit-grade payment proofs on the Flare Network. It creates immutable, shareable payment confirmations to reduce disputes and ambiguity in crypto transactions.


πŸ“‹ Table of Contents


✨ Features

  • πŸ”— Shareable Proof Links Generate public, read-only URLs for Flare payments.

  • πŸ” On-Chain Verification Payments are verifiable directly on the Flare blockchain.

  • πŸ“„ Human-Readable Receipts Clear transaction details with timestamps and references.

  • πŸ“¦ Downloadable Proof Bundles ISO-aligned records available in PDF / JSON formats.

  • βœ… Counterparty Acknowledgement (Optional) Recipients can acknowledge payment receipt.

  • πŸ›‘οΈ Immutable Anchoring Proof hashes are anchored on Flare for auditability.

πŸŽ₯ Video Demonstration

Watch the application in action:

PayPruf Demo

Click the image above to watch the full demo on YouTube


πŸ— Architecture

System Flow

flowchart TD
    A[User Initiates Payment]
    --> B[Flare Network Transaction]
    --> C[Transaction Confirmed]
    --> D[Generate ProofRails Record]
    --> E[Anchor Proof Hash on Flare]
    --> F[Generate Shareable Proof Link]
    --> G[Recipient Views Proof]
    --> H[Optional: Acknowledge Receipt]
Loading

🧰 Tech Stack

Frontend

  • Framework: React 18 + TypeScript
  • Build Tool: Vite
  • Styling: Tailwind CSS, shadcn/ui
  • State Management: React Query
  • Forms & Validation: React Hook Form + Zod
  • Web3: Wagmi + Viem
  • UI Components: Radix UI
  • Charts: Recharts

Backend

  • Runtime: Node.js
  • Framework: Express.js
  • Database: PostgreSQL + Prisma ORM
  • Blockchain: Viem, Ethers.js
  • Auth: JWT
  • Logging: Winston
  • Validation: express-validator

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm 9+
  • PostgreSQL 14+
  • Flare RPC endpoint
  • MetaMask or compatible Web3 wallet

πŸ“¦ Installation

Clone the Repository

git clone https://github.com/Moses-main/paypruf.git
cd paypruf

Install Frontend Dependencies

npm install

Set Up Backend

cd server
npm install
cp .env.example .env

Configure environment variables, then run:

npx prisma generate
npx prisma migrate dev --name init

Start Development Servers

# Frontend
npm run dev
# Backend
cd server
npm run dev

πŸ›  Project Structure

paypruf/
β”œβ”€β”€ src/                    # Frontend
β”‚   β”œβ”€β”€ components/         # UI components
β”‚   β”œβ”€β”€ hooks/              # Custom hooks
β”‚   β”œβ”€β”€ lib/                # Utilities
β”‚   β”œβ”€β”€ pages/              # App pages
β”‚   └── types/              # Type definitions
β”‚
└── server/                 # Backend
    β”œβ”€β”€ prisma/             # Database schema
    β”œβ”€β”€ src/
    β”‚   β”œβ”€β”€ controllers/    # Request handlers
    β”‚   β”œβ”€β”€ middleware/     # Express middleware
    β”‚   β”œβ”€β”€ routes/         # API routes
    β”‚   └── services/       # Business logic
    └── .env                # Environment config

πŸ”§ Configuration

Frontend (.env)

VITE_FLARE_NETWORK_RPC=https://flare-api.flare.network/ext/bc/C/rpc
VITE_WALLET_CONNECT_PROJECT_ID=your_walletconnect_id
VITE_API_URL=http://localhost:3001

Backend (.env)

DATABASE_URL="postgresql://user:password@localhost:5432/paypruf"
FLARE_NETWORK_RPC=https://flare-api.flare.network/ext/bc/C/rpc
JWT_SECRET=your_jwt_secret
PORT=3001

πŸ“š API Reference

Generate Payment Proof

POST /api/proof/generate
Content-Type: application/json
{
  "txHash": "0x...",
  "sender": "0x...",
  "recipient": "0x...",
  "amount": "1.5",
  "token": "FLR",
  "memo": "Invoice #123"
}

Verify Payment Proof

GET /api/proof/verify/:proofId

Returns a public, read-only payment proof with Flare verification status.


🀝 Contributing

  1. Fork the repository

  2. Create a feature branch

    git checkout -b feature/AmazingFeature
  3. Commit your changes

    git commit -m "Add AmazingFeature"
  4. Push to the branch

    git push origin feature/AmazingFeature
  5. Open a Pull Request


πŸ“„ License

Distributed under the MIT License. See LICENSE for more information.


πŸ™ Acknowledgments

  • Flare Network β€” blockchain infrastructure
  • ProofRails β€” ISO-aligned payment records
  • Open-source contributors and the Web3 community

About

PayPruf is a Flare-native proof-of-payment platform that generates ISO-aligned, audit-grade payment receipts and shareable verification links for on-chain transactions, reducing disputes in crypto payments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors