redeemX is a next-generation Web3 marketplace for tradeable discount NFTs, built on the Solana blockchain. The platform enables users to buy, sell, redeem, and transfer exclusive deals as digital assets, revolutionizing how discounts are owned and exchanged. Designed for scalability, security, and seamless user experience, redeemX bridges real-world commerce with blockchain technology, empowering merchants and consumers alike.
- NFT-Powered Discounts: Mint, buy, sell, and redeem discounts as NFTs.
- Merchant Dashboard: Onboard merchants, create and manage deals, view analytics.
- User Dashboard: Track owned NFTs, redemption history, and transaction logs.
- Marketplace Listings: Browse, filter, and search for available deals.
- Secure Wallet Integration: Phantom/Solana wallet support for authentication and transactions.
- On-Chain Transactions: All deal and NFT actions are recorded on Solana.
- QR Code Redemption: Redeem deals in-store via QR code.
- Responsive UI: Modern, mobile-friendly design.
- Role-Based Access: Separate flows for merchants and users.
- Privacy & Compliance: GDPR-ready privacy and terms pages.
- Extensible API: RESTful endpoints for NFT minting, listing, redemption, and deal management.
- Testing Suite: Automated tests for API and core logic.
| Layer | Technology / Tool |
|---|---|
| Frontend | Next.js (App Router), React, TypeScript, Tailwind CSS |
| Blockchain | Solana Web3.js, Phantom Wallet Adapter |
| Backend | Next.js API Routes, Prisma ORM, SQLite (dev) |
| NFT Logic | Custom Solana NFT Marketplace class (solana-nft.ts) |
| Database | Prisma, SQLite (dev), ready for Postgres/MySQL |
| Testing | Jest, React Testing Library |
| Dev Tools | ESLint, Prettier, Husky, VS Code, Git |
| Deployment | Vercel, Docker-ready |
| Path | Purpose |
|---|---|
| app | Next.js app pages, layouts, API routes |
| api | RESTful API endpoints for NFTs, deals |
| dashboard | User and merchant dashboard pages |
| deals | Deals listing and details pages |
| components | Reusable React components (UI, dashboard, deals, landing, etc.) |
| ui | UI primitives (buttons, forms, modals, etc.) |
| dashboard | Dashboard-specific components |
| deals | Deal/NFT-specific components |
| landing | Landing page sections |
| layout | Layout components (navbar, footer, backgrounds) |
| marketplace | Marketplace listing components |
| shared | Shared visual components (cards, text) |
| wallet | Wallet connection modal |
| lib | Core logic: Solana NFT marketplace, types, utils, wallet context |
| hooks | Custom React hooks |
| public | Static assets (images, SVGs, logos) |
| prisma | Prisma schema and dev database |
| styles | Global CSS |
| tests | Automated test suites |
| package.json | Project dependencies and scripts |
| tsconfig.json | TypeScript configuration |
| next.config.mjs | Next.js configuration |
| postcss.config.mjs | PostCSS configuration |
- User Authentication: Users connect their Solana wallet (Phantom) to authenticate.
- Deal Creation: Merchants create deals via dashboard; deals are stored and minted as NFTs.
- NFT Minting: Users purchase deals, triggering NFT minting on Solana via solana-nft.ts.
- Marketplace Listing: NFTs can be listed for sale, transferred, or redeemed.
- Redemption: Users redeem NFTs in-store using QR codes; redemption is recorded on-chain.
- API Layer: Next.js API routes handle backend logic, interfacing with Prisma and Solana.
- Persistence: Deals and NFTs are stored in localStorage (dev) and/or database (Prisma).
- Testing: Automated tests validate API endpoints and core logic.
- Clone the repo
- Install dependencies with
pnpm install - Set up environment variables in
.env.local - Run locally:
pnpm dev
- Start the app locally:
- Access the app: Open http://localhost:3000 in your browser.
- Connect Wallet: Use Phantom wallet extension to connect and interact.
- Create/Buy Deals: Use dashboard and marketplace pages to mint, buy, redeem, or transfer NFTs.
- Push your code to GitHub.
- Import the repo in Vercel dashboard.
- Set environment variables (NEXT_PUBLIC_SOLANA_RPC_URL, etc.).
- Deploy.
For production, switch to Postgres/MySQL and update DATABASE_URL in .env. Run migrations:
- Environment Variables:
- NEXT_PUBLIC_SOLANA_RPC_URL: Solana RPC endpoint (devnet/mainnet).
- DATABASE_URL: Prisma database connection string.
- Config Files:
- next.config.mjs: Next.js settings.
- schema.prisma: Database schema.
- tsconfig.json: TypeScript options.
- postcss.config.mjs: CSS processing.
- solana-nft.ts: Core NFT minting, transfer, redemption logic using Solana Web3.js.
- components/dashboard/*: Merchant/user dashboard features.
- components/deals/*: Deal/NFT UI and logic.
- app/api/*: RESTful endpoints for NFT/deal actions.
- types.ts: TypeScript types for deals, NFTs, users.
- wallet-context.tsx: Wallet connection and context provider.
- schema.prisma: Database schema for deals, users, NFTs.
- Run all tests:
- Test coverage:
- API endpoints (api-integration.test.ts)
- Core logic (unit tests for solana-nft.ts)
- Frameworks:
- Jest, React Testing Library
- Branching: Use feature branches (feature/xyz), bugfix branches (fix/xyz).
- Commits: Write clear, atomic commit messages.
- Pull Requests: Open PRs to main, link issues, request review.
- Code Review: All PRs require review and CI pass.
- Style: Follow ESLint/Prettier rules, TypeScript strictness.
- Coding Style: Consistent TypeScript, React functional components.
- Naming Conventions: CamelCase for variables, PascalCase for components.
- Architecture: Modular, reusable components; separation of concerns.
- Git Workflow: Feature branching, atomic commits, PR reviews.
- Security: Wallet authentication, input validation, error handling.
- Testing: Automated unit and integration tests.
| Issue | Solution |
|---|---|
| Wallet not connecting | Ensure Phantom extension is installed and unlocked |
| NFT minting fails ("transaction is already") | Refresh page, ensure only one mint request per click |
| Database errors | Check DATABASE_URL and run npx prisma migrate dev |
| API route not found | Ensure Next.js server is running (npm run dev) |
| Styles not loading | Check Tailwind/PostCSS config and restart dev server |
- Multi-chain support (Ethereum, Polygon)
- Advanced analytics for merchants
- Real-time notifications
- Mobile app (React Native)
- On-chain metadata storage
- Marketplace orderbook and bidding
- OAuth/social login integration
This project is licensed under the MIT License. See LICENSE for details.
- Solana Web3.js and Phantom Wallet Adapter
- Prisma ORM
- Next.js and Vercel
- All open-source contributors and referenced libraries
- Author: Ashutosh Mishra
- Email: ashum9dev@gmail.com
- LinkedIn: linkedin.com/in/ashum9
- GitHub: github.com/ashum9
For further questions or enterprise support, please contact via email or LinkedIn.