Skip to content

Anugo1/Attest-Nft

Repository files navigation

Attest Logo

Attest

On-Chain Attendance System for the Solana Ecosystem

Built with React Powered by Solana TypeScript Metaplex

Features โ€ข Quick Start โ€ข Tech Stack โ€ข Documentation โ€ข Roadmap


๐ŸŽฏ What is Attest?

Attest is a decentralized proof-of-attendance protocol built on Solana that enables event organizers to create verifiable, on-chain attendance records through NFTs. Whether you're hosting a conference, workshop, meetup, or virtual event, Attest provides a seamless way to reward attendees with unique, collectible NFTs that prove their participation.

Why Attest?

  • ๐Ÿ” Verifiable Attendance: Immutable on-chain proof that can't be forged or duplicated
  • โšก Lightning Fast: Built on Solana for instant minting and low transaction costs
  • ๐ŸŽจ Customizable: Create unique NFT designs for each event
  • ๐Ÿ“ฑ Mobile-Friendly: QR code-based claiming for seamless check-ins
  • ๐ŸŒ Decentralized: No centralized authority controls your attendance records
  • ๐Ÿ’ฐ Cost-Effective: Minimal fees compared to other blockchain solutions

โœจ Features

For Event Organizers

  • ๐ŸŽซ Create Events: Set up events with custom details, images, and claim codes
  • ๐Ÿ“Š Dashboard: Track attendance metrics and claim statistics in real-time
  • ๐Ÿ”— QR Code Generation: Automatically generate shareable QR codes for easy claiming
  • ๐ŸŽจ Custom NFT Metadata: Design unique NFT artwork and metadata for each event
  • ๐Ÿ‘ฅ Attendee Management: View who claimed NFTs and when

For Attendees

  • ๐Ÿ‘› Wallet Integration: Connect with Phantom, Solflare, Backpack, and other Solana wallets
  • ๐Ÿ“ธ QR Code Scanning: Quick claim process via QR code
  • ๐Ÿ”’ Signature Verification: Prove wallet ownership through message signing
  • ๐ŸŽ Instant NFT Minting: Receive your attendance NFT immediately
  • ๐Ÿ–ผ๏ธ NFT Gallery: View all your collected attendance NFTs in your wallet

Technical Features

  • ๐Ÿ”„ Dual Backend Support: Works with both Node.js/MongoDB and Supabase
  • ๐ŸŒ REST API: Clean, documented API for integrations
  • ๐ŸŽจ Modern UI: Beautiful interface built with shadcn/ui and Tailwind CSS
  • ๐Ÿ“ฑ Responsive Design: Works seamlessly on desktop and mobile
  • ๐Ÿ” Secure: No private keys stored, wallet-based authentication

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+ and npm
  • MongoDB (local or Atlas) OR Supabase account
  • Solana Wallet (Phantom recommended)
  • Devnet SOL for testing (get from Solana Faucet)

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/event-beacon.git
    cd event-beacon
  2. Install frontend dependencies

    npm install
  3. Install backend dependencies

    cd backend
    npm install
    cd ..
  4. Set up MongoDB (if using Node.js backend)

    # Windows (using Chocolatey)
    choco install mongodb
    
    # Start MongoDB
    mongod --dbpath C:\data\db
  5. Configure environment variables

    Frontend (.env in root):

    VITE_USE_LOCAL_API=false
    VITE_API_URL=http://localhost:5000

    Backend (backend/.env):

    MONGODB_URI=mongodb://localhost:27017/attest
    SOLANA_RPC_URL=https://api.devnet.solana.com
    SOLANA_PAYER_SECRET_KEY=your_base58_secret_key_here
    PORT=5000
    FRONTEND_URL=http://localhost:8080
  6. Start the development servers

    Terminal 1 - Backend:

    cd backend
    npm run dev

    Terminal 2 - Frontend:

    npm run dev
  7. Open your browser

    Navigate to http://localhost:8080 and connect your Solana wallet!

๐Ÿ“š For detailed setup instructions, see:


๐Ÿ› ๏ธ Tech Stack

