Skip to content

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽ GiftCard โ€“ Universal Crypto Gift Cards

Send crypto gift cards that can be redeemed in any cryptocurrency on any chain, powered by SideShift API v2.


๐Ÿš€ What is GiftCard?

GiftCard is a web application that enables anyone to create and send crypto gift cards that recipients can redeem in their preferred cryptocurrency on any blockchainโ€”without needing the same wallet, token, or network.

Think of it like:

  • ๐ŸŽ Amazon Gift Card, but for crypto โ€” cross-chain, instant, and simple
  • ๐Ÿ’ธ Universal gift cards that work across 200+ assets and 40+ blockchains

๐Ÿšจ The Problem We Solve

Current crypto gifting is broken:

  • โŒ Sender has ETH, receiver wants USDT
  • โŒ Sender is on Solana, receiver uses Polygon
  • โŒ Receiver may be new to crypto and confused
  • โŒ Manual swaps are confusing and risky
  • โŒ Wrong chain = funds lost forever

๐Ÿ‘‰ Crypto is powerful, but terrible for gifting.


โœ… Our Solution

GiftCard makes crypto gifting:

โœจ Chain-agnostic โ€“ Works across any blockchain
โœจ Token-agnostic โ€“ Pay with any crypto, receive any crypto
โœจ Beginner-friendly โ€“ No technical knowledge required
โœจ Non-custodial โ€“ Your keys, your crypto
โœจ Instant โ€“ Powered by SideShift for lightning-fast swaps

The sender pays with ANY crypto, and the receiver redeems in ANY crypto โ€” seamlessly powered by SideShift's cross-chain swap API.


๐Ÿ‘ฅ How It Works

๐Ÿง‘โ€๐Ÿ’ป Sender Flow (Gift Creator)

  1. Open GiftCard website
  2. Click "Create Gift Card"
  3. Enter:
    • Gift amount (e.g., $25 USD)
    • Optional personal message
    • Optional expiry date
  4. Choose payment cryptocurrency (e.g., SOL on Solana)
  5. Click "Pay"
    • SideShift API converts SOL โ†’ stable settlement asset (USDT on Tron)
  6. Gift created successfully!
    • Receive gift link
    • QR code for easy sharing
    • Shareable URL

โœ… Sender is done. No further wallet management required.


๐ŸŽ Receiver Flow (Gift Claimer)

  1. Open gift link (shared by sender)
  2. View:
    • Gift amount
    • Personal message from sender
  3. Click "Redeem Gift"
  4. Choose:
    • Preferred blockchain (Ethereum, Polygon, Solana, etc.)
    • Preferred token (USDT, MATIC, ETH, BTC, etc.)
  5. Enter wallet address
  6. Click "Claim"
    • SideShift API executes swap: Stable asset โ†’ chosen token & chain
  7. Funds arrive directly in wallet ๐ŸŽ‰

โœ… Receiver never worries about chains or swaps.


๐Ÿ”€ How SideShift Powers Our App

SideShift is not optional โ€” it powers the entire application.

๐Ÿ”น 1. Gift Creation Swap

  • Sender pays in any token
  • SideShift converts it to a stable holding asset (USDT on Tron)
  • This makes the gift value stable and chain-neutral

๐Ÿ”น 2. Gift Redemption Swap

  • Receiver selects any chain/token they prefer
  • SideShift swaps from stable asset โ†’ chosen asset
  • Direct-to-wallet delivery with no manual intervention

๐Ÿ‘‰ Zero-UI + Cross-Chain Power = Perfect UX


๐Ÿง  Why SideShift is Perfect for GiftCard

โœ… No need to build custom bridges
โœ… No DEX liquidity headaches
โœ… No custody of user funds
โœ… Direct-to-wallet swaps
โœ… Supports 200+ assets across 40+ chains
โœ… Variable & fixed-rate shifts
โœ… Built for real-world use cases like gifting

