Crypto Pay — On-Chain Payment Gateway MVP

Crypto Pay is a full-stack crypto payment gateway MVP that allows users to sign in with Ethereum, create payment invoices, submit Sepolia payments through MetaMask or WalletConnect, and monitor payment activity through a public read-only admin dashboard.

The project was built as a production-style monorepo using Next.js, NestJS, Prisma, Solidity, Hardhat, Docker, GitHub Actions, GHCR, and Azure App Service.

Overview

The goal of this project was to build a realistic on-chain payment flow from end to end:

  1. A user connects a wallet.
  2. The user signs in with an Ethereum signature.
  3. The frontend creates a payment invoice.
  4. The user submits an on-chain Sepolia payment.
  5. The backend verifies the transaction hash through RPC.
  6. The invoice status is updated and displayed in an admin dashboard.

Key Features

Wallet Authentication

I implemented a wallet-based login flow using nonce-based signature verification and JWT sessions. The app supports MetaMask on desktop and WalletConnect on mobile, with Sepolia network detection and user guidance for wrong-network states.

On-Chain Payment Flow

Users can create a payment invoice and complete the payment through MetaMask on Sepolia. The frontend interacts with a deployed Solidity PaymentGateway contract, while the backend verifies submitted transaction hashes using an EVM RPC provider.

Backend Transaction Verification

The backend checks the submitted transaction hash, verifies the chain, destination contract, payer address, amount, receipt status, and payment status before marking an invoice as paid. This prevents simply trusting the frontend after a user submits a transaction hash.

Public Read-Only Admin Dashboard

The deployed admin dashboard is publicly viewable in read-only demo mode so portfolio reviewers can inspect payment records, statuses, payer addresses, transaction hashes, and confirmations without needing an admin wallet.

Operational actions such as CSV export and future write operations are restricted to admin-wallet authentication.

CI/CD and Cloud Deployment

The frontend and backend are containerized with Docker and deployed to Azure App Service. GitHub Actions runs CI checks, builds Docker images, publishes them to GHCR, deploys containers to Azure, and performs smoke checks against the deployed services.


Architecture

The application uses a full-stack TypeScript architecture with an EVM smart contract layer.

  • Next.js handles the wallet UX, invoice creation flow, and admin dashboard.
  • NestJS exposes REST APIs for authentication, invoices, payment confirmation, and admin data.
  • Prisma manages invoice persistence.
  • Solidity and Hardhat power the PaymentGateway smart contract.
  • Sepolia RPC is used for transaction verification.
  • Docker, GHCR, GitHub Actions, and Azure App Service provide the deployment pipeline.

Tech Stack

  • Frontend: Next.js 15, React, TypeScript, wagmi, viem, WalletConnect, MetaMask
  • Backend: NestJS, TypeScript, Prisma, JWT, ethers.js/RPC verification, Helmet, rate limiting, audit logging
  • Blockchain: Solidity, Hardhat, OpenZeppelin, Sepolia, PaymentGateway smart contract
  • DevOps: PNPM workspaces, Docker, GitHub Actions, GHCR, Azure App Service

Technical Highlights

  • Built a monorepo-based full-stack dApp with TypeScript across frontend and backend.
  • Implemented Sign-In with Ethereum style authentication using nonce issuance, wallet signature verification, and JWT sessions.
  • Developed a Solidity PaymentGateway contract supporting native ETH and ERC-20 compatible payment design.
  • Added token whitelist seeding to prevent unsupported token payments.
  • Implemented backend transaction verification through Sepolia RPC instead of trusting frontend state.
  • Built a responsive admin dashboard with filters, sorting, Etherscan transaction links, and protected CSV export.
  • Improved mobile dApp UX with WalletConnect support, Sepolia guidance, loading states, and recovery flows.
  • Deployed Dockerized frontend and backend containers to Azure App Service through GitHub Actions CI/CD.