Frontend

  • Framework: React 18.3 + TypeScript 5.8
  • Build Tool: Vite 5.4
  • Styling: Tailwind CSS 3.4 + shadcn/ui components
  • UI Components: Radix UI primitives
  • Routing: React Router 6.30
  • State Management: TanStack Query (React Query)
  • Forms: React Hook Form + Zod validation
  • Icons: Lucide React

Blockchain

  • Network: Solana (Devnet/Mainnet)
  • SDK: @solana/web3.js 1.98
  • Wallet Adapters: Phantom, Solflare, Backpack, Torus
  • NFT Standard: Metaplex Token Metadata (MPL)
  • Token Program: SPL Token

Backend (Node.js)

  • Runtime: Node.js + Express
  • Database: MongoDB + Mongoose
  • NFT Minting: Metaplex Foundation SDK
  • Image Processing: Sharp
  • CORS: Configured for cross-origin requests

Backend (Alternative - Supabase)

  • Database: PostgreSQL
  • Functions: Deno Edge Functions
  • Authentication: Supabase Auth
  • Storage: Supabase Storage

Development Tools

  • Linting: ESLint 9
  • Package Manager: npm / Bun
  • Version Control: Git
  • Deployment: Vercel (frontend), Render/Railway (backend)

๐Ÿ“ Project Structure

event-beacon/
โ”œโ”€โ”€ src/                          # Frontend source code
โ”‚   โ”œโ”€โ”€ components/               # React components
โ”‚   โ”‚   โ”œโ”€โ”€ CreateEventForm.tsx   # Event creation form
โ”‚   โ”‚   โ”œโ”€โ”€ ClaimNFT.tsx         # NFT claiming interface
โ”‚   โ”‚   โ””โ”€โ”€ ...                   # UI components (buttons, cards, etc.)
โ”‚   โ”œโ”€โ”€ pages/                    # Route pages
โ”‚   โ”‚   โ”œโ”€โ”€ Index.tsx            # Landing page
โ”‚   โ”‚   โ”œโ”€โ”€ Events.tsx           # Events listing
โ”‚   โ”‚   โ”œโ”€โ”€ EventDetail.tsx      # Single event view
โ”‚   โ”‚   โ”œโ”€โ”€ CreateEvent.tsx      # Create event page
โ”‚   โ”‚   โ””โ”€โ”€ Claim.tsx            # Claim NFT page
โ”‚   โ”œโ”€โ”€ contexts/                 # React contexts
โ”‚   โ”‚   โ””โ”€โ”€ WalletContext.tsx    # Solana wallet provider
โ”‚   โ”œโ”€โ”€ hooks/                    # Custom React hooks
โ”‚   โ”œโ”€โ”€ lib/                      # Utilities and API clients
โ”‚   โ”‚   โ”œโ”€โ”€ api-adapter.ts       # Backend abstraction layer
โ”‚   โ”‚   โ””โ”€โ”€ utils.ts             # Helper functions
โ”‚   โ””โ”€โ”€ integrations/             # Third-party integrations
โ”‚       โ””โ”€โ”€ supabase/            # Supabase client (optional)
โ”œโ”€โ”€ backend/                      # Node.js backend
โ”‚   โ””โ”€โ”€ src/
โ”‚       โ”œโ”€โ”€ models/               # MongoDB schemas
โ”‚       โ”‚   โ”œโ”€โ”€ Event.js         # Event model
โ”‚       โ”‚   โ””โ”€โ”€ Claim.js         # Claim model
โ”‚       โ”œโ”€โ”€ routes/               # API routes
โ”‚       โ”‚   โ”œโ”€โ”€ events.js        # Event endpoints
โ”‚       โ”‚   โ”œโ”€โ”€ claims.js        # Claim endpoints
โ”‚       โ”‚   โ””โ”€โ”€ mint.js          # NFT minting endpoint
โ”‚       โ”œโ”€โ”€ lib/                  # Backend utilities
โ”‚       โ”‚   โ”œโ”€โ”€ solana.js        # Solana connection
โ”‚       โ”‚   โ””โ”€โ”€ metaplex.js      # NFT minting logic
โ”‚       โ””โ”€โ”€ server.js            # Express server
โ”œโ”€โ”€ public/                       # Static assets
โ”‚   โ”œโ”€โ”€ logo.png                 # App logo
โ”‚   โ””โ”€โ”€ favicon.ico              # Favicon
โ”œโ”€โ”€ docs/                         # Documentation
โ”‚   โ”œโ”€โ”€ INSTALLATION.md          # Setup guide
โ”‚   โ”œโ”€โ”€ LOCAL_TESTING.md         # Testing guide
โ”‚   โ”œโ”€โ”€ SOLANA_SETUP.md          # Solana configuration
โ”‚   โ””โ”€โ”€ CODEBASE_ANALYSIS.md     # Architecture overview
โ””โ”€โ”€ package.json                  # Dependencies

