Md Foysal Ahmed
Web3/Blockchain2025

ChainStore

A modern template marketplace powered by cryptocurrency payments through HOT Pay on the NEAR blockchain, offering instant access to production-ready web templates.

Next.jsTypeScriptReactSupabaseNEAR ProtocolTailwind CSSShadcn UI
ChainStore

Project Overview

ChainStore is a template marketplace where developers can purchase production-ready web templates using cryptocurrency. Built for the NEAR Protocol Hackathon, it integrates HOT Pay for seamless crypto payments on the NEAR blockchain.

The platform demonstrates how blockchain payments can power real digital commerce — with instant delivery, no middlemen, and cryptographic payment verification.

Key Features


Technologies Used

Frontend

TechnologyPurpose
Next.js 16App Router, React Server Components
React 19Modern component-based UI
Tailwind CSS v4Utility-first responsive styling
shadcn/uiAccessible, production-ready components
Lucide ReactIcon library
TypeScriptEnd-to-end type safety

Backend & Blockchain

TechnologyPurpose
SupabasePostgreSQL database, Auth, Row-Level Security
HOT PayCrypto payment processing on NEAR Protocol
NEAR ProtocolBlockchain layer for trustless payments
WebhooksPayment confirmation from HOT Pay

How It Works

  1. Browse — Explore the catalog of production-ready templates with previews
  2. Purchase — Click "Buy with Crypto" and complete payment via HOT Pay
  3. Download — Template files become instantly available in your dashboard

Each payment is recorded on the NEAR blockchain, providing full transparency and verifiability.


Architecture Highlights

Payment Flow

User clicks "Buy with Crypto"
  → POST /api/orders (creates pending purchase with unique memo UUID)
  → Redirect to HOT Pay payment page
  → User completes crypto payment on NEAR
  → HOT Pay webhook confirms transaction
  → Payment status page polls /api/orders/verify every 3 seconds
  → Purchase marked "completed", download unlocked

Database Design

Key Technical Decisions


Challenges & Solutions

1. Payment Verification Reliability

Challenge: Ensuring every crypto payment is accurately matched to the correct purchase without double-spending or missed transactions.

Solution: Implemented a unique memo (UUID) system where each purchase generates a distinct identifier. The webhook handler matches incoming payments by memo, and the polling endpoint verifies status independently. This dual-path approach ensures no payment is lost.

2. Hackathon Time Constraints

Challenge: Building a full marketplace with blockchain integration within the hackathon timeframe.

Solution: Leveraged Supabase for rapid backend setup (auth, database, RLS) and shadcn/ui for production-quality components. This allowed focusing development time on the HOT Pay integration and payment verification logic.


Results


Links


Built with Next.js 16, NEAR Protocol, Supabase, and HOT Pay for the NEAR Protocol Hackathon.