A complete application for distributing Tezos NFTs via NFC tags. Users scan NFC tags to receive NFTs, and admins can manage NFC tag assignments through a dedicated admin panel.
- NFC Scanning: Users can scan NFC tags to receive NFTs
- Admin Panel: Manage NFC tags and assign NFTs to them
- Tezos Integration: Built on Tezos blockchain using FA2 NFT standard
- Wallet Connection: Supports Tezos wallets via Beacon Wallet
- Claim Prevention: Prevents duplicate claims per user
pointez/
├── backend/ # Express.js API server
├── frontend/ # User-facing Next.js dapp
├── admin/ # Admin panel (Next.js)
└── contracts/ # Tezos smart contracts (Michelson/MLigo)
- Node.js 18+ and npm
- A Tezos wallet (for testing on Ghostnet)
- NFC tags (for physical deployment)
- Install dependencies for all workspaces:
npm run install:all- Set up backend environment:
cd backend
cp .env.example .env
# Edit .env with your configuration- Create an admin key:
# First, start the backend
npm run dev:backend
# Then create an admin key via API or manually
curl -X POST http://localhost:3001/api/admin/create-key \
-H "Content-Type: application/json" \
-d '{"key": "your-secure-admin-key-here"}'- Start the backend (Terminal 1):
npm run dev:backendBackend runs on http://localhost:3001
- Start the user-facing dapp (Terminal 2):
npm run dev:frontendFrontend runs on http://localhost:3000
- Start the admin panel (Terminal 3):
npm run dev:adminAdmin panel runs on http://localhost:3002
- Open the admin panel at http://localhost:3002
- Enter your admin key
- Create NFC tags by providing:
- NFC ID (unique identifier from the NFC tag)
- NFT Contract Address (your deployed FA2 contract)
- Token ID (optional)
- Metadata URI (IPFS or other)
- Name, Description, Image URL (for display)
- Open the dapp at http://localhost:3000
- Connect your Tezos wallet (Temple, Kukai, etc.)
- Scan an NFC tag (or enter NFC ID manually)
- Review the NFT details
- Click "Claim NFT" to mint and receive the NFT
The project includes a FA2 NFT contract in contracts/nft_contract.mligo. To deploy:
- Compile the contract using Ligo:
ligo compile contract contracts/nft_contract.mligo -e main-
Deploy using Taquito or a deployment tool like Truffle Tezos
-
Update the contract address in your NFC tag assignments via the admin panel
PORT=3001
TEZOS_RPC_URL=https://ghostnet.tezos.marigold.dev
ADMIN_KEY=your-admin-key-here
NEXT_PUBLIC_API_URL=http://localhost:3001
NEXT_PUBLIC_TEZOS_RPC_URL=https://ghostnet.tezos.marigold.dev
NEXT_PUBLIC_API_URL=http://localhost:3001
To write NFC tags with IDs:
- Use an NFC writing app on your phone
- Write a simple text record with the NFC ID
- Use that same ID when creating the tag in the admin panel
- The backend uses SQLite for simplicity. For production, consider PostgreSQL.
- Web NFC API is supported in Chrome on Android and Safari on iOS
- The contract uses FA2 standard for NFT compatibility
- All operations are on Ghostnet by default (testnet)
- Admin keys should be stored securely
- Use proper authentication in production (JWT, OAuth, etc.)
- Validate all inputs on the backend
- Use HTTPS in production
- Consider rate limiting for API endpoints
MIT