๐Ÿ”„ How It Works

Event Creation Flow

graph LR
    A[Organizer] -->|Connects Wallet| B[Create Event]
    B -->|Fills Form| C[Submit Event]
    C -->|Generates| D[Claim Code + QR]
    D -->|Share| E[Attendees]
Loading
  1. Organizer connects their Solana wallet
  2. Creates an event with details (name, description, image, date)
  3. System generates a unique claim code and QR code
  4. Organizer shares the code/QR with attendees

Claiming Flow

graph LR
    A[Attendee] -->|Scans QR/Enters Code| B[Event Page]
    B -->|Connects Wallet| C[Sign Message]
    C -->|Verified| D[Mint NFT]
    D -->|Success| E[NFT in Wallet]
Loading
  1. Attendee scans QR code or enters claim code
  2. Connects their Solana wallet (Phantom, Solflare, etc.)
  3. Signs a verification message to prove ownership
  4. Backend mints NFT using Metaplex
  5. NFT appears in attendee's wallet immediately

Technical Flow

Frontend (React) โ†’ API Adapter โ†’ Backend (Express/Supabase)
                                      โ†“
                                 MongoDB/Postgres
                                      โ†“
                              Solana RPC (Devnet)
                                      โ†“
                              Metaplex NFT Mint
                                      โ†“
                              Attendee Wallet

๐Ÿ“– Documentation

Document Description
INSTALLATION.md Complete installation and setup guide
QUICK_START.md Get started in 5 minutes
LOCAL_TESTING.md Test the full flow locally
SOLANA_SETUP.md Configure Solana wallets and keys
WALLET_SETUP.md Set up Phantom and other wallets
CODEBASE_ANALYSIS.md Architecture deep dive
CODEBASE_AUDIT.md Code quality and security audit
backend/README.md Backend-specific documentation

๐ŸŽจ API Reference

Events API

GET /api/events

Get all active events

Response: [
  {
    "_id": "event_id",
    "name": "Web3 Conference 2024",
    "description": "Annual blockchain conference",
    "claimCode": "WEB3-2024",
    "imageUrl": "https://...",
    "date": "2024-12-25T00:00:00Z",
    "organizerWallet": "ABC...XYZ"
  }
]

POST /api/events

Create a new event

Request: {
  "name": "Event Name",
  "description": "Event description",
  "claimCode": "UNIQUE-CODE",
  "imageUrl": "https://...",
  "date": "2024-12-25",
  "organizerWallet": "wallet_address"
}

GET /api/events/code/:claimCode

Find event by claim code

Claims API

POST /api/claims

Create a new claim

Request: {
  "eventId": "event_id",
  "walletAddress": "wallet_address",
  "signature": "signed_message"
}

GET /api/claims/check/:eventId/:walletAddress

Check if wallet already claimed

Minting API

POST /api/mint

Mint NFT for a claim

Request: {
  "claimId": "claim_id",
  "walletAddress": "recipient_wallet",
  "eventName": "Event Name",
  "eventDate": "2024-12-25"
}

Response: {
  "success": true,
  "mintAddress": "NFT_mint_address",
  "signature": "transaction_signature"
}

๐Ÿšข Deployment

Frontend (Vercel)

  1. Push code to GitHub
  2. Import project in Vercel
  3. Set environment variables:
    VITE_API_URL=https://your-backend.com
    
  4. Deploy!

Backend (Render/Railway)

  1. Create new Web Service
  2. Connect GitHub repository
  3. Set build command: cd backend && npm install
  4. Set start command: cd backend && npm start
  5. Add environment variables:
    MONGODB_URI=mongodb+srv://...
    SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
    SOLANA_PAYER_SECRET_KEY=...
    FRONTEND_URL=https://your-frontend.vercel.app
    NODE_ENV=production
    

Database (MongoDB Atlas)

  1. Create cluster at mongodb.com/cloud/atlas
  2. Get connection string
  3. Update MONGODB_URI in backend environment

๐Ÿ—บ๏ธ Roadmap

โœ… Phase 1: Core Functionality (Completed)

  • Event creation and management
  • QR code generation
  • Wallet integration (Phantom, Solflare, Backpack)
  • NFT minting on Solana devnet
  • Claim verification system
  • Responsive UI with shadcn/ui
  • Node.js + MongoDB backend
  • Dual backend support (Supabase/Node.js)

๐Ÿšง Phase 2: Enhanced Features (In Progress)

  • Mainnet Deployment: Move from devnet to Solana mainnet
  • Event Analytics Dashboard: Detailed metrics and insights
  • Batch Minting: Mint multiple NFTs at once for large events
  • Email Notifications: Alert attendees when NFTs are minted
  • Social Sharing: Share attendance on Twitter/social media
  • Event Categories: Tag and filter events by type
  • Search & Discovery: Find events by location, date, category

๐Ÿ”ฎ Phase 3: Advanced Capabilities (Planned)

  • Multi-Chain Support: Expand to Ethereum, Polygon, Base
  • Dynamic NFTs: Update NFT metadata based on event milestones
  • Tiered Attendance: Different NFT tiers (VIP, General, etc.)
  • Event Series: Link multiple events into a series with collection rewards
  • Gamification: Badges, achievements, leaderboards
  • Mobile App: Native iOS/Android apps
  • White-Label Solution: Custom branding for organizations
  • Marketplace Integration: Trade/sell attendance NFTs

๐ŸŒŸ Phase 4: Ecosystem Growth (Future)

  • DAO Governance: Community-driven feature decisions
  • Token Gating: Require specific NFTs to access events
  • Proof-of-Participation Rewards: Airdrops for active attendees
  • Event Sponsorships: Sponsored NFTs and branded experiences
  • API Marketplace: Third-party integrations and plugins
  • Cross-Platform Identity: Unified attendance profile across platforms
  • Virtual Event Integration: Zoom, Discord, Twitter Spaces
  • Metaverse Events: VR/AR attendance tracking

๐Ÿ’ก Community Requests

Have an idea? Open an issue or join our Discord!


๐Ÿค Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Development Guidelines

  • Follow the existing code style
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation as needed
  • Ensure all tests pass before submitting PR

๐Ÿ› Troubleshooting

Common Issues

MongoDB Connection Error

# Ensure MongoDB is running
mongod --dbpath C:\data\db

Solana Mint Fails

  • Check payer wallet has sufficient SOL
  • Verify SOLANA_PAYER_SECRET_KEY is valid base58 format
  • Confirm RPC URL is accessible

CORS Errors

  • Update FRONTEND_URL in backend .env
  • Ensure frontend uses correct VITE_API_URL

Wallet Won't Connect

  • Install Phantom wallet extension
  • Switch to Devnet in wallet settings
  • Refresh page and try again

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • Solana Foundation for the incredible blockchain infrastructure
  • Metaplex for NFT standards and tooling
  • shadcn/ui for beautiful UI components
  • Vercel for seamless deployment
  • The Solana Community for continuous support and feedback

๐Ÿ“ž Contact & Support


Built with โค๏ธ on Solana

โญ Star us on GitHub โ€ข ๐Ÿฆ Follow on Twitter โ€ข ๐Ÿ’ฌ Join Discord

About

Attest is a Solana-based proof-of-attendance app where event organizers create events with shareable claim codes or QR codes, and attendees connect their Phantom wallet to mint an NFT that proves they attended. The app uses Vite,React ,TypeScript on the frontend with Supabase handling authentication, database , and backend minting via edge function

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors