The Future of Coupons is Here - Revolutionizing the Coupon Industry on Solana
DealChain is a Web3 discount marketplace where coupons become tradable NFTs. Built on Solana for lightning-fast transactions, true ownership, and zero platform fees.
- π« NFT Coupons - Your deals are true assets you own and control
- β‘ Instant Transactions - Powered by Solana's high-performance blockchain
- π° Zero Platform Fees - Keep 100% of your savings
- π Loyalty Rewards - Earn points and unlock tiers (Bronze β Silver β Gold β Platinum)
- β Verified Reviews - Only real buyers can review merchants
- π Tradable Assets - Buy, sell, gift, or trade your coupons freely
- π Campaign Management - Create and track discount campaigns
- π Real-time Analytics - Monitor sales, revenue, and customer engagement
- π― Targeted Marketing - Reach crypto-native customers
- π Instant Settlement - Get paid immediately in USDC
- π± Easy Onboarding - Set up campaigns in minutes
- π Global Reach - No geographical limitations
- Node.js 18+ and pnpm
- Solana wallet (Phantom, Solflare, etc.)
- Git
# Clone the repository
git clone https://github.com/pl974/dealchain.git
cd dealchain
# Install dependencies
pnpm install
# Start development server
pnpm devVisit http://localhost:3000 to see the app in action!
dealchain/
βββ apps/
β βββ web/ # Next.js frontend application
β βββ src/
β β βββ app/ # App Router pages
β β β βββ page.tsx # Landing page
β β β βββ marketplace/ # Browse deals
β β β βββ merchant/ # Merchant dashboard
β β β βββ profile/ # User profile
β β βββ components/ # React components
β β β βββ ui/ # shadcn/ui components
β β β βββ wallet/ # Wallet integration
β β β βββ layout/ # Layout components
β β βββ lib/ # Utilities
β βββ public/ # Static assets
βββ packages/
β βββ anchor/ # Solana smart contracts
β βββ programs/
β β βββ dealchain/ # Anchor program
β βββ tests/ # Contract tests
βββ CHANGELOG.md # Version history
βββ UI_UX_OVERVIEW.md # Design documentation
βββ turbo.json # Turborepo configuration
- Framework: Next.js 14 with App Router
- Language: TypeScript (strict mode)
- Styling: TailwindCSS
- Components: shadcn/ui + Radix UI
- Icons: Lucide React
- Fonts: Inter (Google Fonts)
- Network: Solana
- Framework: Anchor
- Wallet Adapter: @solana/wallet-adapter-react
- Supported Wallets: Phantom, Solflare, Torus, Ledger
- Monorepo: Turborepo
- Package Manager: pnpm
- CI/CD: GitHub Actions
- Deployment: Vercel (frontend) + Solana (contracts)
- Hero section with value proposition
- Feature showcase (6 key features)
- Stats highlights (NFT-powered, 0% fees, instant, 100% ownership)
- Call-to-action buttons
- Fully responsive with animated background
- Browse all available deals
- Search and filter functionality
- Deal cards with images, discounts, ratings
- Stock levels and expiry countdowns
- Progress bars for visual stock indicators
- Category filtering (Food, Travel, Shopping, etc.)
- Campaign management interface
- Real-time stats (revenue, sales, customers, rating)
- Campaign cards with detailed metrics
- Create deal dialog
- Edit/Delete/View campaign actions
- Low stock warnings
- Visual progress bars
- User stats and wallet info
- Loyalty tier system with progress bar
- My Deals section (owned NFT coupons)
- Transaction history with explorer links
- Copy-to-clipboard for addresses
- Redeem functionality for active coupons
- Primary: Purple gradient (crypto standard)
- Secondary: Complementary accent
- Background: Adaptive dark/light
- Muted: Subtle grays for secondary content
- Success: Green (verified, active)
- Warning: Yellow (expiring soon)
- Info: Blue (verified merchants)
- Destructive: Red (critical actions)
- Font: Inter (Google Fonts)
- Headings: Bold with gradient text
- Body: Clean 16px base
- Code: Monospace for addresses
All components built with shadcn/ui + Radix UI:
- Card (with Header, Content, Footer)
- Badge (7 variants)
- Button (5 variants, 4 sizes)
- Input (text, number, file)
- Select (dropdown with keyboard nav)
- Dialog (modals with animations)
See UI_UX_OVERVIEW.md for detailed design documentation.
# Development
pnpm dev # Start dev server (all workspaces)
pnpm dev:web # Start web app only
pnpm dev:anchor # Start Anchor localnet
# Building
pnpm build # Build all workspaces
pnpm build:web # Build web app only
pnpm build:anchor # Build Anchor program
# Testing
pnpm test # Run all tests
pnpm test:web # Test web app
pnpm test:anchor # Test smart contracts
# Linting
pnpm lint # Lint all workspaces
pnpm lint:fix # Auto-fix linting issues
# Cleaning
pnpm clean # Clean all build artifactsCreate .env.local in apps/web/:
# Solana Network
NEXT_PUBLIC_SOLANA_NETWORK=devnet
NEXT_PUBLIC_SOLANA_RPC_ENDPOINT=https://api.devnet.solana.com
# Smart Contract
NEXT_PUBLIC_PROGRAM_ID=your_program_id_here
# Optional
NEXT_PUBLIC_ANALYTICS_ID=your_analytics_idcd packages/anchor
anchor testcd apps/web
pnpm testpnpm test:e2e# Deploy to devnet
cd packages/anchor
anchor build
anchor deploy --provider.cluster devnet
# Deploy to mainnet
anchor deploy --provider.cluster mainnet-betaThe frontend is automatically deployed via GitHub Actions on push to master.
Manual deployment:
cd apps/web
pnpm build
vercel --prod- UI/UX Overview: See
UI_UX_OVERVIEW.mdfor complete design documentation - Changelog: See
CHANGELOG.mdfor version history and roadmap - Smart Contract: See
packages/anchor/programs/dealchain/for contract code - Components: See
apps/web/src/components/for component library
- Real blockchain integration (replace mock data)
- Transaction signing and confirmation flows
- Deal detail pages
- Advanced filtering and search
- Dark/Light theme toggle
- NFT redemption with QR codes
- Merchant verification process
- Review and rating system
- Points redemption
- Email/Push notifications
- Secondary marketplace for trading
- P2P trading with escrow
- Merchant analytics dashboard
- Mobile app (React Native)
- Multi-chain support
See CHANGELOG.md for detailed roadmap.
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
We follow Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
This project is licensed under the MIT License - see the LICENSE file for details.
- Solana Foundation - For the incredible blockchain platform
- Anchor - For the amazing Solana development framework
- shadcn/ui - For beautiful, accessible components
- Next.js Team - For the best React framework
- Vercel - For seamless deployments
- GitHub: github.com/pl974/dealchain
- Live Demo: [Coming Soon]
- Documentation: See project docs
- Issues: GitHub Issues
Built with π on Solana - Revolutionizing the Coupon Industry