This is exactly the kind of integration SideShift was designed for.


๐Ÿงฐ Tech Stack

Frontend

  • Next.js 15 (App Router)
  • React Three Fiber (3D gift card animations)
  • Tailwind CSS + Framer Motion (Modern UI/UX)
  • Lucide Icons

Backend

  • Next.js API Routes
  • SideShift API v2 integration
  • MongoDB for gift storage

Key Features

  • Cross-chain swaps via SideShift
  • Gift tracking & status monitoring
  • QR code generation for easy sharing
  • Real-time exchange rates
  • Support for 200+ cryptocurrencies

๐Ÿ“‚ Project Structure

orchids-greetings/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ page.tsx                    # Landing page
โ”‚   โ”‚   โ”œโ”€โ”€ create/page.tsx             # Create gift card flow
โ”‚   โ”‚   โ”œโ”€โ”€ redeem/[giftId]/page.tsx    # Redeem gift card
โ”‚   โ”‚   โ”œโ”€โ”€ track/page.tsx              # Track gift status
โ”‚   โ”‚   โ””โ”€โ”€ api/
โ”‚   โ”‚       โ”œโ”€โ”€ coins/route.ts          # Get available coins
โ”‚   โ”‚       โ”œโ”€โ”€ pair/route.ts           # Get exchange rates
โ”‚   โ”‚       โ”œโ”€โ”€ qrcode/route.ts         # Generate QR codes
โ”‚   โ”‚       โ””โ”€โ”€ gifts/
โ”‚   โ”‚           โ”œโ”€โ”€ create/route.ts     # Create new gift
โ”‚   โ”‚           โ”œโ”€โ”€ [giftId]/route.ts   # Get gift details
โ”‚   โ”‚           โ””โ”€โ”€ redeem/route.ts     # Redeem gift
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ Navbar.tsx                  # Navigation component
โ”‚   โ”‚   โ”œโ”€โ”€ GiftCard3D.tsx              # 3D gift card visual
โ”‚   โ”‚   โ””โ”€โ”€ ui/                         # shadcn/ui components
โ”‚   โ””โ”€โ”€ lib/
โ”‚       โ”œโ”€โ”€ mongodb.ts                  # Database connection
โ”‚       โ”œโ”€โ”€ sideshift.ts                # SideShift API wrapper
โ”‚       โ”œโ”€โ”€ types.ts                    # TypeScript types
โ”‚       โ””โ”€โ”€ utils.ts                    # Utility functions
โ”œโ”€โ”€ .env                                # Environment variables
โ””โ”€โ”€ README.md                           # This file

๐Ÿ”ง Environment Variables

Create a .env file in the root directory:

# MongoDB Database
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/?retryWrites=true&w=majority

# SideShift API
SIDESHIFT_SECRET=your_sideshift_secret_key
SIDESHIFT_AFFILIATE_ID=your_affiliate_id
SIDESHIFT_API=https://sideshift.ai/api/v2

# Gemini AI (optional features)
GEMINI_API_KEY=your_gemini_api_key

# WalletConnect (optional wallet integration)
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_walletconnect_project_id
NEXT_PUBLIC_WC_PROJECT_ID=your_wc_project_id

# Pinata (optional NFT features)
PINATA_API_KEY=your_pinata_api_key
PINATA_SECRET_KEY=your_pinata_secret_key

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+ or Bun
  • MongoDB instance
  • SideShift API credentials

Installation

# Install dependencies
npm install
# or
bun install

# Run development server
npm run dev
# or
bun dev

Open http://localhost:3000 to see the app.


๐ŸŽจ Features

โœจ Landing Page

  • Stunning 3D animated gift card
  • Purple/green gradient theme
  • Feature highlights
  • How it works section

๐Ÿ’ณ Create Gift Card

  • Multi-step creation wizard
  • Set gift amount in USD
  • Add personalized message
  • Select payment cryptocurrency (200+ options)
  • Get deposit address for payment
  • Receive shareable gift link and QR code

๐ŸŽ Redeem Gift Card

  • View gift details and sender message
  • Choose preferred cryptocurrency to receive
  • Select preferred blockchain network
  • Enter wallet address
  • One-click redemption with automatic swap

๐Ÿ“Š Track Gift Status

  • Monitor gift card status:
    • Pending โ€“ Awaiting deposit
    • Funded โ€“ Ready to claim
    • Claimed โ€“ Successfully redeemed
    • Expired โ€“ Past expiry date

๐Ÿงช API Endpoints

GET /api/coins

Fetches all available cryptocurrencies from SideShift (200+ assets).

GET /api/pair

Gets exchange rate and limits for a trading pair.

Query params:

  • depositCoin, depositNetwork
  • settleCoin, settleNetwork

POST /api/gifts/create

Creates a new gift card.

Body:

{
  "amountUsd": 25,
  "message": "Happy Birthday!",
  "depositCoin": "SOL",
  "depositNetwork": "solana",
  "senderAddress": "wallet_address"
}

GET /api/gifts/[giftId]

Retrieves gift card details and status.

POST /api/gifts/redeem

Redeems a gift card.

Body:

{
  "giftId": "uuid",
  "redeemCoin": "USDT",
  "redeemNetwork": "polygon",
  "redeemAddress": "wallet_address"
}

GET /api/qrcode

Generates QR code for gift link.


๐Ÿงฉ How SideShift Integration Works

Gift Creation:

// 1. Get exchange rate
const pairInfo = await getPair(depositCoin, depositNetwork, 'USDT', 'tron');

// 2. Create variable shift
const shift = await createVariableShift(
  depositCoin, depositNetwork,
  'USDT', 'tron',
  settlementAddress,
  refundAddress,
  userIp
);

// 3. User deposits to shift.depositAddress
// 4. SideShift automatically swaps to USDT and holds it

Gift Redemption:

// 1. Get exchange rate for redemption
const pairInfo = await getPair('USDT', 'tron', redeemCoin, redeemNetwork);

// 2. Create redemption shift
const redeemShift = await createVariableShift(
  'USDT', 'tron',
  redeemCoin, redeemNetwork,
  receiverWalletAddress,
  undefined,
  userIp
);

// 3. SideShift swaps USDT โ†’ chosen asset
// 4. Funds delivered to receiver's wallet

๐Ÿ† Why Judges Will Love GiftCard

Criteria Why GiftCard Scores High
API Integration SideShift used twice per gift (creation + redemption)
Use Case Mass adoption potential, non-trading focused
Originality Simple idea, powerful cross-chain execution
Crypto-Native Truly cross-chain, wallet-first approach
UX Extremely easy to understand and use
Real-World Value Solves actual crypto usability problems

๐Ÿ”ฎ Future Enhancements

  • ๐ŸŽจ NFT-based gift cards
  • ๐Ÿ“ง Email / WhatsApp delivery
  • ๐Ÿข Corporate bulk gifting
  • ๐ŸŽฏ Brand partnerships
  • ๐Ÿ† DAO community rewards
  • ๐Ÿ’Ž Premium gift card designs

๐Ÿค Contributing

We welcome contributions! Feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests

๐Ÿ“„ License

This project is open source and available under the MIT License.


๐Ÿ™ Acknowledgments

  • SideShift.ai โ€“ For providing the cross-chain swap infrastructure
  • Next.js โ€“ For the amazing React framework
  • MongoDB โ€“ For reliable data storage
  • shadcn/ui โ€“ For beautiful UI components

๐Ÿ“ž Contact & Support

For questions or support:

  • Open an issue on GitHub
  • Contact the development team

Built with โค๏ธ for the SideShift Hackathon

Making crypto gifting simple, universal, and delightful.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages